Exception when validating the signature of the assertion

Yaowen Tu yaowen.tu at gmail.com
Tue Nov 6 14:30:35 EST 2012


Hi,

When I try to validate the signature of a decrypted assertion, I got the
following exception:

Caused by: org.opensaml.xml.validation.ValidationException: Apache xmlsec
IdResolver could not resolve the Element for id reference:
_83f4c0d593d29a106d35d59acc15da2b
    at
org.opensaml.security.SAMLSignatureProfileValidator.validateReferenceURI(SAMLSignatureProfileValidator.java:153)
    at
org.opensaml.security.SAMLSignatureProfileValidator.validateSignatureImpl(SAMLSignatureProfileValidator.java:84)
    at
org.opensaml.security.SAMLSignatureProfileValidator.validate(SAMLSignatureProfileValidator.java:56)

My code is:
            //The getAssertion method will decrypt the assertion from the
response
            Assertion assertion = getAssertion( response );

            if( assertion.isSigned() )
            {
                // Now we must validate the signature of the assertion
                Signature signatureToValidate = assertion.getSignature();
                // Now try to validate. Throw exception if not valid.
                super.validateSignature( signatureToValidate,
validatingCredential);
            }

public void validateSignature(Signature signature, Credential
validatingCredential) throws ValidationException
    {
        SAMLSignatureProfileValidator profileValidator = new
SAMLSignatureProfileValidator();
        profileValidator.validate( signature );

        SignatureValidator signatureValidator = new SignatureValidator(
validatingCredential );
        signatureValidator.validate( signature );
    }

Can you tell me if I am doing anything wrong?

Thanks,
Yaowen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://shibboleth.net/pipermail/dev/attachments/20121106/e1d412c8/attachment.html 


More information about the dev mailing list