code: public static SSLContext initSslContext(
        SSLContext sslContext, KeyStore trustStore, TrustManagerFactory trustManagerFactory)
        throws GeneralSecurityException {
      trustManagerFactory.init(trustStore);
      sslContext.init(null, trustManagerFactory.getTrustManagers(), null);
      return sslContext;
    }
docs: Initializes the SSL context to the trust managers supplied by the trust manager factory for the
  given trust store.
  
  @param sslContext SSL context (for example {@link SSLContext#getInstance})
  @param trustStore key store for certificates to trust (for example {@link
  SecurityUtils#getJavaKeyStore()})
  @param trustManagerFactory trust manager factory (for example {@link
  #getPkixTrustManagerFactory()})
  @since 1.14