cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1487511 - in /cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j: StaxCryptoCoverageCheckerTest.java StaxRoundTripActionTest.java StaxRoundTripTest.java StaxToDOMEncryptionIdentifierTest.java StaxToDOMRoundTripTest.java
Date Wed, 29 May 2013 15:14:13 GMT
Author: coheigea
Date: Wed May 29 15:14:13 2013
New Revision: 1487511

URL: http://svn.apache.org/r1487511
Log:
Fixing tests failing with limited strength security policies

Modified:
    cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxCryptoCoverageCheckerTest.java
    cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxRoundTripActionTest.java
    cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxRoundTripTest.java
    cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxToDOMEncryptionIdentifierTest.java
    cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxToDOMRoundTripTest.java

Modified: cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxCryptoCoverageCheckerTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxCryptoCoverageCheckerTest.java?rev=1487511&r1=1487510&r2=1487511&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxCryptoCoverageCheckerTest.java
(original)
+++ cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxCryptoCoverageCheckerTest.java
Wed May 29 15:14:13 2013
@@ -70,6 +70,7 @@ public class StaxCryptoCoverageCheckerTe
         WSSSecurityProperties properties = new WSSSecurityProperties();
         properties.setOutAction(new XMLSecurityConstants.Action[]{WSSConstants.ENCRYPT});
         properties.setEncryptionUser("myalias");
+        properties.setEncryptionSymAlgorithm(WSSConstants.NS_XENC_AES128);
         
         Properties outCryptoProperties = 
             CryptoFactory.getProperties("outsecurity.properties", this.getClass().getClassLoader());
@@ -167,6 +168,7 @@ public class StaxCryptoCoverageCheckerTe
         );
         properties.setEncryptionUser("myalias");
         properties.setTokenUser("username");
+        properties.setEncryptionSymAlgorithm(WSSConstants.NS_XENC_AES128);
         
         Properties outCryptoProperties = 
             CryptoFactory.getProperties("outsecurity.properties", this.getClass().getClassLoader());
@@ -403,6 +405,7 @@ public class StaxCryptoCoverageCheckerTe
         );
         properties.setEncryptionUser("myalias");
         properties.setSignatureUser("myalias");
+        properties.setEncryptionSymAlgorithm(WSSConstants.NS_XENC_AES128);
         
         Properties outCryptoProperties = 
             CryptoFactory.getProperties("outsecurity.properties", this.getClass().getClassLoader());

Modified: cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxRoundTripActionTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxRoundTripActionTest.java?rev=1487511&r1=1487510&r2=1487511&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxRoundTripActionTest.java
(original)
+++ cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxRoundTripActionTest.java
Wed May 29 15:14:13 2013
@@ -174,6 +174,7 @@ public class StaxRoundTripActionTest ext
         WSSSecurityProperties properties = new WSSSecurityProperties();
         properties.setOutAction(new XMLSecurityConstants.Action[]{WSSConstants.ENCRYPT});
         properties.setEncryptionUser("myalias");
+        properties.setEncryptionSymAlgorithm(WSSConstants.NS_XENC_AES128);
         
         Properties outCryptoProperties = 
             CryptoFactory.getProperties("outsecurity.properties", this.getClass().getClassLoader());
@@ -221,6 +222,7 @@ public class StaxRoundTripActionTest ext
         outConfig.put(ConfigurationConstants.ENCRYPTION_USER, "myalias");
         outConfig.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback());
         outConfig.put(ConfigurationConstants.ENC_PROP_FILE, "outsecurity.properties");
+        outConfig.put(ConfigurationConstants.ENC_SYM_ALGO, WSSConstants.NS_XENC_AES128);
         WSS4JStaxOutInterceptor ohandler = new WSS4JStaxOutInterceptor(outConfig);
         client.getOutInterceptors().add(ohandler);
 
@@ -279,6 +281,7 @@ public class StaxRoundTripActionTest ext
         );
         properties.setEncryptionUser("myalias");
         properties.setTokenUser("username");
