然后
/SSLSocketFactory socketFactory = new SSLSocketFactory(trustStore); SSLSocketFactory socketFactory = new MySSLSocketFactory(trustStore); socketFactory.setHostnameVerifier(SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER); Scheme sch = new Scheme("https", socketFactory, 8443); httpclient.getConnectionManager().getSchemeRegistry().register(sch); ...