Methods Summary |
---|
public static java.lang.String | convertToXWSSConstants(java.lang.String type)
if(type.contains(Token.REQUIRE_THUMBPRINT_REFERENCE)){
return MessageConstants.THUMB_PRINT_TYPE;
}else if(type.contains(Token.REQUIRE_KEY_IDENTIFIER_REFERENCE)){
return MessageConstants.KEY_INDETIFIER_TYPE;
}else if(type.contains(Token.REQUIRE_ISSUER_SERIAL_REFERENCE)){
return MessageConstants.X509_ISSUER_TYPE ;
}
throw new UnsupportedOperationException(type+" is not supported");
|
private static javax.xml.namespace.QName | getQNameFromPolicy(com.sun.xml.wss.impl.policy.mls.WSSPolicy policy)
if(PolicyTypeUtil.signaturePolicy(policy)){
return signaturePolicy;
} else if(PolicyTypeUtil.timestampPolicy(policy)){
return timestampPolicy;
} else if(PolicyTypeUtil.x509CertificateBinding(policy)){
return x509TokenPolicy;
} else if(PolicyTypeUtil.usernameTokenPolicy(policy)){
return usernameTokenPolicy;
} else if(PolicyTypeUtil.secureConversationTokenKeyBinding(policy)){
return MessageConstants.SCT_NAME;
}
return null;
|
public static boolean | isEncryptedPartsEmpty(com.sun.xml.ws.security.policy.EncryptedParts ep)
if(!ep.hasBody()){
if(!ep.getTargets().hasNext()){
return true;
}
}
return false;
|
public static boolean | isSignedPartsEmpty(com.sun.xml.ws.security.policy.SignedParts sp)
if(!sp.hasBody()){
if(!sp.getHeaders().hasNext()){
return true;
}
}
return false;
|
public static void | setCanonicalizationMethod(SignaturePolicy.FeatureBinding spFB, com.sun.xml.ws.security.policy.AlgorithmSuite algorithmSuite)
if(algorithmSuite != null && algorithmSuite.getAdditionalProps().contains(Constants.InclusiveC14N)){
spFB.setCanonicalizationAlgorithm(CanonicalizationMethod.INCLUSIVE);
} else{
spFB.setCanonicalizationAlgorithm(CanonicalizationMethod.EXCLUSIVE);
}
if(algorithmSuite != null &&
algorithmSuite.getAdditionalProps().contains(Constants.InclusiveC14NWithCommentsForCm)){
spFB.setCanonicalizationAlgorithm(CanonicalizationMethod.INCLUSIVE_WITH_COMMENTS);
} else if(algorithmSuite != null &&
algorithmSuite.getAdditionalProps().contains(Constants.ExclusiveC14NWithCommentsForCm)){
spFB.setCanonicalizationAlgorithm(CanonicalizationMethod.EXCLUSIVE_WITH_COMMENTS);
}
|
public static void | setName(com.sun.xml.wss.impl.policy.mls.Target target, com.sun.xml.wss.impl.policy.mls.WSSPolicy policy)
if(target.getType() == Target.TARGET_TYPE_VALUE_URI){
target.setPolicyName(getQNameFromPolicy(policy));
}
|