+        properties.setEncryptionSymAlgorithm(WSSConstants.NS_XENC_AES128);
         
         Properties outCryptoProperties = 
             CryptoFactory.getProperties("outsecurity.properties", this.getClass().getClassLoader());
@@ -326,6 +329,7 @@ public class StaxRoundTripActionTest ext
         outConfig.put(ConfigurationConstants.ENCRYPTION_USER, "myalias");
         outConfig.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback());
         outConfig.put(ConfigurationConstants.ENC_PROP_FILE, "outsecurity.properties");
+        outConfig.put(ConfigurationConstants.ENC_SYM_ALGO, WSSConstants.NS_XENC_AES128);
         WSS4JStaxOutInterceptor ohandler = new WSS4JStaxOutInterceptor(outConfig);
         client.getOutInterceptors().add(ohandler);
 
@@ -616,6 +620,7 @@ public class StaxRoundTripActionTest ext
         );
         properties.setEncryptionUser("myalias");
         properties.setSignatureUser("myalias");
+        properties.setEncryptionSymAlgorithm(WSSConstants.NS_XENC_AES128);
         
         Properties outCryptoProperties = 
             CryptoFactory.getProperties("outsecurity.properties", this.getClass().getClassLoader());
@@ -662,6 +667,7 @@ public class StaxRoundTripActionTest ext
         outConfig.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback());
         outConfig.put(ConfigurationConstants.SIG_PROP_FILE, "outsecurity.properties");
         outConfig.put(ConfigurationConstants.ENC_PROP_FILE, "outsecurity.properties");
+        outConfig.put(ConfigurationConstants.ENC_SYM_ALGO, WSSConstants.NS_XENC_AES128);
         WSS4JStaxOutInterceptor ohandler = new WSS4JStaxOutInterceptor(outConfig);
         
         client.getOutInterceptors().add(ohandler);

Modified: cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxRoundTripTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxRoundTripTest.java?rev=1487511&r1=1487510&r2=1487511&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxRoundTripTest.java
(original)
+++ cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxRoundTripTest.java
Wed May 29 15:14:13 2013
@@ -408,6 +408,7 @@ public class StaxRoundTripTest extends A
         
         WSSSecurityProperties properties = new WSSSecurityProperties();
         properties.setOutAction(new XMLSecurityConstants.Action[]{WSSConstants.ENCRYPT});
+        properties.setEncryptionSymAlgorithm(WSSConstants.NS_XENC_AES128);
         properties.setEncryptionUser("myalias");
         
         Properties outCryptoProperties = 
@@ -441,6 +442,7 @@ public class StaxRoundTripTest extends A
         Map<String, Object> outConfig = new HashMap<String, Object>();
         outConfig.put(ConfigurationConstants.ACTION, ConfigurationConstants.ENCRYPT);
         outConfig.put(ConfigurationConstants.ENCRYPTION_USER, "myalias");
+        outConfig.put(ConfigurationConstants.ENC_SYM_ALGO, WSSConstants.NS_XENC_AES128);
         outConfig.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback());
         outConfig.put(ConfigurationConstants.ENC_PROP_FILE, "outsecurity.properties");
         WSS4JStaxOutInterceptor ohandler = new WSS4JStaxOutInterceptor(outConfig);
@@ -479,6 +481,7 @@ public class StaxRoundTripTest extends A
         );
         properties.setEncryptionUser("myalias");
         properties.setTokenUser("username");
+        properties.setEncryptionSymAlgorithm(WSSConstants.NS_XENC_AES128);
         
         Properties outCryptoProperties = 
             CryptoFactory.getProperties("outsecurity.properties", this.getClass().getClassLoader());
@@ -521,6 +524,7 @@ public class StaxRoundTripTest extends A
         outConfig.put(ConfigurationConstants.ENCRYPTION_USER, "myalias");
         outConfig.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback());
         outConfig.put(ConfigurationConstants.ENC_PROP_FILE, "outsecurity.properties");
