am ca549d9c: am f5d758c0: Merge "Start handshake before calling hostname verifier, part 2" into mnc-dev
* commit 'ca549d9c2fa24bd322b4a75e720ab15928af0e57': 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