Code example for AllowAllHostnameVerifier

0
		try { 
			KeyStore trustStore = KeyStore.getInstance(KeyStore.getDefaultType());
			trustStore.load(null, null);
				 
			SSLSocketFactory sslf = new NoCheckSSLSocketFactory(trustStore);
			sslf.setHostnameVerifier(new AllowAllHostnameVerifier());
			schemeRegistry.register(new Scheme("https", sslf, 443));
		} 
        catch (Exception e) {
        	e.printStackTrace(System.err);
        } 
        connectionManager = 
			new ThreadSafeClientConnManager(new BasicHttpParams(), schemeRegistry);
	} 
	 
	@AfterClass 
	public static void shutdownHttpClient() { 
		connectionManager.shutdown();
	} 
 
Stop searching for code, let great code find you!  Add Codota to your java IDE