verified = verifyKeyBinding(((DerivedTokenKeyBinding)actualKeyBinding).getOriginalKeyBinding(),
((DerivedTokenKeyBinding)inferredKeyBinding).getOriginalKeyBinding(),
isEncryptPolicy);
} else if (PolicyTypeUtil.usernameTokenBinding(actualKeyBinding) &&
PolicyTypeUtil.symmetricKeyBinding(inferredKeyBinding)){
MLSPolicy ikbkb = inferredKeyBinding.getKeyBinding();
if (isEncryptPolicy && PolicyTypeUtil.usernameTokenBinding(ikbkb)) {
verified = true;
}
} else if (PolicyTypeUtil.x509CertificateBinding(actualKeyBinding) &&
PolicyTypeUtil.symmetricKeyBinding(inferredKeyBinding)){
MLSPolicy ikbkb = inferredKeyBinding.getKeyBinding();
if (isEncryptPolicy && PolicyTypeUtil.x509CertificateBinding(ikbkb)) {
verified = true;
}
} else if (PolicyTypeUtil.kerberosTokenBinding(actualKeyBinding) &&
PolicyTypeUtil.symmetricKeyBinding(inferredKeyBinding)){
MLSPolicy ikbkb = inferredKeyBinding.getKeyBinding();
if (isEncryptPolicy && PolicyTypeUtil.kerberosTokenBinding(ikbkb)) {
verified = true;
}
} else if (PolicyTypeUtil.samlTokenPolicy(actualKeyBinding) &&
PolicyTypeUtil.symmetricKeyBinding(inferredKeyBinding)){
MLSPolicy ikbkb = inferredKeyBinding.getKeyBinding();
if (isEncryptPolicy && PolicyTypeUtil.samlTokenPolicy(ikbkb)) {
verified = true;
}
} else if (PolicyTypeUtil.samlTokenPolicy(actualKeyBinding) &&
PolicyTypeUtil.samlTokenPolicy(inferredKeyBinding)){
verified = true;
} else if (PolicyTypeUtil.symmetricKeyBinding(actualKeyBinding) &&
PolicyTypeUtil.usernameTokenBinding(inferredKeyBinding)) {
MLSPolicy akbkb = actualKeyBinding.getKeyBinding();
if (isEncryptPolicy && PolicyTypeUtil.usernameTokenBinding(akbkb)) {
verified = true;
}
} else if (PolicyTypeUtil.symmetricKeyBinding(actualKeyBinding) &&
PolicyTypeUtil.x509CertificateBinding(inferredKeyBinding)) {
MLSPolicy akbkb = actualKeyBinding.getKeyBinding();
if (isEncryptPolicy && PolicyTypeUtil.x509CertificateBinding(akbkb)) {
verified = true;
}
} else if (PolicyTypeUtil.derivedTokenKeyBinding(actualKeyBinding)) {
//workaround for IssuedToken under Endorsing, with PublicKey inside IssuedToken