405313 - Websocket client SSL hostname verification is broken, always defaults to raw IP as String
+ After discussion with simone, we have changed from using IP address to hostnames in both websocket and spdy.
This commit is contained in:
parent
d553f9f907
commit
02de232411
|
@ -143,7 +143,7 @@ public class SPDYClient
|
|||
|
||||
protected SSLEngine newSSLEngine(SslContextFactory sslContextFactory, SocketChannel channel)
|
||||
{
|
||||
String peerHost = channel.socket().getInetAddress().getHostAddress();
|
||||
String peerHost = channel.socket().getInetAddress().getHostName();
|
||||
int peerPort = channel.socket().getPort();
|
||||
SSLEngine engine = sslContextFactory.newSSLEngine(peerHost, peerPort);
|
||||
engine.setUseClientMode(true);
|
||||
|
|
|
@ -104,7 +104,7 @@ public class WebSocketClientSelectorManager extends SelectorManager
|
|||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
LOG.debug(e);
|
||||
LOG.ignore(e);
|
||||
connectPromise.failed(e);
|
||||
// rethrow
|
||||
throw e;
|
||||
|
@ -120,7 +120,7 @@ public class WebSocketClientSelectorManager extends SelectorManager
|
|||
|
||||
public SSLEngine newSSLEngine(SslContextFactory sslContextFactory, SocketChannel channel)
|
||||
{
|
||||
String peerHost = channel.socket().getInetAddress().getHostAddress();
|
||||
String peerHost = channel.socket().getInetAddress().getHostName();
|
||||
int peerPort = channel.socket().getPort();
|
||||
SSLEngine engine = sslContextFactory.newSSLEngine(peerHost,peerPort);
|
||||
engine.setUseClientMode(true);
|
||||
|
|
Loading…
Reference in New Issue