Hey Friends,
I have a Signed XML that looks like the below
I also have the public certificate for this but i am not able to pass the
public key of the X509Certificate2 to the CheckSignature method any idea or
help?
<?xml version="1.0" encoding="UTF-8"?>
<B:Envelope xmlns:B="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:A="http://www.routeone.com/namespace.messaging.diag#"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP:Header
xmlns:SOAP-SEC="http://schemas.xmlsoap.org/soap/security/2000-12"
xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-SEC:Signature SOAP:mustUnderstand="1"><Signature
xmlns="http://www.w3.org/2000/09/xmldsig#"
xmlns:C="http://www.routeone.com/namespace.messaging.CreditApplication#"
xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/07/secext">
<SignedInfo>
<CanonicalizationMethod
Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<Reference URI="#Body">
<Transforms>
<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue>niQfM6RR1CP+V1Puf9FlaXRNcFQ=</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue>Ii68Od4N0zOe+UwJyBDe1aQlC1YbteOk4Y NjyOal9m6f7KbO4SqPdaX4CJZIIt1Z5f7iOgzhK6nuCi08RPyq XPvdeuivNNOq6/4a7iJZxQD2PMAFBVAVwAuLmIRAh0u6MkzA/u0069JvP90mOpYtG1euXf5oSKI+XCmdSKIBjv5FNmg9XTaruy2 cg3Iz+KOUInMPnG7AJcmJRnaLLr/5za6Bu1CgpeS0/aBVhf2xpF7/A9qa/sjiQR2dfwPM+InawXV94SD8HEd6QFzfE5WxrWLkVXOBeiCyNvY XX9CTcmPQFUnvVxA1+L9TMx4reb835ZT0Hi2aP2hu7PQiWAaFd w==</SignatureValue><KeyInfo><X509Data><X509Certificate/><X509IssuerSerial><X509IssuerName>OU=www.verisign .com/CPS
Incorp.by Ref. LIABILITY LTD.(c)97 VeriSign, OU=VeriSign International
Server CA - Class 3, OU="VeriSign, Inc.", O=VeriSign Trust
Network</X509IssuerName><X509SerialNumber>16028395070109205 1351433675048676869301</X509SerialNumber></X509IssuerSerial></X509Data></KeyInfo></Signature></SOAP-SEC:Signature></SOAP:Header><B:Body
id="Body" xmlns:SOAP-SEC="http://schemas.xmlsoap.org/soap/security/2000-12"
xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
<A:Diagnostic>
<A:DiagnosticMessage>
<A:RequestMessage>100027</A:RequestMessage>
</A:DiagnosticMessage>
<A:SourceIdentifier>RouteOne</A:SourceIdentifier>
</A:Diagnostic>
</B:Body></B:Envelope>