String keyRefValue = referenceValue;
if (ekSha1RefValue != null && secretKey != null) {
if (ekSha1RefValue.equals(keyRefValue)) {
returnKey = secretKey;
//Cannot determine whether the original key was X509 or PasswordDerivedKey
skBinding.usesEKSHA1KeyBinding(true);
}
} else {
String message = "EncryptedKeySHA1 reference not correct";
logger.log(Level.SEVERE, LogStringsMessages.WSS_1306_UNSUPPORTED_KEY_IDENTIFIER_REFERENCE_TYPE(), new Object[]{message});
throw new KeySelectorException(message);