code: @Nonnull
      public static SSLSocketFactory getTrustAllSSLSocketFactory() {
          try {
              SSLContext sslContext = SSLContext.getInstance("SSL");
  
              sslContext.init(null, new TrustManager[]{new TrustAllX509TrustManager()}, null);
              return sslContext.getSocketFactory();
          } catch (NoSuchAlgorithmException e) {
              throw new IllegalStateException(e);
          } catch (KeyManagementException e) {
              throw new IllegalStateException(e);
          }
      }
docs: Build an {@link SSLSocketFactory} that trusts all the X509 certificates.
  
  @return the created {@link SSLSocketFactory}