Issue #2817 - Client SSL Defaults

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
This commit is contained in:
Joakim Erdfelt 2018-08-16 14:35:39 -05:00
parent a6c071e5e9
commit ce6bc23ccb
2 changed files with 7 additions and 0 deletions

View File

@ -179,6 +179,11 @@ public class HttpClient extends ContainerLifeCycle
public HttpClient(HttpClientTransport transport, SslContextFactory sslContextFactory)
{
this.transport = transport;
if (sslContextFactory == null)
{
sslContextFactory = new SslContextFactory(false);
sslContextFactory.setEndpointIdentificationAlgorithm("HTTPS");
}
this.sslContextFactory = sslContextFactory;
}

View File

@ -45,6 +45,8 @@ class DefaultHttpClientProvider
if (sslContextFactory == null)
{
sslContextFactory = new SslContextFactory();
sslContextFactory.setTrustAll(false);
sslContextFactory.setEndpointIdentificationAlgorithm("HTTPS");
}
HttpClient client = new HttpClient(sslContextFactory);