+        outConfig.put(ConfigurationConstants.ENC_SYM_ALGO, WSSConstants.NS_XENC_AES128);
         WSS4JStaxOutInterceptor ohandler = new WSS4JStaxOutInterceptor(outConfig);
         
         client.getOutInterceptors().add(ohandler);
@@ -924,6 +928,7 @@ public class StaxRoundTripTest extends A
         );
         properties.setEncryptionUser("myalias");
         properties.setSignatureUser("myalias");
+        properties.setEncryptionSymAlgorithm(WSSConstants.NS_XENC_AES128);
         
         Properties outCryptoProperties = 
             CryptoFactory.getProperties("outsecurity.properties", this.getClass().getClassLoader());
@@ -965,6 +970,7 @@ public class StaxRoundTripTest extends A
         outConfig.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback());
         outConfig.put(ConfigurationConstants.SIG_PROP_FILE, "outsecurity.properties");
         outConfig.put(ConfigurationConstants.ENC_PROP_FILE, "outsecurity.properties");
+        outConfig.put(ConfigurationConstants.ENC_SYM_ALGO, WSSConstants.NS_XENC_AES128);
         WSS4JStaxOutInterceptor ohandler = new WSS4JStaxOutInterceptor(outConfig);
         
         client.getOutInterceptors().add(ohandler);

Modified: cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxToDOMEncryptionIdentifierTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxToDOMEncryptionIdentifierTest.java?rev=1487511&r1=1487510&r2=1487511&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxToDOMEncryptionIdentifierTest.java
(original)
+++ cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxToDOMEncryptionIdentifierTest.java
Wed May 29 15:14:13 2013
@@ -71,6 +71,7 @@ public class StaxToDOMEncryptionIdentifi
         properties.setEncryptionKeyIdentifier(
             WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference
         );
+        properties.setEncryptionSymAlgorithm(WSSConstants.NS_XENC_AES128);
         
         Properties cryptoProperties = 
             CryptoFactory.getProperties("outsecurity.properties", this.getClass().getClassLoader());
@@ -107,6 +108,7 @@ public class StaxToDOMEncryptionIdentifi
         properties.setEncryptionKeyIdentifier(
             WSSecurityTokenConstants.KeyIdentifier_IssuerSerial
         );
+        properties.setEncryptionSymAlgorithm(WSSConstants.NS_XENC_AES128);
         
         Properties cryptoProperties = 
             CryptoFactory.getProperties("outsecurity.properties", this.getClass().getClassLoader());
@@ -143,6 +145,7 @@ public class StaxToDOMEncryptionIdentifi
         properties.setEncryptionKeyIdentifier(
             WSSecurityTokenConstants.KeyIdentifier_ThumbprintIdentifier
         );
+        properties.setEncryptionSymAlgorithm(WSSConstants.NS_XENC_AES128);
         
         Properties cryptoProperties = 
             CryptoFactory.getProperties("outsecurity.properties", this.getClass().getClassLoader());
@@ -180,6 +183,7 @@ public class StaxToDOMEncryptionIdentifi
         properties.setEncryptionKeyIdentifier(
             WSSecurityTokenConstants.KeyIdentifier_X509KeyIdentifier
         );
+        properties.setEncryptionSymAlgorithm(WSSConstants.NS_XENC_AES128);
         
         Properties cryptoProperties = 
             CryptoFactory.getProperties("outsecurity.properties", this.getClass().getClassLoader());
@@ -216,6 +220,7 @@ public class StaxToDOMEncryptionIdentifi
         properties.setEncryptionKeyIdentifier(
             WSSecurityTokenConstants.KeyIdentifier_EncryptedKeySha1Identifier
         );
+        properties.setEncryptionSymAlgorithm(WSSConstants.NS_XENC_AES128);
         
         Properties cryptoProperties = 
             CryptoFactory.getProperties("outsecurity.properties", this.getClass().getClassLoader());

