am f5d758c0: Merge "Start handshake before calling hostname verifier, part 2" into mnc-dev
* commit 'f5d758c006c278d166f22587f3deb9a63bdf4e4b': Start handshake before calling hostname verifier, part 2
This commit is contained in:
@@ -397,6 +397,14 @@ public class SSLSocketFactory implements LayeredSocketFactory {
|
||||
port,
|
||||
autoClose
|
||||
);
|
||||
// BEGIN android-added
|
||||
/*
|
||||
* Make sure we have started the handshake before verifying.
|
||||
* Otherwise when we go to the hostname verifier, it directly calls
|
||||
* SSLSocket#getSession() which swallows SSL handshake errors.
|
||||
*/
|
||||
sslSocket.startHandshake();
|
||||
// END android-added
|
||||
hostnameVerifier.verify(host, sslSocket);
|
||||
// verifyHostName() didn't blowup - good!
|
||||
return sslSocket;
|
||||
|
||||
Reference in New Issue
Block a user