/** * Verify the signature of this assertion * * @throws ValidationException */ public void verifySignature( RequestData data, WSDocInfo docInfo ) throws WSSecurityException { Signature sig = getSignature(); if (sig != null) { KeyInfo keyInfo = sig.getKeyInfo(); if (keyInfo == null) { throw new WSSecurityException( WSSecurityException.FAILURE, "invalidSAMLsecurity", new Object[]{"cannot get certificate or key"} ); } SAMLKeyInfo samlKeyInfo = SAMLUtil.getCredentialFromKeyInfo(keyInfo.getDOM(), data, docInfo, data.getWssConfig().isWsiBSPCompliant()); verifySignature(samlKeyInfo); } else { LOG.debug("AssertionWrapper: no signature to validate"); } }
/** * Verify the signature of this assertion * * @throws ValidationException */ public void verifySignature( RequestData data, WSDocInfo docInfo ) throws WSSecurityException { Signature sig = getSignature(); if (sig != null) { KeyInfo keyInfo = sig.getKeyInfo(); if (keyInfo == null) { throw new WSSecurityException( WSSecurityException.FAILURE, "invalidSAMLsecurity", new Object[]{"cannot get certificate or key"} ); } SAMLKeyInfo samlKeyInfo = SAMLUtil.getCredentialFromKeyInfo(keyInfo.getDOM(), data, docInfo, data.getWssConfig().isWsiBSPCompliant()); verifySignature(samlKeyInfo); } else { LOG.debug("AssertionWrapper: no signature to validate"); } }
samlAssertion.verifySignature(samlKeyInfo);
samlAssertion.verifySignature(samlKeyInfo);