public boolean checkProofOfPossession(
TokenRenewerParameters tokenParameters,
SAMLKeyInfo subjectKeyInfo
) {
MessageContext messageContext = tokenParameters.getWebServiceContext().getMessageContext();
final List<WSHandlerResult> handlerResults =
CastUtils.cast((List<?>) messageContext.get(WSHandlerConstants.RECV_RESULTS));
List<WSSecurityEngineResult> signedResults = new ArrayList<WSSecurityEngineResult>();
if (handlerResults != null && handlerResults.size() > 0) {
WSHandlerResult handlerResult = handlerResults.get(0);
List<WSSecurityEngineResult> results = handlerResult.getResults();
WSSecurityUtil.fetchAllActionResults(results, WSConstants.SIGN, signedResults);
WSSecurityUtil.fetchAllActionResults(results, WSConstants.UT_SIGN, signedResults);
}
TLSSessionInfo tlsInfo = (TLSSessionInfo)messageContext.get(TLSSessionInfo.class.getName());
Certificate[] tlsCerts = null;
if (tlsInfo != null) {
tlsCerts = tlsInfo.getPeerCertificates();
}