diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/ssl/ConscryptClientTlsStrategy.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/ssl/ConscryptClientTlsStrategy.java index fa54317e2..5a9a5dab6 100644 --- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/ssl/ConscryptClientTlsStrategy.java +++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/ssl/ConscryptClientTlsStrategy.java @@ -93,7 +93,7 @@ public ConscryptClientTlsStrategy(final SSLContext sslContext) { * @since 5.2 */ public ConscryptClientTlsStrategy() { - this(SSLContexts.createSystemDefault(), null, null, null); + this(SSLContexts.createDefault(), null, null, null); } /** @@ -102,7 +102,7 @@ public ConscryptClientTlsStrategy() { * @since 5.2 */ public ConscryptClientTlsStrategy(final SSLSessionVerifier verifier) { - this(SSLContexts.createSystemDefault(), verifier); + this(SSLContexts.createDefault(), verifier); } @Override diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/ssl/ConscryptServerTlsStrategy.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/ssl/ConscryptServerTlsStrategy.java index b78bfee33..b2f862f79 100644 --- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/ssl/ConscryptServerTlsStrategy.java +++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/ssl/ConscryptServerTlsStrategy.java @@ -150,7 +150,7 @@ public ConscryptServerTlsStrategy(final SSLContext sslContext) { * @since 5.2 */ public ConscryptServerTlsStrategy() { - this(SSLContexts.createSystemDefault(), (SSLBufferMode) null, null, null); + this(SSLContexts.createDefault(), (SSLBufferMode) null, null, null); } /** @@ -160,7 +160,7 @@ public ConscryptServerTlsStrategy() { * @since 5.2 */ public ConscryptServerTlsStrategy(final SSLSessionVerifier verifier) { - this(SSLContexts.createSystemDefault(), (SSLBufferMode) null, null, verifier); + this(SSLContexts.createDefault(), (SSLBufferMode) null, null, verifier); } private boolean isApplicable(final SocketAddress localAddress) { diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/ssl/H2ClientTlsStrategy.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/ssl/H2ClientTlsStrategy.java index d56232f70..ca8dfd8cf 100644 --- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/ssl/H2ClientTlsStrategy.java +++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/ssl/H2ClientTlsStrategy.java @@ -90,7 +90,7 @@ public H2ClientTlsStrategy(final SSLContext sslContext) { } public H2ClientTlsStrategy() { - this(SSLContexts.createSystemDefault()); + this(SSLContexts.createDefault()); } /** @@ -100,7 +100,7 @@ public H2ClientTlsStrategy() { * @since 5.2 */ public H2ClientTlsStrategy( final SSLSessionVerifier verifier) { - this(SSLContexts.createSystemDefault(), null, null, verifier); + this(SSLContexts.createDefault(), null, null, verifier); } @Override diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/ssl/H2ServerTlsStrategy.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/ssl/H2ServerTlsStrategy.java index 986fc815d..5bbc91f5f 100644 --- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/ssl/H2ServerTlsStrategy.java +++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/ssl/H2ServerTlsStrategy.java @@ -115,7 +115,7 @@ public H2ServerTlsStrategy(final SSLContext sslContext, */ @Deprecated public H2ServerTlsStrategy(final int... securePorts) { - this(SSLContexts.createSystemDefault(), new org.apache.hc.core5.http.nio.ssl.FixedPortStrategy(securePorts)); + this(SSLContexts.createDefault(), new org.apache.hc.core5.http.nio.ssl.FixedPortStrategy(securePorts)); } public H2ServerTlsStrategy( @@ -146,7 +146,7 @@ public H2ServerTlsStrategy(final SSLContext sslContext) { } public H2ServerTlsStrategy() { - this(SSLContexts.createSystemDefault()); + this(SSLContexts.createDefault()); } private boolean isApplicable(final SocketAddress localAddress) { diff --git a/httpcore5-testing/src/main/java/org/apache/hc/core5/benchmark/HttpBenchmark.java b/httpcore5-testing/src/main/java/org/apache/hc/core5/benchmark/HttpBenchmark.java index 5cda8b208..f8936a4bd 100644 --- a/httpcore5-testing/src/main/java/org/apache/hc/core5/benchmark/HttpBenchmark.java +++ b/httpcore5-testing/src/main/java/org/apache/hc/core5/benchmark/HttpBenchmark.java @@ -145,7 +145,7 @@ public Results execute() throws Exception { } sslContext = sslContextBuilder.build(); } else { - sslContext = SSLContexts.createSystemDefault(); + sslContext = SSLContexts.createDefault(); } final HttpVersionPolicy versionPolicy; diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/nio/ssl/BasicClientTlsStrategy.java b/httpcore5/src/main/java/org/apache/hc/core5/http/nio/ssl/BasicClientTlsStrategy.java index 7e098d2ad..86b25ed7f 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/http/nio/ssl/BasicClientTlsStrategy.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/http/nio/ssl/BasicClientTlsStrategy.java @@ -92,7 +92,7 @@ public BasicClientTlsStrategy(final SSLContext sslContext) { } public BasicClientTlsStrategy() { - this(SSLContexts.createSystemDefault()); + this(SSLContexts.createDefault()); } /** @@ -102,7 +102,7 @@ public BasicClientTlsStrategy() { * @since 5.2 */ public BasicClientTlsStrategy(final SSLSessionVerifier verifier) { - this(SSLContexts.createSystemDefault(), verifier); + this(SSLContexts.createDefault(), verifier); } @Override diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/nio/ssl/BasicServerTlsStrategy.java b/httpcore5/src/main/java/org/apache/hc/core5/http/nio/ssl/BasicServerTlsStrategy.java index 382007321..e97ee8441 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/http/nio/ssl/BasicServerTlsStrategy.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/http/nio/ssl/BasicServerTlsStrategy.java @@ -116,7 +116,7 @@ public BasicServerTlsStrategy(final SSLContext sslContext, final SecurePortStrat */ @Deprecated public BasicServerTlsStrategy(final SecurePortStrategy securePortStrategy) { - this(SSLContexts.createSystemDefault(), securePortStrategy); + this(SSLContexts.createDefault(), securePortStrategy); } /** @@ -125,7 +125,7 @@ public BasicServerTlsStrategy(final SecurePortStrategy securePortStrategy) { * @since 5.2 */ public BasicServerTlsStrategy(final SSLSessionVerifier verifier) { - this(SSLContexts.createSystemDefault(), verifier); + this(SSLContexts.createDefault(), verifier); } public BasicServerTlsStrategy( @@ -158,7 +158,7 @@ public BasicServerTlsStrategy(final SSLContext sslContext) { } public BasicServerTlsStrategy() { - this(SSLContexts.createSystemDefault()); + this(SSLContexts.createDefault()); } private boolean isApplicable(final SocketAddress localAddress) { diff --git a/httpcore5/src/test/java/org/apache/hc/core5/ssl/SSLContextsTest.java b/httpcore5/src/test/java/org/apache/hc/core5/ssl/SSLContextsTest.java index d37ae1d3d..6fb082f6a 100644 --- a/httpcore5/src/test/java/org/apache/hc/core5/ssl/SSLContextsTest.java +++ b/httpcore5/src/test/java/org/apache/hc/core5/ssl/SSLContextsTest.java @@ -56,6 +56,7 @@ void createDefault() { } @Test + @SuppressWarnings("deprecation") void createSystemDefault() { final SSLContext sslContext = SSLContexts.createSystemDefault(); assertAll(