cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject cxf git commit: WSS4J updates
Date Fri, 15 Jan 2016 11:08:32 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 26aec8750 -> 0dfaf8d72


WSS4J updates


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/0dfaf8d7
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/0dfaf8d7
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/0dfaf8d7

Branch: refs/heads/master
Commit: 0dfaf8d72574511ad9027c663707f9e30b945fbc
Parents: 26aec87
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Fri Jan 15 11:08:22 2016 +0000
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Fri Jan 15 11:08:22 2016 +0000

----------------------------------------------------------------------
 .../HttpsTokenInterceptorProvider.java          | 12 +++----
 .../security/trust/STSStaxTokenValidator.java   | 10 +++---
 .../PolicyBasedWSS4JStaxInInterceptor.java      |  2 +-
 .../cxf/ws/security/wss4j/WSS4JUtils.java       | 10 +++---
 .../AbstractStaxBindingHandler.java             | 16 ++++-----
 .../StaxAsymmetricBindingHandler.java           |  4 +--
 .../StaxSymmetricBindingHandler.java            | 36 ++++++++++----------
 .../ws/security/wss4j/StaxRoundTripTest.java    |  2 +-
 .../StaxToDOMEncryptionIdentifierTest.java      |  6 ++--
 .../security/wss4j/StaxToDOMRoundTripTest.java  |  2 +-
 .../wss4j/StaxToDOMSignatureIdentifierTest.java |  4 +--
 .../security/wss4j/saml/StaxToDOMSamlTest.java  |  8 ++---
 12 files changed, 56 insertions(+), 56 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/0dfaf8d7/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/HttpsTokenInterceptorProvider.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/HttpsTokenInterceptorProvider.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/HttpsTokenInterceptorProvider.java
index 12ff3ab..ebd0141 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/HttpsTokenInterceptorProvider.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/HttpsTokenInterceptorProvider.java
@@ -260,7 +260,7 @@ public class HttpsTokenInterceptorProvider extends AbstractPolicyInterceptorProv
                         );
                         HttpsSecurityTokenImpl httpsSecurityToken = 
                             new HttpsSecurityTokenImpl(true, policy.getUserName());
-                        httpsSecurityToken.addTokenUsage(WSSecurityTokenConstants.TokenUsage_MainSignature);
+                        httpsSecurityToken.addTokenUsage(WSSecurityTokenConstants.TOKENUSAGE_MAIN_SIGNATURE);
                         httpsTokenSecurityEvent.setSecurityToken(httpsSecurityToken);
                         PolicyUtils.assertPolicy(aim, 
                                                  new QName(token.getName().getNamespaceURI(),
@@ -278,7 +278,7 @@ public class HttpsTokenInterceptorProvider extends AbstractPolicyInterceptorProv
                         );
                         HttpsSecurityTokenImpl httpsSecurityToken = 
                             new HttpsSecurityTokenImpl(false, policy.getUserName());
-                        httpsSecurityToken.addTokenUsage(WSSecurityTokenConstants.TokenUsage_MainSignature);
+                        httpsSecurityToken.addTokenUsage(WSSecurityTokenConstants.TOKENUSAGE_MAIN_SIGNATURE);
                         httpsTokenSecurityEvent.setSecurityToken(httpsSecurityToken);
                         PolicyUtils.assertPolicy(aim, 
                                                  new QName(token.getName().getNamespaceURI(),
@@ -306,14 +306,14 @@ public class HttpsTokenInterceptorProvider extends AbstractPolicyInterceptorProv
                         );
                         HttpsSecurityTokenImpl httpsSecurityToken = 
                             new HttpsSecurityTokenImpl((X509Certificate)tlsInfo.getPeerCertificates()[0]);
-                        httpsSecurityToken.addTokenUsage(WSSecurityTokenConstants.TokenUsage_MainSignature);
+                        httpsSecurityToken.addTokenUsage(WSSecurityTokenConstants.TOKENUSAGE_MAIN_SIGNATURE);
                         httpsTokenSecurityEvent.setSecurityToken(httpsSecurityToken);
                     } else if (httpsTokenSecurityEvent.getAuthenticationType() == null) {
                         httpsTokenSecurityEvent.setAuthenticationType(
                             HttpsTokenSecurityEvent.AuthenticationType.HttpsNoAuthentication
                         );
                         HttpsSecurityTokenImpl httpsSecurityToken = new HttpsSecurityTokenImpl();
-                        httpsSecurityToken.addTokenUsage(WSSecurityTokenConstants.TokenUsage_MainSignature);
+                        httpsSecurityToken.addTokenUsage(WSSecurityTokenConstants.TOKENUSAGE_MAIN_SIGNATURE);
                         httpsTokenSecurityEvent.setSecurityToken(httpsSecurityToken);
                     }
                 } else {
@@ -339,14 +339,14 @@ public class HttpsTokenInterceptorProvider extends AbstractPolicyInterceptorProv
                     );
                     HttpsSecurityTokenImpl httpsSecurityToken = 
                         new HttpsSecurityTokenImpl((X509Certificate)tlsInfo.getPeerCertificates()[0]);
