cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r694869 - in /cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/https: HttpsURLConnectionFactory.java SSLSocketFactoryWrapper.java
Date Sat, 13 Sep 2008 03:00:52 GMT
Author: dkulp
Date: Fri Sep 12 20:00:52 2008
New Revision: 694869

URL: http://svn.apache.org/viewvc?rev=694869&view=rev
Log:
Update SSL stuff to work with 1.6.0u10
Pass protocol into factorywrapper to setup the socket correctly

Modified:
    cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/https/HttpsURLConnectionFactory.java
    cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/https/SSLSocketFactoryWrapper.java

Modified: cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/https/HttpsURLConnectionFactory.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/https/HttpsURLConnectionFactory.java?rev=694869&r1=694868&r2=694869&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/https/HttpsURLConnectionFactory.java
(original)
+++ cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/https/HttpsURLConnectionFactory.java
Fri Sep 12 20:00:52 2008
@@ -205,7 +205,8 @@
             // The SSLSocketFactoryWrapper enables certain cipher suites
             // from the policy.
             socketFactory = new SSLSocketFactoryWrapper(ctx.getSocketFactory(),
-                                                        cipherSuites);
+                                                        cipherSuites,
+                                                        tlsClientParameters.getSecureSocketProtocol());
         }
         if (tlsClientParameters.isDisableCNCheck()) {
             connection.setHostnameVerifier(DISABLE_HOSTNAME_VERIFIER);

Modified: cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/https/SSLSocketFactoryWrapper.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/https/SSLSocketFactoryWrapper.java?rev=694869&r1=694868&r2=694869&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/https/SSLSocketFactoryWrapper.java
(original)
+++ cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/https/SSLSocketFactoryWrapper.java
Fri Sep 12 20:00:52 2008
@@ -39,13 +39,16 @@
     
     private SSLSocketFactory sslSocketFactory;
     private String[] ciphers;
+    private String protocol;
     
     public SSLSocketFactoryWrapper(
         SSLSocketFactory sslSocketFactoryParam,
-        String[]         ciphersParam
+        String[]         ciphersParam,
+        String           protocolParam
     ) {
         sslSocketFactory = sslSocketFactoryParam;
         ciphers          = ciphersParam;
+        protocol         = protocolParam;
     }
 
     public String[] getDefaultCipherSuites() {
@@ -55,6 +58,11 @@
     public String[] getSupportedCipherSuites() {
         return sslSocketFactory.getSupportedCipherSuites(); 
     }
+    
+    public Socket createSocket() throws IOException {
+        return enableCipherSuites(sslSocketFactory.createSocket(), 
+                                  new Object[] {"unconnected", "unconnected"});
+    }
         
     public Socket createSocket(Socket s, String host, int port, boolean autoClose)
         throws IOException, UnknownHostException  {
@@ -90,7 +98,9 @@
         if ((socket != null) && (ciphers != null)) {
             socket.setEnabledCipherSuites(ciphers);
         }
-
+        if ((socket != null) && (protocol != null)) {
+            socket.setEnabledProtocols(new String[] {protocol});
+        }
         if (socket == null) {
             LogUtils.log(LOG, Level.SEVERE,
                          "PROBLEM_CREATING_OUTBOUND_REQUEST_SOCKET", 



Mime
View raw message