Modified: cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxToDOMRoundTripTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxToDOMRoundTripTest.java?rev=1487511&r1=1487510&r2=1487511&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxToDOMRoundTripTest.java
(original)
+++ cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxToDOMRoundTripTest.java
Wed May 29 15:14:13 2013
@@ -255,6 +255,7 @@ public class StaxToDOMRoundTripTest exte
         WSSSecurityProperties properties = new WSSSecurityProperties();
         properties.setOutAction(new XMLSecurityConstants.Action[]{WSSConstants.ENCRYPT});
         properties.setEncryptionUser("myalias");
+        properties.setEncryptionSymAlgorithm(WSSConstants.NS_XENC_AES128);
         
         Properties cryptoProperties = 
             CryptoFactory.getProperties("outsecurity.properties", this.getClass().getClassLoader());
@@ -290,6 +291,7 @@ public class StaxToDOMRoundTripTest exte
         outConfig.put(ConfigurationConstants.ENCRYPTION_USER, "myalias");
         outConfig.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback());
         outConfig.put(ConfigurationConstants.ENC_PROP_FILE, "outsecurity.properties");
+        outConfig.put(ConfigurationConstants.ENC_SYM_ALGO, WSSConstants.NS_XENC_AES128);
         WSS4JStaxOutInterceptor ohandler = new WSS4JStaxOutInterceptor(outConfig);
         
         client.getOutInterceptors().add(ohandler);
@@ -371,6 +373,7 @@ public class StaxToDOMRoundTripTest exte
              ConfigurationConstants.ENC_SYM_ALGO, 
              "http://www.w3.org/2001/04/xmlenc#tripledes-cbc"
         );
+        outConfig.put(ConfigurationConstants.ENC_SYM_ALGO, WSSConstants.NS_XENC_AES128);
         outConfig.put(ConfigurationConstants.ENC_PROP_FILE, "outsecurity.properties");
         WSS4JStaxOutInterceptor ohandler = new WSS4JStaxOutInterceptor(outConfig);
         
@@ -418,6 +421,7 @@ public class StaxToDOMRoundTripTest exte
         );
         properties.setEncryptionUser("myalias");
         properties.setTokenUser("username");
+        properties.setEncryptionSymAlgorithm(WSSConstants.NS_XENC_AES128);
         
         Properties cryptoProperties = 
             CryptoFactory.getProperties("outsecurity.properties", this.getClass().getClassLoader());
@@ -464,6 +468,7 @@ public class StaxToDOMRoundTripTest exte
         outConfig.put(ConfigurationConstants.ENCRYPTION_USER, "myalias");
         outConfig.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback());
         outConfig.put(ConfigurationConstants.ENC_PROP_FILE, "outsecurity.properties");
+        outConfig.put(ConfigurationConstants.ENC_SYM_ALGO, WSSConstants.NS_XENC_AES128);
         WSS4JStaxOutInterceptor ohandler = new WSS4JStaxOutInterceptor(outConfig);
         
         client.getOutInterceptors().add(ohandler);
@@ -943,6 +948,7 @@ public class StaxToDOMRoundTripTest exte
         );
         properties.setEncryptionUser("myalias");
         properties.setSignatureUser("myalias");
+        properties.setEncryptionSymAlgorithm(WSSConstants.NS_XENC_AES128);
         
         Properties cryptoProperties = 
             CryptoFactory.getProperties("outsecurity.properties", this.getClass().getClassLoader());
@@ -988,6 +994,7 @@ public class StaxToDOMRoundTripTest exte
         outConfig.put(ConfigurationConstants.PW_CALLBACK_REF, new TestPwdCallback());
         outConfig.put(ConfigurationConstants.SIG_PROP_FILE, "outsecurity.properties");
         outConfig.put(ConfigurationConstants.ENC_PROP_FILE, "outsecurity.properties");
+        outConfig.put(ConfigurationConstants.ENC_SYM_ALGO, WSSConstants.NS_XENC_AES128);
         WSS4JStaxOutInterceptor ohandler = new WSS4JStaxOutInterceptor(outConfig);
         
         client.getOutInterceptors().add(ohandler);



Mime
View raw message