-                    httpsSecurityToken.addTokenUsage(WSSecurityTokenConstants.TokenUsage_MainSignature);
+                    httpsSecurityToken.addTokenUsage(WSSecurityTokenConstants.TOKENUSAGE_MAIN_SIGNATURE);
                     httpsTokenSecurityEvent.setSecurityToken(httpsSecurityToken);
                 } else if (httpsTokenSecurityEvent.getAuthenticationType() == null) {
                     httpsTokenSecurityEvent.setAuthenticationType(
                         HttpsTokenSecurityEvent.AuthenticationType.HttpsNoAuthentication
                     );
                     HttpsSecurityTokenImpl httpsSecurityToken = new HttpsSecurityTokenImpl();
-                    httpsSecurityToken.addTokenUsage(WSSecurityTokenConstants.TokenUsage_MainSignature);
+                    httpsSecurityToken.addTokenUsage(WSSecurityTokenConstants.TOKENUSAGE_MAIN_SIGNATURE);
                     httpsTokenSecurityEvent.setSecurityToken(httpsSecurityToken);
                 }
                 List<SecurityEvent> securityEvents = getSecurityEventList(message);

http://git-wip-us.apache.org/repos/asf/cxf/blob/0dfaf8d7/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSStaxTokenValidator.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSStaxTokenValidator.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSStaxTokenValidator.java
index b70fdcf..121789e 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSStaxTokenValidator.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSStaxTokenValidator.java
@@ -290,7 +290,7 @@ public class STSStaxTokenValidator
                 usernameTokenPasswordType, username.getValue(), password, created,
                 nonceVal, salt, iteration,
                 tokenContext.getWsSecurityContext(), usernameTokenType.getId(),
-                WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference);
+                WSSecurityTokenConstants.KEYIDENTIFIER_SECURITY_TOKEN_DIRECT_REFERENCE);
         usernameSecurityToken.setElementPath(tokenContext.getElementPath());
         usernameSecurityToken.setXMLSecEvent(tokenContext.getFirstXMLSecEvent());
 
@@ -463,7 +463,7 @@ public class STSStaxTokenValidator
                     x509V3SecurityToken.setElementPath(tokenContext.getElementPath());
                     x509V3SecurityToken.setXMLSecEvent(tokenContext.getFirstXMLSecEvent());
                     return x509V3SecurityToken;
