cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1492319 - in /cxf/trunk: rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java systests/transports/src/test/java/org/apache/cxf/systest/http/HTTPSClientTest.java
Date Wed, 12 Jun 2013 18:14:06 GMT
Author: dkulp
Date: Wed Jun 12 18:13:55 2013
New Revision: 1492319

URL: http://svn.apache.org/r1492319
Log:
[CXF-5063] Make sure the keymanagers are not wrapped within the TLSClientParams to avoid hash
changes and cause major problems

Modified:
    cxf/trunk/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/HTTPSClientTest.java

Modified: cxf/trunk/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java?rev=1492319&r1=1492318&r2=1492319&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java
(original)
+++ cxf/trunk/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java
Wed Jun 12 18:13:55 2013
@@ -809,20 +809,25 @@ public class AsyncHTTPConduit extends UR
         sslengine.setEnabledCipherSuites(cipherSuites);
     }
 
-    protected static void getKeyManagersWithCertAlias(TLSClientParameters tlsClientParameters,
+    protected static KeyManager[] getKeyManagersWithCertAlias(TLSClientParameters tlsClientParameters,
                                                       KeyManager[] keyManagers) throws GeneralSecurityException
{
         if (tlsClientParameters.getCertAlias() != null) {
+            KeyManager ret[] = new KeyManager[keyManagers.length];  
             for (int idx = 0; idx < keyManagers.length; idx++) {
                 if (keyManagers[idx] instanceof X509KeyManager) {
                     try {
-                        keyManagers[idx] = new AliasedX509ExtendedKeyManager(tlsClientParameters.getCertAlias(),
+                        ret[idx] = new AliasedX509ExtendedKeyManager(tlsClientParameters.getCertAlias(),
                                                                              (X509KeyManager)keyManagers[idx]);
                     } catch (Exception e) {
                         throw new GeneralSecurityException(e);
                     }
+                } else {
+                    ret[idx] = keyManagers[idx]; 
                 }
             }
+            return ret;
         }
+        return keyManagers;
     }
 
 

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/HTTPSClientTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/HTTPSClientTest.java?rev=1492319&r1=1492318&r2=1492319&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/HTTPSClientTest.java
(original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/HTTPSClientTest.java
Wed Jun 12 18:13:55 2013
@@ -128,7 +128,10 @@ public class HTTPSClientTest extends Abs
               BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
               address);
         
+        //provider.getRequestContext().put("use.async.http.conduit", Boolean.TRUE);
+        //for (int x = 0; x < 100000; x++) {
         assertEquals(port.greetMe("Kitty"), "Hello Kitty");
+        //}
         
         
         stopServers();



Mime
View raw message