Code example for BrowserCompatHostnameVerifier

0
            TrustManager[] tms = new TrustManager[] { trustMgr };
                 
            SSLContext sslContext = SSLContext.getInstance("TLS");
            sslContext.init(null, tms, null);
                     
            mHostnameVerifier = new BrowserCompatHostnameVerifier();
            mAdvancedSslSocketFactory = new AdvancedSslSocketFactory(sslContext, trustMgr, mHostnameVerifier);
        } 
        return mAdvancedSslSocketFactory;
    } 
 
 
    private static String LOCAL_TRUSTSTORE_FILENAME = "knownServers.bks";
     
    private static String LOCAL_TRUSTSTORE_PASSWORD = "password";
 
    private static KeyStore mKnownServersStore = null;
     
    /** 
     * Returns the local store of reliable server certificates, explicitly accepted by the user. 
     *