for (WSSecurityEngineResult samlResult : samlResults) {
AssertionWrapper assertionWrapper =
(AssertionWrapper)samlResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
TLSSessionInfo tlsInfo = message.get(TLSSessionInfo.class);
Certificate[] tlsCerts = null;
if (tlsInfo != null) {
tlsCerts = tlsInfo.getPeerCertificates();
}
if (!SAMLUtils.checkHolderOfKey(assertionWrapper, signedResults, tlsCerts)) {
LOG.warning("Assertion fails holder-of-key requirements");
throw new WSSecurityException(WSSecurityException.INVALID_SECURITY);
}