-                } else if (WSSConstants.NS_X509PKIPathv1.equals(binarySecurityTokenType.getValueType()))
{
+                } else if (WSSConstants.NS_X509_PKIPATH_V1.equals(binarySecurityTokenType.getValueType()))
{
                     Crypto crypto = getCrypto(tokenContext.getWssSecurityProperties());
                     X509PKIPathv1SecurityTokenImpl x509PKIPathv1SecurityToken = 
                         new X509PKIPathv1SecurityTokenImpl(
@@ -471,7 +471,7 @@ public class STSStaxTokenValidator
                             crypto,
                             tokenContext.getWssSecurityProperties().getCallbackHandler(),
                             securityTokenData, binarySecurityTokenType.getId(),
-                            WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference,
+                            WSSecurityTokenConstants.KEYIDENTIFIER_SECURITY_TOKEN_DIRECT_REFERENCE,
                             tokenContext.getWssSecurityProperties()
                         ) {
                             @Override
@@ -499,7 +499,7 @@ public class STSStaxTokenValidator
                             tokenContext.getWssSecurityProperties().getCallbackHandler(),
                             securityTokenData, binarySecurityTokenType.getValueType(),
                             binarySecurityTokenType.getId(),
-                            WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference
+                            WSSecurityTokenConstants.KEYIDENTIFIER_SECURITY_TOKEN_DIRECT_REFERENCE
                         ) {
                             @Override
                             public void verify() throws XMLSecurityException {
@@ -538,7 +538,7 @@ public class STSStaxTokenValidator
             BinarySecurity binarySecurity = null;
             if (WSSConstants.NS_X509_V3_TYPE.equals(binarySecurityTokenType.getValueType()))
{
                 binarySecurity = new X509Security(doc);
-            } else if (WSSConstants.NS_X509PKIPathv1.equals(binarySecurityTokenType.getValueType()))
{
+            } else if (WSSConstants.NS_X509_PKIPATH_V1.equals(binarySecurityTokenType.getValueType()))
{
                 binarySecurity = new PKIPathSecurity(doc);
             } else if (WSSConstants.NS_GSS_KERBEROS5_AP_REQ.equals(binarySecurityTokenType.getValueType()))
{
                 binarySecurity = new KerberosSecurity(doc);

http://git-wip-us.apache.org/repos/asf/cxf/blob/0dfaf8d7/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JStaxInInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JStaxInInterceptor.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JStaxInInterceptor.java
index d6fcabe..7cdc486 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JStaxInInterceptor.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JStaxInInterceptor.java
@@ -138,7 +138,7 @@ public class PolicyBasedWSS4JStaxInInterceptor extends WSS4JStaxInInterceptor
{
             );
             HttpsSecurityTokenImpl httpsSecurityToken = new HttpsSecurityTokenImpl();
             try {
-                httpsSecurityToken.addTokenUsage(WSSecurityTokenConstants.TokenUsage_MainSignature);
+                httpsSecurityToken.addTokenUsage(WSSecurityTokenConstants.TOKENUSAGE_MAIN_SIGNATURE);
             } catch (XMLSecurityException e) {
                 LOG.fine(e.getMessage());
             }

http://git-wip-us.apache.org/repos/asf/cxf/blob/0dfaf8d7/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JUtils.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JUtils.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JUtils.java
index f54680f..4869b10 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JUtils.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JUtils.java
@@ -156,14 +156,14 @@ public final class WSS4JUtils {
             if (securityToken.getTokenType() != null) {
                 if (securityToken.getTokenType() == WSSecurityTokenConstants.EncryptedKeyToken)
{
                     cachedTok.setTokenType(WSSConstants.NS_WSS_ENC_KEY_VALUE_TYPE);
-                } else if (securityToken.getTokenType() == WSSecurityTokenConstants.KerberosToken)
{
+                } else if (securityToken.getTokenType() == WSSecurityTokenConstants.KERBEROS_TOKEN)
{
                     cachedTok.setTokenType(WSSConstants.NS_GSS_KERBEROS5_AP_REQ);
-                } else if (securityToken.getTokenType() == WSSecurityTokenConstants.Saml11Token)
{
+                } else if (securityToken.getTokenType() == WSSecurityTokenConstants.SAML_11_TOKEN)
{
                     cachedTok.setTokenType(WSSConstants.NS_SAML11_TOKEN_PROFILE_TYPE);
-                } else if (securityToken.getTokenType() == WSSecurityTokenConstants.Saml20Token)
{
+                } else if (securityToken.getTokenType() == WSSecurityTokenConstants.SAML_20_TOKEN)
{
                     cachedTok.setTokenType(WSSConstants.NS_SAML20_TOKEN_PROFILE_TYPE);
-                } else if (securityToken.getTokenType() == WSSecurityTokenConstants.SecureConversationToken
-                    || securityToken.getTokenType() == WSSecurityTokenConstants.SecurityContextToken)
{
+                } else if (securityToken.getTokenType() == WSSecurityTokenConstants.SECURE_CONVERSATION_TOKEN
+                    || securityToken.getTokenType() == WSSecurityTokenConstants.SECURITY_CONTEXT_TOKEN)
{
                     cachedTok.setTokenType(WSSConstants.NS_WSC_05_02);
                 }
             }

http://git-wip-us.apache.org/repos/asf/cxf/blob/0dfaf8d7/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractStaxBindingHandler.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractStaxBindingHandler.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractStaxBindingHandler.java
index 4940b99..70d377f 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractStaxBindingHandler.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractStaxBindingHandler.java
@@ -381,13 +381,13 @@ public abstract class AbstractStaxBindingHandler extends AbstractCommonBindingHa
         SecurityTokenConstants.TokenType tokenType = WSSecurityTokenConstants.EncryptedKeyToken;
         if (tok.getTokenType() != null) {
             if (tok.getTokenType().startsWith(WSSConstants.NS_KERBEROS11_TOKEN_PROFILE))
{
-                tokenType = WSSecurityTokenConstants.KerberosToken;
+                tokenType = WSSecurityTokenConstants.KERBEROS_TOKEN;
             } else if (tok.getTokenType().startsWith(WSSConstants.NS_SAML10_TOKEN_PROFILE)
                 || tok.getTokenType().startsWith(WSSConstants.NS_SAML11_TOKEN_PROFILE)) {
-                tokenType = WSSecurityTokenConstants.Saml11Token;
+                tokenType = WSSecurityTokenConstants.SAML_11_TOKEN;
             } else if (tok.getTokenType().startsWith(WSSConstants.NS_WSC_05_02)
                 || tok.getTokenType().startsWith(WSSConstants.NS_WSC_05_12)) {
-                tokenType = WSSecurityTokenConstants.SecureConversationToken;
+                tokenType = WSSecurityTokenConstants.SECURE_CONVERSATION_TOKEN;
             }
         }
         
@@ -517,8 +517,8 @@ public abstract class AbstractStaxBindingHandler extends AbstractCommonBindingHa
         if (token instanceof X509Token 
             && isTokenRequired(token.getIncludeTokenType())
             && (WSSecurityTokenConstants.KeyIdentifier_IssuerSerial.equals(keyIdentifier)
-                || WSSecurityTokenConstants.KeyIdentifier_ThumbprintIdentifier.equals(keyIdentifier)
-                || WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference.equals(
+                || WSSecurityTokenConstants.KEYIDENTIFIER_THUMBPRINT_IDENTIFIER.equals(keyIdentifier)
+                || WSSecurityTokenConstants.KEYIDENTIFIER_SECURITY_TOKEN_DIRECT_REFERENCE.equals(
                     keyIdentifier))) {
             properties.setIncludeSignatureToken(true);
         } else {
@@ -561,7 +561,7 @@ public abstract class AbstractStaxBindingHandler extends AbstractCommonBindingHa
             } else if (x509Token.isRequireKeyIdentifierReference()) {
                 identifier = WSSecurityTokenConstants.KeyIdentifier_SkiKeyIdentifier;
             } else if (x509Token.isRequireThumbprintReference()) {
-                identifier = WSSecurityTokenConstants.KeyIdentifier_ThumbprintIdentifier;
+                identifier = WSSecurityTokenConstants.KEYIDENTIFIER_THUMBPRINT_IDENTIFIER;
             }
         } else if (token instanceof KeyValueToken) {
             identifier = WSSecurityTokenConstants.KeyIdentifier_KeyValue;
@@ -579,7 +579,7 @@ public abstract class AbstractStaxBindingHandler extends AbstractCommonBindingHa
                 identifier = WSSecurityTokenConstants.KeyIdentifier_IssuerSerial;
             } else if (wss instanceof Wss11
                 && ((Wss11) wss).isMustSupportRefThumbprint()) {
-                identifier = WSSecurityTokenConstants.KeyIdentifier_ThumbprintIdentifier;
+                identifier = WSSecurityTokenConstants.KEYIDENTIFIER_THUMBPRINT_IDENTIFIER;
             }
         } else if (token.getIncludeTokenType() == IncludeTokenType.INCLUDE_TOKEN_ALWAYS_TO_RECIPIENT
             && !isRequestor() && token instanceof X509Token) {
@@ -593,7 +593,7 @@ public abstract class AbstractStaxBindingHandler extends AbstractCommonBindingHa
             return identifier;
         }
         
-        return WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference;
+        return WSSecurityTokenConstants.KEYIDENTIFIER_SECURITY_TOKEN_DIRECT_REFERENCE;
     }
     
     protected Map<AbstractToken, SecurePart> handleSupportingTokens(

http://git-wip-us.apache.org/repos/asf/cxf/blob/0dfaf8d7/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/StaxAsymmetricBindingHandler.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/StaxAsymmetricBindingHandler.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/StaxAsymmetricBindingHandler.java
index 1a9c6cf..a826606 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/StaxAsymmetricBindingHandler.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/StaxAsymmetricBindingHandler.java
@@ -370,8 +370,8 @@ public class StaxAsymmetricBindingHandler extends AbstractStaxBindingHandler
{
             if (encrToken instanceof X509Token 
                 && isTokenRequired(encrToken.getIncludeTokenType())
                 && (WSSecurityTokenConstants.KeyIdentifier_IssuerSerial.equals(keyIdentifier)
-                    || WSSecurityTokenConstants.KeyIdentifier_ThumbprintIdentifier.equals(keyIdentifier)
-                    || WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference.equals(
+                    || WSSecurityTokenConstants.KEYIDENTIFIER_THUMBPRINT_IDENTIFIER.equals(keyIdentifier)
+                    || WSSecurityTokenConstants.KEYIDENTIFIER_SECURITY_TOKEN_DIRECT_REFERENCE.equals(
                         keyIdentifier))) {
                 properties.setIncludeEncryptionToken(true);
             } else {

http://git-wip-us.apache.org/repos/asf/cxf/blob/0dfaf8d7/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/StaxSymmetricBindingHandler.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/StaxSymmetricBindingHandler.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/StaxSymmetricBindingHandler.java
index 9a42984..97e4c65 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/StaxSymmetricBindingHandler.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/StaxSymmetricBindingHandler.java
@@ -431,29 +431,29 @@ public class StaxSymmetricBindingHandler extends AbstractStaxBindingHandler
{
             if (isRequestor()) {
                 properties.setEncryptionKeyIdentifier(getKeyIdentifierType(encrToken));
                 properties.setDerivedKeyKeyIdentifier(
-                    WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference);
+                    WSSecurityTokenConstants.KEYIDENTIFIER_SECURITY_TOKEN_DIRECT_REFERENCE);
             } else if (recToken.getToken() instanceof KerberosToken && !isRequestor())
{
                 properties.setEncryptionKeyIdentifier(
-                    WSSecurityTokenConstants.KeyIdentifier_KerberosSha1Identifier);
+                    WSSecurityTokenConstants.KEYIDENTIFIER_KERBEROS_SHA1_IDENTIFIER);
                 properties.setDerivedKeyKeyIdentifier(
-                    WSSecurityTokenConstants.KeyIdentifier_KerberosSha1Identifier);
+                    WSSecurityTokenConstants.KEYIDENTIFIER_KERBEROS_SHA1_IDENTIFIER);
                 if (recToken.getToken().getDerivedKeys() == DerivedKeys.RequireDerivedKeys)
{
                     properties.setEncryptionKeyIdentifier(
-                        WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference);
+                        WSSecurityTokenConstants.KEYIDENTIFIER_SECURITY_TOKEN_DIRECT_REFERENCE);
                 }
             } else if ((recToken.getToken() instanceof IssuedToken 
                 || recToken.getToken() instanceof SecureConversationToken
                 || recToken.getToken() instanceof SpnegoContextToken) && !isRequestor())
{
                 properties.setEncryptionKeyIdentifier(
-                    WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference);
+                    WSSecurityTokenConstants.KEYIDENTIFIER_SECURITY_TOKEN_DIRECT_REFERENCE);
             } else {
                 properties.setEncryptionKeyIdentifier(
-                    WSSecurityTokenConstants.KeyIdentifier_EncryptedKeySha1Identifier);
+                    WSSecurityTokenConstants.KEYIDENTIFIER_ENCRYPTED_KEY_SHA1_IDENTIFIER);
                 if (recToken.getToken().getDerivedKeys() == DerivedKeys.RequireDerivedKeys)
{
                     properties.setDerivedKeyKeyIdentifier(
-                        WSSecurityTokenConstants.KeyIdentifier_EncryptedKeySha1Identifier);
+                        WSSecurityTokenConstants.KEYIDENTIFIER_ENCRYPTED_KEY_SHA1_IDENTIFIER);
                     properties.setEncryptionKeyIdentifier(
-                        WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference);
+                        WSSecurityTokenConstants.KEYIDENTIFIER_SECURITY_TOKEN_DIRECT_REFERENCE);
                     properties.setEncryptSymmetricEncryptionKey(false);
                 }
             }
