Connecting Tech Pros Worldwide Forums | Help | Site Map

Problem with digital Signature in a Xml document

Marco Moioli
Guest
 
Posts: n/a
#1: Nov 16 '05
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



Nicholas Paldino [.NET/C# MVP]
Guest
 
Posts: n/a
#2: Nov 16 '05

re: Problem with digital Signature in a Xml document


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]
- mvp@spam.guard.caspershouse.com

"Marco Moioli" <v-marmoi@microsoft.com> wrote in message
news:uEUtXHhTEHA.1508@TK2MSFTNGP11.phx.gbl...[color=blue]
> 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[/color]
("The[color=blue]
> file could not be opened because an XML element was found in an invalid
> location")
> Ideas?
>
> Tanks!
> Marco
>
>[/color]


Closed Thread