cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ashaki...@apache.org
Subject git commit: [CXF-5652]: refactored system properties in own method
Date Wed, 23 Jul 2014 12:11:40 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 9e663d12d -> 6127950d2


[CXF-5652]: refactored system properties in own method


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/6127950d
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/6127950d
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/6127950d

Branch: refs/heads/master
Commit: 6127950d2d60308c582387d2f2c1717c824eecc4
Parents: 9e663d1
Author: Andrei Shakirin <andrei.shakirin@gmail.com>
Authored: Wed Jul 23 14:11:07 2014 +0200
Committer: Andrei Shakirin <andrei.shakirin@gmail.com>
Committed: Wed Jul 23 14:11:07 2014 +0200

----------------------------------------------------------------------
 .../apache/cxf/configuration/jsse/SSLUtils.java   | 18 ++++++++++++++----
 .../https/HttpsURLConnectionFactory.java          |  5 ++---
 2 files changed, 16 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/6127950d/core/src/main/java/org/apache/cxf/configuration/jsse/SSLUtils.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/configuration/jsse/SSLUtils.java b/core/src/main/java/org/apache/cxf/configuration/jsse/SSLUtils.java
index 0663469..0906818 100644
--- a/core/src/main/java/org/apache/cxf/configuration/jsse/SSLUtils.java
+++ b/core/src/main/java/org/apache/cxf/configuration/jsse/SSLUtils.java
@@ -436,10 +436,9 @@ public final class SSLUtils {
             return cipherSuites;
         }
         if (!exclude) {
-            String jvmCipherSuites = System.getProperty(HTTPS_CIPHER_SUITES);
-            if (jvmCipherSuites != null) {
-                LogUtils.log(log, Level.FINE, "CIPHERSUITES_SYSTEM_PROPERTY_SET", jvmCipherSuites);
-                return jvmCipherSuites.split(",");
+            cipherSuites = getSystemCiphersuites(log);
+            if (cipherSuites != null) {
+                return cipherSuites;
             }
         }
         LogUtils.log(log, Level.FINE, "CIPHERSUITES_NOT_SET");
@@ -487,6 +486,17 @@ public final class SSLUtils {
         }
         return cipherSuites;
     }
+
+    private static String[] getSystemCiphersuites(Logger log) {
+        String jvmCipherSuites = System.getProperty(HTTPS_CIPHER_SUITES);
+        if ((jvmCipherSuites != null) && (!jvmCipherSuites.isEmpty())) {
+            LogUtils.log(log, Level.FINE, "CIPHERSUITES_SYSTEM_PROPERTY_SET", jvmCipherSuites);
+            return jvmCipherSuites.split(",");
+        } else {
+            return null;
+        }
+        
+    }
     
     private static List<Pattern> compileRegexPatterns(List<String> regexes,
                                                       boolean include,

http://git-wip-us.apache.org/repos/asf/cxf/blob/6127950d/rt/transports/http/src/main/java/org/apache/cxf/transport/https/HttpsURLConnectionFactory.java
----------------------------------------------------------------------
diff --git a/rt/transports/http/src/main/java/org/apache/cxf/transport/https/HttpsURLConnectionFactory.java
b/rt/transports/http/src/main/java/org/apache/cxf/transport/https/HttpsURLConnectionFactory.java
index 5b0f025..f95c5a7 100644
--- a/rt/transports/http/src/main/java/org/apache/cxf/transport/https/HttpsURLConnectionFactory.java
+++ b/rt/transports/http/src/main/java/org/apache/cxf/transport/https/HttpsURLConnectionFactory.java
@@ -163,11 +163,10 @@ public class HttpsURLConnectionFactory {
             KeyManager[] keyManagers = tlsClientParameters.getKeyManagers();
             if (tlsClientParameters.getCertAlias() != null) {
                 getKeyManagersWithCertAlias(tlsClientParameters, keyManagers);
-            }
-            
+            }            
             if (keyManagers == null) {
                 keyManagers = SSLUtils.getDefaultKeyStoreManagers(LOG);
-            }
+            }            
             ctx.init(keyManagers, tlsClientParameters.getTrustManagers(),
                      tlsClientParameters.getSecureRandom());
 


Mime
View raw message