From 5bcf6b61f385bfee57652af5d64f6f08738ed805 Mon Sep 17 00:00:00 2001 From: Oleg Kalnichevski Date: Fri, 7 Feb 2020 09:52:49 +0100 Subject: [PATCH] Bug fix: custom SSL context is ignored --- .../org/apache/hc/client5/http/examples/ClientCustomSSL.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httpclient5/src/test/java/org/apache/hc/client5/http/examples/ClientCustomSSL.java b/httpclient5/src/test/java/org/apache/hc/client5/http/examples/ClientCustomSSL.java index ef4b1732e..20432d426 100644 --- a/httpclient5/src/test/java/org/apache/hc/client5/http/examples/ClientCustomSSL.java +++ b/httpclient5/src/test/java/org/apache/hc/client5/http/examples/ClientCustomSSL.java @@ -69,7 +69,7 @@ public class ClientCustomSSL { .build(); // Allow TLSv1.2 protocol only final SSLConnectionSocketFactory sslSocketFactory = SSLConnectionSocketFactoryBuilder.create() - .setSslContext(SSLContexts.createSystemDefault()) + .setSslContext(sslcontext) .setTlsVersions(TLS.V_1_2) .build(); final HttpClientConnectionManager cm = PoolingHttpClientConnectionManagerBuilder.create()