Skip to content

Commit 8a42b19

Browse files
ok2crschmitt
authored andcommitted
Discontinue the use of https.protocols, https.cipherSuites system properties
1 parent a158c2e commit 8a42b19

File tree

6 files changed

+14
-24
lines changed

6 files changed

+14
-24
lines changed

httpclient5/src/main/java/org/apache/hc/client5/http/impl/io/PoolingHttpClientConnectionManagerBuilder.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,6 @@
7272
* <li>javax.net.ssl.keyStore</li>
7373
* <li>javax.net.ssl.keyStoreProvider</li>
7474
* <li>javax.net.ssl.keyStorePassword</li>
75-
* <li>https.protocols</li>
76-
* <li>https.cipherSuites</li>
7775
* </ul>
7876
*
7977
* @since 5.0

httpclient5/src/main/java/org/apache/hc/client5/http/impl/nio/PoolingAsyncClientConnectionManagerBuilder.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@
6868
* <li>javax.net.ssl.keyStore</li>
6969
* <li>javax.net.ssl.keyStoreProvider</li>
7070
* <li>javax.net.ssl.keyStorePassword</li>
71-
* <li>https.protocols</li>
72-
* <li>https.cipherSuites</li>
7371
* </ul>
7472
*
7573
* @since 5.0

httpclient5/src/main/java/org/apache/hc/client5/http/ssl/ClientTlsStrategyBuilder.java

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@
5858
* <li>javax.net.ssl.keyStore</li>
5959
* <li>javax.net.ssl.keyStoreProvider</li>
6060
* <li>javax.net.ssl.keyStorePassword</li>
61-
* <li>https.protocols</li>
62-
* <li>https.cipherSuites</li>
6361
* </ul>
6462
*
6563
* @since 5.0
@@ -212,24 +210,12 @@ private DefaultClientTlsStrategy buildImpl() {
212210
} else {
213211
sslContextCopy = systemProperties ? SSLContexts.createSystemDefault() : SSLContexts.createDefault();
214212
}
215-
final String[] tlsVersionsCopy;
216-
if (tlsVersions != null) {
217-
tlsVersionsCopy = tlsVersions;
218-
} else {
219-
tlsVersionsCopy = systemProperties ? HttpsSupport.getSystemProtocols() : null;
220-
}
221-
final String[] ciphersCopy;
222-
if (ciphers != null) {
223-
ciphersCopy = ciphers;
224-
} else {
225-
ciphersCopy = systemProperties ? HttpsSupport.getSystemCipherSuits() : null;
226-
}
227213
final HostnameVerificationPolicy hostnameVerificationPolicyCopy = hostnameVerificationPolicy != null ? hostnameVerificationPolicy :
228214
(hostnameVerifier == null ? HostnameVerificationPolicy.BUILTIN : HostnameVerificationPolicy.BOTH);
229215
return new DefaultClientTlsStrategy(
230216
sslContextCopy,
231-
tlsVersionsCopy,
232-
ciphersCopy,
217+
tlsVersions,
218+
ciphers,
233219
sslBufferMode != null ? sslBufferMode : SSLBufferMode.STATIC,
234220
hostnameVerificationPolicyCopy,
235221
hostnameVerifier);

httpclient5/src/main/java/org/apache/hc/client5/http/ssl/ConscryptClientTlsStrategy.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ public static TlsStrategy getDefault() {
6161
public static TlsStrategy getSystemDefault() {
6262
return new ConscryptClientTlsStrategy(
6363
SSLContexts.createSystemDefault(),
64-
HttpsSupport.getSystemProtocols(),
65-
HttpsSupport.getSystemCipherSuits(),
64+
null,
65+
null,
6666
SSLBufferMode.STATIC,
6767
HostnameVerificationPolicy.BUILTIN,
6868
null);

httpclient5/src/main/java/org/apache/hc/client5/http/ssl/DefaultClientTlsStrategy.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ public static DefaultClientTlsStrategy createDefault() {
6464
public static DefaultClientTlsStrategy createSystemDefault() {
6565
return new DefaultClientTlsStrategy(
6666
SSLContexts.createSystemDefault(),
67-
HttpsSupport.getSystemProtocols(),
68-
HttpsSupport.getSystemCipherSuits(),
67+
null,
68+
null,
6969
SSLBufferMode.STATIC,
7070
HostnameVerificationPolicy.BUILTIN,
7171
null);

httpclient5/src/main/java/org/apache/hc/client5/http/ssl/HttpsSupport.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,18 @@ private static String[] split(final String s) {
4646
return s.split(" *, *");
4747
}
4848

49+
/**
50+
* @deprecated Do not use.
51+
*/
52+
@Deprecated
4953
public static String[] getSystemProtocols() {
5054
return split(System.getProperty("https.protocols"));
5155
}
5256

57+
/**
58+
* @deprecated Do not use.
59+
*/
60+
@Deprecated
5361
public static String[] getSystemCipherSuits() {
5462
return split(System.getProperty("https.cipherSuites"));
5563
}

0 commit comments

Comments
 (0)