context.setX509CertificateBinding(null);
} else {
certInfo = (AuthenticationTokenPolicy.X509CertificateBinding)keyBinding;
}
PrivateKeyBinding privKBinding = (PrivateKeyBinding)certInfo.getKeyBinding();
signingKey = privKBinding.getPrivateKey();
Node[] nxtSiblingContainer = new Node[1];
keyInfo = handleX509Binding(context, signaturePolicy, certInfo, nxtSiblingContainer);
nextSibling = nxtSiblingContainer[0];
} else if (PolicyTypeUtil.samlTokenPolicy(keyBinding)) {
// populate the policy, the handler should also add a privateKey binding for HOK
AuthenticationTokenPolicy.SAMLAssertionBinding samlBinding =
(AuthenticationTokenPolicy.SAMLAssertionBinding)keyBinding;
PrivateKeyBinding privKBinding = (PrivateKeyBinding)samlBinding.getKeyBinding();
if (privKBinding == null) {
logger.log(Level.SEVERE, LogStringsMessages.WSS_1329_NULL_PRIVATEKEYBINDING_SAML_POLICY());
throw new XWSSecurityException("PrivateKey binding not set for SAML Policy by CallbackHandler");
}
signingKey = privKBinding.getPrivateKey();
if (signingKey == null) {
logger.log(Level.SEVERE, LogStringsMessages.WSS_1330_NULL_PRIVATEKEY_SAML_POLICY());
throw new XWSSecurityException("PrivateKey null inside PrivateKeyBinding set for SAML Policy ");
}