cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1149556 - in /cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/xml: JAXRSXmlSecTest.java XmlEncOutInterceptor.java
Date Fri, 22 Jul 2011 10:37:32 GMT
Author: sergeyb
Date: Fri Jul 22 10:37:31 2011
New Revision: 1149556

URL: http://svn.apache.org/viewvc?rev=1149556&view=rev
Log:
[CXF-3661] Trying to get the encryption tests running in Jenkins by downgrading the strength
of symmetric enc algorithm

Modified:
    cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/xml/JAXRSXmlSecTest.java
    cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/xml/XmlEncOutInterceptor.java

Modified: cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/xml/JAXRSXmlSecTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/xml/JAXRSXmlSecTest.java?rev=1149556&r1=1149555&r2=1149556&view=diff
==============================================================================
--- cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/xml/JAXRSXmlSecTest.java
(original)
+++ cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/xml/JAXRSXmlSecTest.java
Fri Jul 22 10:37:31 2011
@@ -31,6 +31,7 @@ import org.apache.cxf.jaxrs.client.Serve
 import org.apache.cxf.jaxrs.client.WebClient;
 import org.apache.cxf.systest.jaxrs.security.Book;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+import org.apache.xml.security.encryption.XMLCipher;
 
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -99,9 +100,10 @@ public class JAXRSXmlSecTest extends Abs
         properties.put("ws-security.encryption.properties", 
                        "org/apache/cxf/systest/jaxrs/security/bob.properties");
         bean.setProperties(properties);
-        bean.getOutInterceptors().add(new XmlEncOutInterceptor());
-        
-        
+        XmlEncOutInterceptor encInterceptor = new XmlEncOutInterceptor();
+        encInterceptor.setSymmetricEncAlgorithm(XMLCipher.AES_128);
+        bean.getOutInterceptors().add(encInterceptor);
+                
         WebClient wc = bean.createWebClient();
         try {
             Book book = wc.post(new Book("CXF", 126L), Book.class);
@@ -140,7 +142,9 @@ public class JAXRSXmlSecTest extends Abs
                        "org/apache/cxf/systest/jaxrs/security/alice.properties");
         bean.setProperties(properties);
         bean.getOutInterceptors().add(new XmlSigOutInterceptor());
-        bean.getOutInterceptors().add(new XmlEncOutInterceptor());
+        XmlEncOutInterceptor encInterceptor = new XmlEncOutInterceptor();
+        encInterceptor.setSymmetricEncAlgorithm(XMLCipher.AES_128);
+        bean.getOutInterceptors().add(encInterceptor);
         
         
         WebClient wc = bean.createWebClient();

Modified: cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/xml/XmlEncOutInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/xml/XmlEncOutInterceptor.java?rev=1149556&r1=1149555&r2=1149556&view=diff
==============================================================================
--- cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/xml/XmlEncOutInterceptor.java
(original)
+++ cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/xml/XmlEncOutInterceptor.java
Fri Jul 22 10:37:31 2011
@@ -103,6 +103,14 @@ public class XmlEncOutInterceptor extend
         addAfter(XmlSigOutInterceptor.class.getName());
     } 
 
+    public void setSymmetricEncAlgorithm(String algo) {
+        symEncAlgo = algo;
+    }
+    
+    public void setKeyEncAlgorithm(String algo) {
+        keyEncAlgo = algo;
+    }
+    
     public void handleMessage(Message message) throws Fault {
         try {
             Object body = getRequestBody(message);



Mime
View raw message