Bug fix: custom SSL context is ignored

This commit is contained in:
Oleg Kalnichevski 2020-02-07 09:52:49 +01:00
parent 6559b60342
commit 5bcf6b61f3
1 changed files with 1 additions and 1 deletions

View File

@ -69,7 +69,7 @@ public class ClientCustomSSL {
.build(); .build();
// Allow TLSv1.2 protocol only // Allow TLSv1.2 protocol only
final SSLConnectionSocketFactory sslSocketFactory = SSLConnectionSocketFactoryBuilder.create() final SSLConnectionSocketFactory sslSocketFactory = SSLConnectionSocketFactoryBuilder.create()
.setSslContext(SSLContexts.createSystemDefault()) .setSslContext(sslcontext)
.setTlsVersions(TLS.V_1_2) .setTlsVersions(TLS.V_1_2)
.build(); .build();
final HttpClientConnectionManager cm = PoolingHttpClientConnectionManagerBuilder.create() final HttpClientConnectionManager cm = PoolingHttpClientConnectionManagerBuilder.create()