Issue #2817 - Client SSL Defaults
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
This commit is contained in:
parent
a6c071e5e9
commit
ce6bc23ccb
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -45,6 +45,8 @@ class DefaultHttpClientProvider
|
|||
if (sslContextFactory == null)
|
||||
{
|
||||
sslContextFactory = new SslContextFactory();
|
||||
sslContextFactory.setTrustAll(false);
|
||||
sslContextFactory.setEndpointIdentificationAlgorithm("HTTPS");
|
||||
}
|
||||
|
||||
HttpClient client = new HttpClient(sslContextFactory);
|
||||
|
|
Loading…
Reference in New Issue