Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ca549d9c authored by Kenny Root's avatar Kenny Root Committed by Android Git Automerger
Browse files

am f5d758c0: Merge "Start handshake before calling hostname verifier, part 2" into mnc-dev

* commit 'f5d758c0':
  Start handshake before calling hostname verifier, part 2
parents 9e957b1b f5d758c0
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
@@ -397,6 +397,14 @@ public class SSLSocketFactory implements LayeredSocketFactory {
              port,
              port,
              autoClose
              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);
        hostnameVerifier.verify(host, sslSocket);
        // verifyHostName() didn't blowup - good!
        // verifyHostName() didn't blowup - good!
        return sslSocket;
        return sslSocket;