Code example for SSLContext

Methods: getSocketFactory

	        sslContext.init(null, new TrustManager[] { tm }, null);
	    public Socket createSocket(Socket socket, String host, int port, boolean autoClose) throws IOException, UnknownHostException {
	        return sslContext.getSocketFactory().createSocket(socket, host, port, autoClose);
	    public Socket createSocket() throws IOException {
	        return sslContext.getSocketFactory().createSocket();
	// Our own HttpClient that uses the SSLSocketFactory above and modifies a few params 
	public HttpClient getNewHttpClient() {
	    try { 
	        KeyStore trustStore = KeyStore.getInstance(KeyStore.getDefaultType());
	        trustStore.load(null, null);
Contextual code suggestions in your IDE  Get Codota for Java