472,146 Members | 1,434 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,146 software developers and data experts.

Problem with digital Signature in a Xml document

Hi, I have a problem with a X509 digital signature.
I want to sign a Word 2003 document saved in .xml format.
the problem is that after the signature, Word 2003 don't want to open the
document.

If I apply a standard W3C signature to an Xml file wrote in Word 2003 I
obtain:

<?mso-application progid="Word.Document"?>
<w:wordDocument
xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml"
xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:w10="urn:schemas-microsoft-com:office:word"
xmlns:sl="http://schemas.microsoft.com/schemaLibrary/2003/core"
xmlns:aml="http://schemas.microsoft.com/aml/2001/core"
xmlns:wx="http://schemas.microsoft.com/office/word/2003/auxHint"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" w:macrosPresent="no"
w:embeddedObjPresent="no" w:ocxPresent="no" xml:space="preserve">
.....
.....
.....
</w:body>
<Signature>
<Signed Info>
(CanonicalizationMethod)
(SignatureMethod)
(<Reference (URI=)>
(Transforms)
(DigestMethod)
(DigestValue)
(</Reference>)
</Signed Info>
(SignatureValue)
(KeyInfo)
</Signature>
</w:wordDocument>

After this process, I can't open again the file because Word 2003 say ("The
file could not be opened because an XML element was found in an invalid
location")
Ideas?

Tanks!
Marco
Nov 16 '05 #1
1 3467
Marco,

It's exactly right. When you add the signature, there is no more root
element. Therefore, the XML is invalid.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Marco Moioli" <v-******@microsoft.com> wrote in message
news:uE**************@TK2MSFTNGP11.phx.gbl...
Hi, I have a problem with a X509 digital signature.
I want to sign a Word 2003 document saved in .xml format.
the problem is that after the signature, Word 2003 don't want to open the
document.

If I apply a standard W3C signature to an Xml file wrote in Word 2003 I
obtain:

<?mso-application progid="Word.Document"?>
<w:wordDocument
xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml"
xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:w10="urn:schemas-microsoft-com:office:word"
xmlns:sl="http://schemas.microsoft.com/schemaLibrary/2003/core"
xmlns:aml="http://schemas.microsoft.com/aml/2001/core"
xmlns:wx="http://schemas.microsoft.com/office/word/2003/auxHint"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" w:macrosPresent="no"
w:embeddedObjPresent="no" w:ocxPresent="no" xml:space="preserve">
....
....
....
</w:body>
<Signature>
<Signed Info>
(CanonicalizationMethod)
(SignatureMethod)
(<Reference (URI=)>
(Transforms)
(DigestMethod)
(DigestValue)
(</Reference>)
</Signed Info>
(SignatureValue)
(KeyInfo)
</Signature>
</w:wordDocument>

After this process, I can't open again the file because Word 2003 say ("The file could not be opened because an XML element was found in an invalid
location")
Ideas?

Tanks!
Marco

Nov 16 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Marco Moioli | last post: by
reply views Thread by Phil Hobgen | last post: by
1 post views Thread by Arkady Frenkel | last post: by
reply views Thread by CLarkou | last post: by
1 post views Thread by Summa | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.