question: private static void _trustAllHttpsCertificates ( ) { SSLContext context ; if ( _trustManagers == null ) { _trustManagers = new TrustManager [ ] { new FakeX509TrustManager ( ) } ; } try { context = SSLContext . getInstance ( "SSL" ) ; context . init ( null , _trustManagers , new SecureRandom ( ) ) ; } catch ( GeneralSecurityException gse ) { throw new IllegalStateException ( gse . getMessage ( ) ) ; } HttpsURLConnection . setDefaultSSLSocketFactory ( context . getSocketFactory ( ) ) ; }
target:  Set the default X509 Trust Manager to an instance of a fake class that trust all certificates, even the self-signed ones.