Recently posted a question regarding the HttpClient
over Https (found here). I\'ve made some headway, but I\'ve run into new issues. As with my last problem, I
The code above in https://stackoverflow.com/a/6378872/1553004 is correct, except it MUST also call the hostname verifier:
@Override
public Socket createSocket(Socket socket, String host, int port, boolean autoClose) throws IOException {
SSLSocket sslSocket = (SSLSocket)sslContext.getSocketFactory().createSocket(socket, host, port, autoClose);
getHostnameVerifier().verify(host, sslSocket);
return sslSocket;
}
I signed up to stackoverflow expressly to add this fix. Heed my warning!