cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r984886 - /cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/configuration/jsse/spring/TLSClientParametersConfig.java
Date Thu, 12 Aug 2010 18:08:50 GMT
Author: dkulp
Date: Thu Aug 12 18:08:50 2010
New Revision: 984886

URL: http://svn.apache.org/viewvc?rev=984886&view=rev
Log:
[CXF-2863] If useHttpsURLConnectionDefaultSslSocketFactory is true,
don't create keystores and such

Modified:
    cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/configuration/jsse/spring/TLSClientParametersConfig.java

Modified: cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/configuration/jsse/spring/TLSClientParametersConfig.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/configuration/jsse/spring/TLSClientParametersConfig.java?rev=984886&r1=984885&r2=984886&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/configuration/jsse/spring/TLSClientParametersConfig.java
(original)
+++ cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/configuration/jsse/spring/TLSClientParametersConfig.java
Thu Aug 12 18:08:50 2010
@@ -61,7 +61,9 @@ public final class TLSClientParametersCo
         throws GeneralSecurityException,
                IOException {
 
-        TLSClientParameters ret = new TLSClientParameters();
+        TLSClientParameters ret = new TLSClientParameters(); 
+        boolean usingDefaults = params.isUseHttpsURLConnectionDefaultSslSocketFactory();
+        
         if (params.isDisableCNCheck()) {
             ret.setDisableCNCheck(true);
         }
@@ -83,16 +85,16 @@ public final class TLSClientParametersCo
         if (params.isSetJsseProvider()) {
             ret.setJsseProvider(params.getJsseProvider());
         }
-        if (params.isSetSecureRandomParameters()) {
+        if (params.isSetSecureRandomParameters() && !usingDefaults) {
             ret.setSecureRandom(
                 TLSParameterJaxBUtils.getSecureRandom(
                         params.getSecureRandomParameters()));
         }
-        if (params.isSetKeyManagers()) {
+        if (params.isSetKeyManagers() && !usingDefaults) {
             ret.setKeyManagers(
                 TLSParameterJaxBUtils.getKeyManagers(params.getKeyManagers()));
         }
-        if (params.isSetTrustManagers()) {
+        if (params.isSetTrustManagers() && !usingDefaults) {
             ret.setTrustManagers(
                 TLSParameterJaxBUtils.getTrustManagers(
                         params.getTrustManagers()));



Mime
View raw message