camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1343028 - in /camel/trunk/components: camel-netty/src/test/java/org/apache/camel/component/netty/ camel-spring/ camel-websocket/src/test/java/org/apache/camel/component/websocket/
Date Sun, 27 May 2012 10:34:40 GMT
Author: davsclaus
Date: Sun May 27 10:34:40 2012
New Revision: 1343028

URL: http://svn.apache.org/viewvc?rev=1343028&view=rev
Log:
Use WANT for client SSL to have test working on more platforms

Modified:
    camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettySSLContextParametersTest.java
    camel/trunk/components/camel-spring/pom.xml
    camel/trunk/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketSSLContextInUriRouteExampleTest.java
    camel/trunk/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketSSLRouteExampleTest.java

Modified: camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettySSLContextParametersTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettySSLContextParametersTest.java?rev=1343028&r1=1343027&r2=1343028&view=diff
==============================================================================
--- camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettySSLContextParametersTest.java
(original)
+++ camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettySSLContextParametersTest.java
Sun May 27 10:34:40 2012
@@ -56,6 +56,7 @@ public class NettySSLContextParametersTe
         SSLContextParameters sslContextParameters = new SSLContextParameters();
         sslContextParameters.setKeyManagers(kmp);
         sslContextParameters.setTrustManagers(tmp);
+        sslContextParameters.setServerParameters(scsp);
 
         JndiRegistry registry = super.createRegistry();
         registry.bind("sslContextParameters", sslContextParameters);

Modified: camel/trunk/components/camel-spring/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/pom.xml?rev=1343028&r1=1343027&r2=1343028&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/pom.xml (original)
+++ camel/trunk/components/camel-spring/pom.xml Sun May 27 10:34:40 2012
@@ -244,6 +244,7 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-antrun-plugin</artifactId>
+        <version>1.6</version>
         <executions>
           <execution>
             <id>package</id>

Modified: camel/trunk/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketSSLContextInUriRouteExampleTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketSSLContextInUriRouteExampleTest.java?rev=1343028&r1=1343027&r2=1343028&view=diff
==============================================================================
--- camel/trunk/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketSSLContextInUriRouteExampleTest.java
(original)
+++ camel/trunk/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketSSLContextInUriRouteExampleTest.java
Sun May 27 10:34:40 2012
@@ -24,9 +24,11 @@ import com.ning.http.client.websocket.We
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.impl.JndiRegistry;
 import org.apache.camel.test.junit4.CamelTestSupport;
+import org.apache.camel.util.jsse.ClientAuthentication;
 import org.apache.camel.util.jsse.KeyManagersParameters;
 import org.apache.camel.util.jsse.KeyStoreParameters;
 import org.apache.camel.util.jsse.SSLContextParameters;
+import org.apache.camel.util.jsse.SSLContextServerParameters;
 import org.apache.camel.util.jsse.TrustManagersParameters;
 import org.junit.Before;
 import org.junit.Test;
@@ -75,9 +77,15 @@ public class WebsocketSSLContextInUriRou
         TrustManagersParameters tmp = new TrustManagersParameters();
         tmp.setKeyStore(ksp);
 
+        // NOTE: Needed since the client uses a loose trust configuration when no ssl context
+        // is provided.  We turn on WANT client-auth to prefer using authentication
+        SSLContextServerParameters scsp = new SSLContextServerParameters();
+        scsp.setClientAuthentication(ClientAuthentication.WANT.name());
+
         SSLContextParameters sslContextParameters = new SSLContextParameters();
         sslContextParameters.setKeyManagers(kmp);
         sslContextParameters.setTrustManagers(tmp);
+        sslContextParameters.setServerParameters(scsp);
 
         JndiRegistry registry = super.createRegistry();
         registry.bind("sslContextParameters", sslContextParameters);

Modified: camel/trunk/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketSSLRouteExampleTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketSSLRouteExampleTest.java?rev=1343028&r1=1343027&r2=1343028&view=diff
==============================================================================
--- camel/trunk/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketSSLRouteExampleTest.java
(original)
+++ camel/trunk/components/camel-websocket/src/test/java/org/apache/camel/component/websocket/WebsocketSSLRouteExampleTest.java
Sun May 27 10:34:40 2012
@@ -23,9 +23,11 @@ import com.ning.http.client.websocket.We
 import com.ning.http.client.websocket.WebSocketUpgradeHandler;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.test.junit4.CamelTestSupport;
+import org.apache.camel.util.jsse.ClientAuthentication;
 import org.apache.camel.util.jsse.KeyManagersParameters;
 import org.apache.camel.util.jsse.KeyStoreParameters;
 import org.apache.camel.util.jsse.SSLContextParameters;
+import org.apache.camel.util.jsse.SSLContextServerParameters;
 import org.apache.camel.util.jsse.TrustManagersParameters;
 import org.junit.Before;
 import org.junit.Test;
@@ -90,9 +92,15 @@ public class WebsocketSSLRouteExampleTes
         TrustManagersParameters tmp = new TrustManagersParameters();
         tmp.setKeyStore(ksp);
 
+        // NOTE: Needed since the client uses a loose trust configuration when no ssl context
+        // is provided.  We turn on WANT client-auth to prefer using authentication
+        SSLContextServerParameters scsp = new SSLContextServerParameters();
+        scsp.setClientAuthentication(ClientAuthentication.WANT.name());
+
         SSLContextParameters sslContextParameters = new SSLContextParameters();
         sslContextParameters.setKeyManagers(kmp);
         sslContextParameters.setTrustManagers(tmp);
+        sslContextParameters.setServerParameters(scsp);
 
         return sslContextParameters;
     }



Mime
View raw message