-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to validate Signature #98
Comments
What version of xmlseclibs are you using? Try using the latest master or add this change to your current version: I'm guessing this is due to the formatted cert |
I tried with the new version but still getting the same error. I am new to the SOAP and WSS.
This is what I am doing to validate the request.
Do we need to use any of the above certificates to validate the request? I think in WSSESoapServer we are currently using the BinarySecurityToken from the request itself. Also what is the relationship between BinarySecurityToken and certificates? Please clarify. EDIT: openssl_verify() prams are given below
Note: Attached the certificates and request. Certificates are in .cer extension and request is in .xml extension. |
it seems xml signatures with URI's in them does not work with this library ? the tests in the test folder uses signatures that does not have URI.. We seem to have the exact same issue today, with latest xmlseclibs. :( |
The problem appears to be the use of the InclusiveNamespaces element within the CanonicalizationMethod element. InclusiveNamespaces are currently handled when defined within the Transforms elements but the library doesn't yet have support for the higher level define. I will look into this but may need more varying examples of this usage to get it working properly. |
This is my request:
My Code is given below:
Then it throws the exception Unable to validate Signature.
Can you please guide me to tackle the issue?
Same code was successfully validating for the request given below.
<?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header><wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><wsse:BinarySecurityToken wsu:Id="SecurityToken-e7f3feb1-5b50-45d2-beba-e3acb1936a73" EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">MIIE5DCCA8ygAwIBAgIOAQAAAAABP2HertA8fb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AYb4QgEBBAQDAgWgME8GCCsGAQUFBwEBBEMwQTA/BggrBgEFBQcwAoYzaHR0cDovL2NhY2VydC5vbW5pcm9vdC5jb20vUHVibGljU3VyZUNyZWRlbnRpYWwuY3J0MBoGA1UdEQQTMBGBD3dzdGVjaEBhZXhwLmNvbTAdBgNVHSUEFjAUBggrBgEFBQcDAgYIKwYBBQUHAwQwDQYJKoZIhvcNAQEFBQADggEBABZUF1NtovZdbQux3ca8i2BP31sh9O59BmaNLpI6rtMUn/02VhdG2AJt6hEspY8Kp16eyxwF4ZHpJwyE6MEIICIwWYwurl8kE+8ol+O+tLibUV8zyV7dE9rpdN90gDo+PaXEE4TUnhQ2mZbW/kUwo9/gKKXbcxoB2UF19+E71aQhOok+UwQ5xX9V1vHXqfKkNTmUai+TWrdoyztBdkUzH8cLgYhN/hCjZzVJZT2BVrdPkex5NSUjaO3BruQc9NzqUYMxwM1PUuFrjMO0bcs1MEKwiHSxR6JlHMLqgYZNKkSzwVQqBA0gGlsZcvRh6nSTmTqTy7cu7T+OFDesrY8sZdM=</wsse:BinarySecurityToken><Signature xmlns="http://www.w3.org/2000/09/xmldsig#"> <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-8aba243f-1fce-48ef-9965-dd4eb7e4782d"> <Transforms> <Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> </Transforms> <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/> <DigestValue>MZlhT0MiKkVCUMChVkTeqHbnruk=</DigestValue> </Reference> </SignedInfo> <SignatureValue>huA7bmo0F9SyY7TCnUjBT3L0uoS30v0CIsfxeytvuu2bf3E4wRbBfgGDDl4klwdngC93mpEWQYdFmdmVCJlQaQOdzsS3mQJofgSFdVFbBx1StJqgTTzKr0vzaEkE0nzmwbKKWpZUYjVvbv5pobMo0ugMXVEDSToPS4HovJNj8OoPjb04ooLZ9M54G/zGgUcIZfldk5ynGdIz8L6CU/WkjstKkulzcyNt9UcKU7qqk/YvyO7kl+NEg0voPK5/cyjMbEg+oAGryGZvlBXJR4A7b9hL3EVQw6Dih1Lqd0Z3CkW20saMquqMEpQx3UBJHNArUuRoICswwxRL7riOXcA9ZA==</SignatureValue><KeyInfo><wsse:SecurityTokenReference xmlns=""><wsse:Reference URI="#SecurityToken-e7f3feb1-5b50-45d2-beba-e3acb1936a73" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"/></wsse:SecurityTokenReference></KeyInfo></Signature></wsse:Security></soapenv:Header><soapenv:Body wsu:Id="Body-8aba243f-1fce-48ef-9965-dd4eb7e4782d" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><ping xmlns="http://americanexpress.com/travel/dtr/ws/itinerary"><param>PING</param></ping></soapenv:Body></soapenv:Envelope>
The text was updated successfully, but these errors were encountered: