I don't think I posted my original question in the correct forum, so I'm going to close that one and post here.
I'm currently working on a project which requires the XML posts to be digitally signed. I do not seem to have any luck with getting any test posts from our client to validate with the below code:
The posts are signed using the XML Signature tag with a namespace of "ds". I am simply base64 decoding the post and sending it straight to here without any modifications of whitespace or casing.
Any help would be greatly appreciated!
- Jake
I'm currently working on a project which requires the XML posts to be digitally signed. I do not seem to have any luck with getting any test posts from our client to validate with the below code:
publicstaticbool verifySignature(string xmlData) { XmlDocument theDocument = new XmlDocument(); XmlNodeList nodeList; SignedXml signedDocument; theDocument.PreserveWhitespace = true; theDocument.LoadXml(xmlData); signedDocument = new SignedXml(theDocument); nodeList = theDocument.GetElementsByTagName( "ds:Signature"); signedDocument.LoadXml((XmlElement)nodeList[0]); return signedDocument.CheckSignature(); }
The posts are signed using the XML Signature tag with a namespace of "ds". I am simply base64 decoding the post and sending it straight to here without any modifications of whitespace or casing.
Any help would be greatly appreciated!
- Jake