cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r713899 - in /cxf/trunk: parent/pom.xml rt/transports/http/src/main/java/org/apache/cxf/transport/https/SSLSocketFactoryWrapper.java
Date Fri, 14 Nov 2008 01:52:48 GMT
Author: dkulp
Date: Thu Nov 13 17:52:47 2008
New Revision: 713899

URL: http://svn.apache.org/viewvc?rev=713899&view=rev
Log:
Fix ssl issue
revert to spring 2.5.5 to remove stack traces all over the place.

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

Modified: cxf/trunk/parent/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/parent/pom.xml?rev=713899&r1=713898&r2=713899&view=diff
==============================================================================
--- cxf/trunk/parent/pom.xml (original)
+++ cxf/trunk/parent/pom.xml Thu Nov 13 17:52:47 2008
@@ -48,7 +48,7 @@
         <jetty.version>6.1.11</jetty.version>
         <saaj.version>1.3</saaj.version>
         <saaj.impl.version>1.3.2</saaj.impl.version>
-        <spring.version>2.5.6</spring.version>
+        <spring.version>2.5.5</spring.version>
         <spring.mock>spring-test</spring.mock>
         <wsdl4j.version>1.6.2</wsdl4j.version>
         <derby.version>10.2.2.0</derby.version>

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=713899&r1=713898&r2=713899&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
Thu Nov 13 17:52:47 2008
@@ -24,6 +24,8 @@
 import java.net.Socket;
 import java.net.UnknownHostException;
 
+import java.util.ArrayList;
+import java.util.List;
 import java.util.logging.Handler;
 import java.util.logging.Level;
 import java.util.logging.Logger;
@@ -99,7 +101,10 @@
             socket.setEnabledCipherSuites(ciphers);
         }
         if ((socket != null) && (protocol != null)) {
-            socket.setEnabledProtocols(new String[] {protocol});
+            String p[] = findProtocols(protocol, socket.getSupportedProtocols());
+            if (p != null) {
+                socket.setEnabledProtocols(p);
+            }
         }
         if (socket == null) {
             LogUtils.log(LOG, Level.SEVERE,
@@ -109,6 +114,21 @@
 
         return socket;        
     }
+    private String[] findProtocols(String p, String[] options) {
+        List<String> list = new ArrayList<String>();
+        for (String s : options) {
+            if (s.equals(p)) {
+                return new String[] {p};
+            } else if (s.startsWith(p)) {
+                list.add(s);
+            }
+        }
+        if (list.isEmpty()) {
+            return null;
+        }
+        return list.toArray(new String[list.size()]);
+    }
+    
     /*
      * For testing only
      */



Mime
View raw message