private static SSLSocketFactory createSocketFactory ( Ssl context ) { try { return context . newFactory ( new AlwaysTrustManager ( ) ) ; } catch ( Exception e ) { throw new IllegalStateException ( "Fail to build SSL factory" , e ) ; } }
Trust all certificates