cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1488141 - /cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssec11/RestrictedAlgorithmSuiteLoader.java
Date Fri, 31 May 2013 10:25:02 GMT
Author: coheigea
Date: Fri May 31 10:25:02 2013
New Revision: 1488141

URL: http://svn.apache.org/r1488141
Log:
Fixing failing test with limited security policies installed

Modified:
    cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssec11/RestrictedAlgorithmSuiteLoader.java

Modified: cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssec11/RestrictedAlgorithmSuiteLoader.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssec11/RestrictedAlgorithmSuiteLoader.java?rev=1488141&r1=1488140&r2=1488141&view=diff
==============================================================================
--- cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssec11/RestrictedAlgorithmSuiteLoader.java
(original)
+++ cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssec11/RestrictedAlgorithmSuiteLoader.java
Fri May 31 10:25:02 2013
@@ -20,7 +20,6 @@ package org.apache.cxf.systest.ws.wssec1
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.ws.security.policy.custom.AlgorithmSuiteLoader;
-import org.apache.neethi.Assertion;
 import org.apache.neethi.Policy;
 import org.apache.wss4j.policy.SPConstants;
 import org.apache.wss4j.policy.model.AbstractSecurityAssertion;
@@ -43,6 +42,21 @@ public class RestrictedAlgorithmSuiteLoa
 
         CustomAlgorithmSuite(SPConstants.SPVersion version, Policy nestedPolicy) {
             super(version, nestedPolicy);
+            
+            for (String key : algorithmSuiteTypes.keySet()) {
+                AlgorithmSuiteType algSuite = algorithmSuiteTypes.get(key);
+                AlgorithmSuiteType newAlgSuite = 
+                    new AlgorithmSuiteType(algSuite.getName(), algSuite.getDigest(),
+                                           algSuite.getEncryption(), algSuite.getSymmetricKeyWrap(),
+                                           algSuite.getAsymmetricKeyWrap(), algSuite.getEncryptionKeyDerivation(),
+                                           algSuite.getSignatureKeyDerivation(), 
+                                           algSuite.getEncryptionDerivedKeyLength(),
+                                           algSuite.getSignatureDerivedKeyLength(), 
+                                           algSuite.getMinimumSymmetricKeyLength(),
+                                           algSuite.getMaximumSymmetricKeyLength(), 512,
+                                           algSuite.getMaximumAsymmetricKeyLength());
+                algorithmSuiteTypes.put(key, newAlgSuite);
+            }
         }
 
         @Override
@@ -50,26 +64,5 @@ public class RestrictedAlgorithmSuiteLoa
             return new CustomAlgorithmSuite(getVersion(), nestedPolicy);
         }
 
-        @Override
-        protected void parseCustomAssertion(Assertion assertion) {
-            String assertionName = assertion.getName().getLocalPart();
-            
-            AlgorithmSuiteType algorithmSuiteType = algorithmSuiteTypes.get(assertionName);
-            
-            setAlgorithmSuiteType(new AlgorithmSuiteType(
-                    assertionName,
-                    algorithmSuiteType.getDigest(),
-                    algorithmSuiteType.getEncryption(),
-                    algorithmSuiteType.getSymmetricKeyWrap(),
-                    algorithmSuiteType.getAsymmetricKeyWrap(),
-                    algorithmSuiteType.getEncryptionKeyDerivation(),
-                    algorithmSuiteType.getSignatureKeyDerivation(),
-                    algorithmSuiteType.getEncryptionDerivedKeyLength(),
-                    algorithmSuiteType.getSignatureDerivedKeyLength(),
-                    algorithmSuiteType.getMinimumSymmetricKeyLength(),
-                    algorithmSuiteType.getMaximumSymmetricKeyLength(),
-                    512,
-                    algorithmSuiteType.getMaximumAsymmetricKeyLength()));
-        }
     }
 }



Mime
View raw message