Problem verifying a signed XML document
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!