Hi,<br><br>When I try to validate the signature of a decrypted assertion, I got the following exception:<br><br>Caused by: org.opensaml.xml.validation.ValidationException: Apache xmlsec IdResolver could not resolve the Element for id reference: _83f4c0d593d29a106d35d59acc15da2b<br>
at org.opensaml.security.SAMLSignatureProfileValidator.validateReferenceURI(SAMLSignatureProfileValidator.java:153)<br> at org.opensaml.security.SAMLSignatureProfileValidator.validateSignatureImpl(SAMLSignatureProfileValidator.java:84)<br>
at org.opensaml.security.SAMLSignatureProfileValidator.validate(SAMLSignatureProfileValidator.java:56)<br><br>My code is:<br> //The getAssertion method will decrypt the assertion from the response<br> Assertion assertion = getAssertion( response );<br>
<br> if( assertion.isSigned() )<br> {<br> // Now we must validate the signature of the assertion<br> Signature signatureToValidate = assertion.getSignature();<br> // Now try to validate. Throw exception if not valid.<br>
super.validateSignature( signatureToValidate, validatingCredential);<br> }<br><br>public void validateSignature(Signature signature, Credential validatingCredential) throws ValidationException<br>
{<br> SAMLSignatureProfileValidator profileValidator = new SAMLSignatureProfileValidator();<br> profileValidator.validate( signature );<br> <br> SignatureValidator signatureValidator = new SignatureValidator( validatingCredential );<br>
signatureValidator.validate( signature );<br> }<br><br>Can you tell me if I am doing anything wrong?<br><br>Thanks,<br clear="all">Yaowen<br>