473,406 Members | 2,273 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 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 3621
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Guangxi Wu | last post by:
Hi all, Happy New Year. I am using SignedXML and an X509 certificate to digitally sign a SOAP message body and put the signature in the SOAP header for a B2B business application. Can you...
0
by: Marco Moioli | last post by:
Hi, I've a question about the xml digital signature procedure. I got a code written in C# that sign and verify an xml document and it works well, but the question is: How can I know that the...
0
by: Phil Hobgen | last post by:
Hi, I am creating a digital signature (enveloped) using the SignedXml class. The Reference Uri is set to "". Everything seems fine when saved to file, and the signature verifies OK if I reload...
2
by: S. Baumann | last post by:
Hello, I use a code very similar to that found in the MSDN sample attached to the class XmlDsigEnvelopedSignatureTransform (code attached below). The code works fine and produces somethink like...
1
by: Arkady Frenkel | last post by:
Hi! I try to make digital signature of the blob and check it , but on check ( signature created and seems OK ) I catch exception : "An XmlDocument context is required to resolve the Reference Uri...
0
by: CLarkou | last post by:
I bought a digital signature for my MSaccess application in Office 2003. I select TOOLS\Digital Signatures in Visual Basic Editor and I am not able to see my digital signature in the available...
6
by: Matt Frame | last post by:
I have a client that has asked us to get a digital signature certificate and start digitally signing all files we pass between each other. I have heard of the subject and know about the certs but...
1
by: Summa | last post by:
We are developing a PKI Web application using Microsoft Visual Studio.Net 2003(ASP.net-C#) integrated with WSE 1.0 and IIS. We use Windows 2003 Server for user management through Active directory and...
1
by: Saurabh Agrawal | last post by:
Hi Friends, I have to store some documents (word, pdf, images and text) files in sql server database. I want to apply digital signature to these documents before storing documents in sql server....
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.