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

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

am 61768c97: am 3870c570: Use hostname verifier directly instead of instance DO NOT MERGE

* commit '61768c97':
  Use hostname verifier directly instead of instance DO NOT MERGE
parents 9b979448 61768c97
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -81,9 +81,6 @@ public class SSLCertificateSocketFactory extends SSLSocketFactory {
        }
    };

    private static final HostnameVerifier HOSTNAME_VERIFIER =
        HttpsURLConnection.getDefaultHostnameVerifier();

    private SSLSocketFactory mInsecureFactory = null;
    private SSLSocketFactory mSecureFactory = null;
    private TrustManager[] mTrustManagers = null;
@@ -196,7 +193,7 @@ public class SSLCertificateSocketFactory extends SSLSocketFactory {
            if (session == null) {
                throw new SSLException("Cannot verify SSL socket without session");
            }
            if (!HOSTNAME_VERIFIER.verify(hostname, session)) {
            if (!HttpsURLConnection.getDefaultHostnameVerifier().verify(hostname, session)) {
                throw new SSLPeerUnverifiedException("Cannot verify hostname: " + hostname);
            }
        }