Issue #3154 - Add support for javax.net.ssl.HostnameVerifier to HttpClient.

Fixed compilation errors after merge.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
This commit is contained in:
Simone Bordet 2019-02-07 16:24:22 +01:00
parent 6d44b13945
commit a005bfd360
1 changed files with 2 additions and 1 deletions

View File

@ -143,7 +143,8 @@ public class SslClientConnectionFactory implements ClientConnectionFactory
HostnameVerifier verifier = sslContextFactory.getHostnameVerifier();
if (verifier != null)
{
String host = (String)context.get(SSL_PEER_HOST_CONTEXT_KEY);
InetSocketAddress address = (InetSocketAddress)context.get(ClientConnector.SOCKET_ADDRESS_CONTEXT_KEY);
String host = address.getHostString();
try
{
if (!verifier.verify(host, event.getSSLEngine().getSession()))