code: public void init() throws Exception {
      // configure the SSLContext with a TrustManager
      SSLContext ctx = SSLContext.getInstance("TLS");
      if (ignoreCertificates) {
        ctx.init(new KeyManager[0],
            new TrustManager[] { new DefaultTrustManager() }, new SecureRandom());
        SSLContext.setDefault(ctx);
      }
      HostnameVerifier hv = new IgnoreHostName();
      HttpsURLConnection.setDefaultHostnameVerifier(hv);
    }
docs: initialize this wiki