Code example for SSLSocketFactory

0
    } 
 
    public static SSLSocketFactory getInstance() throws KeyManagementException, 
            UnrecoverableKeyException, NoSuchAlgorithmException, 
            KeyStoreException { 
        return new SSLSocketFactory(new TrustStrategy() { 
            public boolean isTrusted(final X509Certificate[] chain, 
                                     final String auth) throws CertificateException { 
                return true; 
            } 
 
        }, SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER); 
    } 
}