Problem verifying a signed XML document
C#
1
Posts
1
Posters
0
Views
1
Watching
-
Hello, i have developed a web service where the client sends to the server a signed xml document signed with "Infopath". When the server receives the document it is impossible fot him to valiadate the signatures. Here is my code: (doc is a XmlDocument)
XmlNodeList nodeList = doc.GetElementsByTagName("Signature"); SignedXml[] signatures = new SignedXml[nodeList.Count]; for(int i = 0; i < nodeList.Count; i++) { signatures[i] = new SignedXml(); signatures[i].LoadXml((XmlElement)nodeList[i]); if (!signatures[i].CheckSignature()) validSignatures--; }
The xml document has been signed with a valid X509 certificate. thank you for your help!