469,648 Members | 1,421 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,648 developers. It's quick & easy.

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 3317
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
By using this site, you agree to our Privacy Policy and Terms of Use.