Return-Path: X-Original-To: apmail-hc-commits-archive@www.apache.org Delivered-To: apmail-hc-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 20F5410EC2 for ; Thu, 3 Oct 2013 07:44:21 +0000 (UTC) Received: (qmail 92122 invoked by uid 500); 3 Oct 2013 07:44:19 -0000 Delivered-To: apmail-hc-commits-archive@hc.apache.org Received: (qmail 92074 invoked by uid 500); 3 Oct 2013 07:44:13 -0000 Mailing-List: contact commits-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list commits@hc.apache.org Received: (qmail 92047 invoked by uid 99); 3 Oct 2013 07:44:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Oct 2013 07:44:09 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Oct 2013 07:44:08 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 401BC238883D for ; Thu, 3 Oct 2013 07:43:48 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1528736 - /httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java Date: Thu, 03 Oct 2013 07:43:48 -0000 To: commits@hc.apache.org From: olegk@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20131003074348.401BC238883D@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: olegk Date: Thu Oct 3 07:43:47 2013 New Revision: 1528736 URL: http://svn.apache.org/r1528736 Log: Fixed initialization of SSL supported protocols and cipher suites Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java?rev=1528736&r1=1528735&r2=1528736&view=diff ============================================================================== --- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java (original) +++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java Thu Oct 3 07:43:47 2013 @@ -35,6 +35,7 @@ import java.util.LinkedList; import java.util.List; import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLSocketFactory; import org.apache.http.ConnectionReuseStrategy; import org.apache.http.Header; @@ -699,19 +700,22 @@ public class HttpClientBuilder { if (connManager == null) { LayeredConnectionSocketFactory sslSocketFactory = this.sslSocketFactory; if (sslSocketFactory == null) { + final String[] supportedProtocols = systemProperties ? split( + System.getProperty("https.protocols")) : null; + final String[] supportedCipherSuites = systemProperties ? split( + System.getProperty("https.cipherSuites")) : null; X509HostnameVerifier hostnameVerifier = this.hostnameVerifier; if (hostnameVerifier == null) { hostnameVerifier = SSLConnectionSocketFactory.BROWSER_COMPATIBLE_HOSTNAME_VERIFIER; } if (sslcontext != null) { - sslSocketFactory = new SSLConnectionSocketFactory(sslcontext, hostnameVerifier); + sslSocketFactory = new SSLConnectionSocketFactory( + sslcontext, supportedProtocols, supportedCipherSuites, hostnameVerifier); } else { if (systemProperties) { sslSocketFactory = new SSLConnectionSocketFactory( - (javax.net.ssl.SSLSocketFactory) javax.net.ssl.SSLSocketFactory.getDefault(), - split(System.getProperty("https.protocols")), - split(System.getProperty("https.cipherSuites")), - hostnameVerifier); + (SSLSocketFactory) SSLSocketFactory.getDefault(), + supportedProtocols, supportedCipherSuites, hostnameVerifier); } else { sslSocketFactory = new SSLConnectionSocketFactory( SSLContexts.createDefault(),