nv-websocket-client
nv-websocket-client copied to clipboard
Can't verify hostname after ssl connection handshake
There is no way to verify ssl connection hostname now like in https://developer.android.com/training/articles/security-ssl.html#CommonProblems
Is there is a way to specify HostnameVerifier somehow?
Probably you can do it by preparing your own SSLContext
which verifies hostname and setting it to WebSocketFactory
using WebSocketFactory.setSSLContext()
method.
You can find an example of setSSLContext()
in README.md
. NaiveSSLContext.java
is an example showing how to create an SSLContext
which does not perform any verification at all.
This is solved by my pull request that was merged in version 2.1. Now it works properly by default.