<div dir="ltr"><div><div><div><div><div><div>Hello,<br><br></div>I have a problem verifying a signature and that seems to be cause by namespace.<br><br></div>My xml is something like this :<br><Response xmlns="urn:oasis:names:tc:SAML:2.0:protocol" Destination="<a href="https://www.concursolutions.com/SAMLRedirector/ClientSAMLLogin.aspx">https://www.concursolutions.com/SAMLRedirector/ClientSAMLLogin.aspx</a>" ID="_fe9537697781d3b3539fd23e4c027e4e5150" IssueInstant="2013-07-23T18:44:40Z" Version="2.0"><br>
    <ns1:Issuer xmlns:ns1="urn:oasis:names:tc:SAML:2.0:assertion" Format="urn:oasis:names:tc:SAML:2.0:nameid-format:entity"><a href="http://www.alcatel-lucent.com/wps/portal">http://www.alcatel-lucent.com/wps/portal</a></ns1:Issuer><br>
    <Status><br>        <StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success"/><br>    </Status><br>    <ns2:Assertion xmlns:ns2="urn:oasis:names:tc:SAML:2.0:assertion" ID="_ce339b73d43307de102c421fddef59aaa8c4" IssueInstant="2013-07-23T18:44:40Z" Version="2.0"><br>
        <ns2:Issuer Format="urn:oasis:names:tc:SAML:2.0:nameid-format:entity"><a href="http://www.alcatel-lucent.com/wps/portal">http://www.alcatel-lucent.com/wps/portal</a></ns2:Issuer><ds:Signature xmlns:ds="<a href="http://www.w3.org/2000/09/xmldsig#">http://www.w3.org/2000/09/xmldsig#</a>"><br>
<ds:SignedInfo><br><ds:CanonicalizationMethod Algorithm="<a href="http://www.w3.org/2001/10/xml-exc-c14n#">http://www.w3.org/2001/10/xml-exc-c14n#</a>"/><br><ds:SignatureMethod Algorithm="<a href="http://www.w3.org/2000/09/xmldsig#rsa-sha1">http://www.w3.org/2000/09/xmldsig#rsa-sha1</a>"/><br>
<ds:Reference URI="#_ce339b73d43307de102c421fddef59aaa8c4"><br><ds:Transforms><br><ds:Transform Algorithm="<a href="http://www.w3.org/2000/09/xmldsig#enveloped-signature">http://www.w3.org/2000/09/xmldsig#enveloped-signature</a>"/><br>
<ds:Transform Algorithm="<a href="http://www.w3.org/2001/10/xml-exc-c14n#">http://www.w3.org/2001/10/xml-exc-c14n#</a>"/><br></ds:Transforms><br><ds:DigestMethod Algorithm="<a href="http://www.w3.org/2000/09/xmldsig#sha1">http://www.w3.org/2000/09/xmldsig#sha1</a>"/><br>
<ds:DigestValue>avA6FiiMVjEe3rPNfuwXBt+FH6c=</ds:DigestValue><br></ds:Reference><br></ds:SignedInfo><br><ds:SignatureValue><br>DlWzq6dS+FlGO6HYc0uBRhJ6nRQ2aIE/UP0vnM2MENOvR/n8/xEAz0QjPAEKxjfCd1R1XU+B6uKw<br>
1XKT0Ku8jFNms6FwesDhabUvY6Nt9iLTabNynF33O9YGVxYELNwnKKFBS1Oj2aKbQ3Z5CyAH0xwc<br>KH6ht7ppL9OD3CX65Sk=<br></ds:SignatureValue><br><ds:KeyInfo><br><ds:X509Data><br>....<br><br></div>if i try to verify , i have the error : "func=xmlSecDSigCtxProcessKeyInfoNode:file=..\src\xmldsig.c:line=871:obj=unknown:subj=unknown:error=45:key is not found:"<br>
<br></div>If i change all ns1 and ns2  namespace by ds namespace, the verify function works but the digest is not correct<br><br></div>How could i do my code works with ns1 and ns2 ?<br><br></div>Sébastien<br></div>