/** * Check that the EncryptedKey referenced by the SecurityTokenReference argument * is BSP compliant. * @param secRef The SecurityTokenReference to the BinarySecurityToken * @param bspEnforcer a BSPEnforcer instance to enforce BSP rules * @throws WSSecurityException */ public static void checkEncryptedKeyBSPCompliance( SecurityTokenReference secRef, BSPEnforcer bspEnforcer ) throws WSSecurityException { if (secRef.containsKeyIdentifier()) { String valueType = secRef.getKeyIdentifierValueType(); if (!SecurityTokenReference.ENC_KEY_SHA1_URI.equals(valueType)) { bspEnforcer.handleBSPRule(BSPRule.R3063); } } String tokenType = secRef.getTokenType(); if (!WSConstants.WSS_ENC_KEY_VALUE_TYPE.equals(tokenType)) { bspEnforcer.handleBSPRule(BSPRule.R5215); } }
String tokenType = secRef.getTokenType(); if (!PKIPathSecurity.PKI_TYPE.equals(tokenType)) { bspEnforcer.handleBSPRule(BSPRule.R5215);
result = 31 * result + keyIdentifierValue.hashCode(); String tokenType = getTokenType(); if (tokenType != null) { result = 31 * result + tokenType.hashCode();
String tokenType = secRef.getTokenType(); if (samlAssertion.getSaml1() != null && !WSConstants.WSS_SAML_TOKEN_TYPE.equals(tokenType)) { bspEnforcer.handleBSPRule(BSPRule.R6611);
return false; if (!compare(getTokenType(), tokenReference.getTokenType())) { return false;