Code example for HttpsURLConnection

Methods: setHostnameVerifier, setSSLSocketFactory

0
        } 
    } 
 
    /** 
     * {@link X509TrustManager} that trusts everybody. This is used so that 
     * the client calling {@link TestWebServer#shutdown()} can issue a request 
     * for shutdown by blindly trusting the {@link TestWebServer}'s 
     * credentials. 
     */ 
    private static class TestTrustManager implements X509TrustManager {
        @Override 
        public void checkClientTrusted(X509Certificate[] chain, String authType) {
            // Trust the TestWebServer... 
        } 
 
        @Override 
        public void checkServerTrusted(X509Certificate[] chain, String authType) {
            // Trust the TestWebServer... 
        } 
 
        @Override