@@ -463,8 +463,8 @@ public class StaxSymmetricBindingHandler extends AbstractStaxBindingHandler
{
             if (encrToken instanceof X509Token 
                 && isTokenRequired(encrToken.getIncludeTokenType())
                 && (WSSecurityTokenConstants.KeyIdentifier_IssuerSerial.equals(keyIdentifier)
-                    || WSSecurityTokenConstants.KeyIdentifier_ThumbprintIdentifier.equals(keyIdentifier)
-                    || WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference.equals(
+                    || WSSecurityTokenConstants.KEYIDENTIFIER_THUMBPRINT_IDENTIFIER.equals(keyIdentifier)
+                    || WSSecurityTokenConstants.KEYIDENTIFIER_SECURITY_TOKEN_DIRECT_REFERENCE.equals(
                         keyIdentifier))) {
                 properties.setIncludeEncryptionToken(true);
             } else {
@@ -554,28 +554,28 @@ public class StaxSymmetricBindingHandler extends AbstractStaxBindingHandler
{
                     WSSecurityTokenConstants.KeyIdentifier_EncryptedKey);
             } else {
                 properties.setSignatureKeyIdentifier(
-                    WSSecurityTokenConstants.KeyIdentifier_EncryptedKeySha1Identifier);
+                    WSSecurityTokenConstants.KEYIDENTIFIER_ENCRYPTED_KEY_SHA1_IDENTIFIER);
                 if (wrapper.getToken().getDerivedKeys() == DerivedKeys.RequireDerivedKeys)
{
                     properties.setDerivedKeyKeyIdentifier(
-                        WSSecurityTokenConstants.KeyIdentifier_EncryptedKeySha1Identifier);
+                        WSSecurityTokenConstants.KEYIDENTIFIER_ENCRYPTED_KEY_SHA1_IDENTIFIER);
                     properties.setSignatureKeyIdentifier(
-                        WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference);
+                        WSSecurityTokenConstants.KEYIDENTIFIER_SECURITY_TOKEN_DIRECT_REFERENCE);
                 }
             }
         } else if (policyToken instanceof KerberosToken) {
             if (isRequestor()) {
                 properties.setDerivedKeyKeyIdentifier(
-                    WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference);
+                    WSSecurityTokenConstants.KEYIDENTIFIER_SECURITY_TOKEN_DIRECT_REFERENCE);
             } else {
                 if (wrapper.getToken().getDerivedKeys() == DerivedKeys.RequireDerivedKeys)
{
                     properties.setSignatureKeyIdentifier(
-                        WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference);
+                        WSSecurityTokenConstants.KEYIDENTIFIER_SECURITY_TOKEN_DIRECT_REFERENCE);
                 } else {
                     properties.setSignatureKeyIdentifier(
-                        WSSecurityTokenConstants.KeyIdentifier_KerberosSha1Identifier);
+                        WSSecurityTokenConstants.KEYIDENTIFIER_KERBEROS_SHA1_IDENTIFIER);
                 }
                 properties.setDerivedKeyKeyIdentifier(
-                    WSSecurityTokenConstants.KeyIdentifier_KerberosSha1Identifier);
+                    WSSecurityTokenConstants.KEYIDENTIFIER_KERBEROS_SHA1_IDENTIFIER);
             }
         } else if (policyToken instanceof IssuedToken || policyToken instanceof SecurityContextToken
             || policyToken instanceof SecureConversationToken || policyToken instanceof SpnegoContextToken)
{
@@ -585,7 +585,7 @@ public class StaxSymmetricBindingHandler extends AbstractStaxBindingHandler
{
                 properties.setIncludeSignatureToken(true);
             }
             properties.setDerivedKeyKeyIdentifier(
-                WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference);
+                WSSecurityTokenConstants.KEYIDENTIFIER_SECURITY_TOKEN_DIRECT_REFERENCE);
         }
         
         if (sigToken.getDerivedKeys() == DerivedKeys.RequireDerivedKeys) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/0dfaf8d7/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxRoundTripTest.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxRoundTripTest.java
