softlera

softlera

  • NA
  • 3
  • 0

Problem verifying a signed XML document

Aug 20 2004 6:12 AM
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!