private static SSLContext createEasySSLContext(){
  SSLContext context;
  try {
    context=SSLContext.getInstance("SSL");
    context.init(null,_trustManagers,new SecureRandom());
    HttpsURLConnection.setDefaultSSLSocketFactory(context.getSocketFactory());
  }
 catch (  final GeneralSecurityException gse) {
    throw new IllegalStateException(gse.getMessage());
  }
  return context;
}

private static SSLContext createEasySSLContext ( ) { SSLContext context ; try { context = SSLContext . getInstance ( "SSL" ) ; context . init ( null , _trustManagers , new SecureRandom ( ) ) ; HttpsURLConnection . setDefaultSSLSocketFactory ( context . getSocketFactory ( ) ) ; } catch ( final GeneralSecurityException gse ) { throw new IllegalStateException ( gse . getMessage ( ) ) ; } return context ; }
create sslcontext using the trustmanager .