b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxRoundTripTest.java
index 3350ce5..729ee1f 100644
--- a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxRoundTripTest.java
+++ b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxRoundTripTest.java
@@ -896,7 +896,7 @@ public class StaxRoundTripTest extends AbstractSecurityTest {
         properties.setCallbackHandler(new KeystorePasswordCallback());
         properties.setUseSingleCert(true);
         properties.setSignatureKeyIdentifier(
-            WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference
+            WSSecurityTokenConstants.KEYIDENTIFIER_SECURITY_TOKEN_DIRECT_REFERENCE
         );
         
         WSS4JStaxOutInterceptor ohandler = new WSS4JStaxOutInterceptor(properties);

http://git-wip-us.apache.org/repos/asf/cxf/blob/0dfaf8d7/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxToDOMEncryptionIdentifierTest.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxToDOMEncryptionIdentifierTest.java
b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxToDOMEncryptionIdentifierTest.java
index 1eb5e4c..71205f7 100644
--- a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxToDOMEncryptionIdentifierTest.java
+++ b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxToDOMEncryptionIdentifierTest.java
@@ -72,7 +72,7 @@ public class StaxToDOMEncryptionIdentifierTest extends AbstractSecurityTest
{
         properties.setActions(actions);
         properties.setEncryptionUser("myalias");
         properties.setEncryptionKeyIdentifier(
-            WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference
+            WSSecurityTokenConstants.KEYIDENTIFIER_SECURITY_TOKEN_DIRECT_REFERENCE
         );
         properties.setEncryptionSymAlgorithm(WSSConstants.NS_XENC_AES128);
         
@@ -150,7 +150,7 @@ public class StaxToDOMEncryptionIdentifierTest extends AbstractSecurityTest
{
         properties.setActions(actions);
         properties.setEncryptionUser("myalias");
         properties.setEncryptionKeyIdentifier(
-            WSSecurityTokenConstants.KeyIdentifier_ThumbprintIdentifier
+            WSSecurityTokenConstants.KEYIDENTIFIER_THUMBPRINT_IDENTIFIER
         );
         properties.setEncryptionSymAlgorithm(WSSConstants.NS_XENC_AES128);
         
@@ -229,7 +229,7 @@ public class StaxToDOMEncryptionIdentifierTest extends AbstractSecurityTest
{
         properties.setActions(actions);
         properties.setEncryptionUser("myalias");
         properties.setEncryptionKeyIdentifier(
-            WSSecurityTokenConstants.KeyIdentifier_EncryptedKeySha1Identifier
+            WSSecurityTokenConstants.KEYIDENTIFIER_ENCRYPTED_KEY_SHA1_IDENTIFIER
         );
         properties.setEncryptionSymAlgorithm(WSSConstants.NS_XENC_AES128);
         

http://git-wip-us.apache.org/repos/asf/cxf/blob/0dfaf8d7/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxToDOMRoundTripTest.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxToDOMRoundTripTest.java
b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxToDOMRoundTripTest.java
index 686f380..926718a 100644
--- a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxToDOMRoundTripTest.java
+++ b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxToDOMRoundTripTest.java
@@ -907,7 +907,7 @@ public class StaxToDOMRoundTripTest extends AbstractSecurityTest {
         properties.setCallbackHandler(new KeystorePasswordCallback());
         properties.setUseSingleCert(true);
         properties.setSignatureKeyIdentifier(
-            WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference
+            WSSecurityTokenConstants.KEYIDENTIFIER_SECURITY_TOKEN_DIRECT_REFERENCE
         );
         
         WSS4JStaxOutInterceptor ohandler = new WSS4JStaxOutInterceptor(properties);

http://git-wip-us.apache.org/repos/asf/cxf/blob/0dfaf8d7/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxToDOMSignatureIdentifierTest.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxToDOMSignatureIdentifierTest.java
b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxToDOMSignatureIdentifierTest.java
index c8479fd..a81eab0 100644
--- a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxToDOMSignatureIdentifierTest.java
+++ b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxToDOMSignatureIdentifierTest.java
@@ -71,7 +71,7 @@ public class StaxToDOMSignatureIdentifierTest extends AbstractSecurityTest
{
         actions.add(WSSConstants.SIGNATURE);
         properties.setActions(actions);
         properties.setSignatureKeyIdentifier(
-            WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference
+            WSSecurityTokenConstants.KEYIDENTIFIER_SECURITY_TOKEN_DIRECT_REFERENCE
         );
         properties.setSignatureUser("myalias");
         
@@ -147,7 +147,7 @@ public class StaxToDOMSignatureIdentifierTest extends AbstractSecurityTest
{
         actions.add(WSSConstants.SIGNATURE);
         properties.setActions(actions);
         properties.setSignatureKeyIdentifier(
-            WSSecurityTokenConstants.KeyIdentifier_ThumbprintIdentifier
+            WSSecurityTokenConstants.KEYIDENTIFIER_THUMBPRINT_IDENTIFIER
         );
         properties.setSignatureUser("myalias");
         

http://git-wip-us.apache.org/repos/asf/cxf/blob/0dfaf8d7/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/saml/StaxToDOMSamlTest.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/saml/StaxToDOMSamlTest.java
b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/saml/StaxToDOMSamlTest.java
index 701b8eb..07d4f4f 100644
--- a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/saml/StaxToDOMSamlTest.java
+++ b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/saml/StaxToDOMSamlTest.java
@@ -165,7 +165,7 @@ public class StaxToDOMSamlTest extends AbstractSecurityTest {
         properties.setCallbackHandler(new PasswordCallbackHandler());
         
         properties.setSignatureKeyIdentifier(
-            WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference
+            WSSecurityTokenConstants.KEYIDENTIFIER_SECURITY_TOKEN_DIRECT_REFERENCE
         );
         
         WSS4JStaxOutInterceptor ohandler = new WSS4JStaxOutInterceptor(properties);
@@ -323,7 +323,7 @@ public class StaxToDOMSamlTest extends AbstractSecurityTest {
         properties.setCallbackHandler(new PasswordCallbackHandler());
         
         properties.setSignatureKeyIdentifier(
-            WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference
+            WSSecurityTokenConstants.KEYIDENTIFIER_SECURITY_TOKEN_DIRECT_REFERENCE
         );
         
         WSS4JStaxOutInterceptor ohandler = new WSS4JStaxOutInterceptor(properties);
@@ -414,7 +414,7 @@ public class StaxToDOMSamlTest extends AbstractSecurityTest {
             CryptoFactory.getProperties("alice.properties", this.getClass().getClassLoader());
         properties.setSignatureCryptoProperties(cryptoProperties);
         properties.setSignatureKeyIdentifier(
-            WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference
+            WSSecurityTokenConstants.KEYIDENTIFIER_SECURITY_TOKEN_DIRECT_REFERENCE
         );
         properties.setCallbackHandler(new PasswordCallbackHandler());
         
@@ -528,7 +528,7 @@ public class StaxToDOMSamlTest extends AbstractSecurityTest {
             CryptoFactory.getProperties("alice.properties", this.getClass().getClassLoader());
         properties.setSignatureCryptoProperties(cryptoProperties);
         properties.setSignatureKeyIdentifier(
-            WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference
+            WSSecurityTokenConstants.KEYIDENTIFIER_SECURITY_TOKEN_DIRECT_REFERENCE
         );
         
         WSS4JStaxOutInterceptor ohandler = new WSS4JStaxOutInterceptor(properties);


Mime
View raw message