code: public static SSLContext buildSSLContext(HttpClientConfig config) throws IOException, GeneralSecurityException {
  
      KeyManagerFactory kmf = null;
      if (isSslKeyManagerEnabled(config)) {
        kmf = getKeyManagerFactory(config.getKeyStorePath(),
            new StoreProperties(config.getKeyStorePassword(), config.getKeyManagerType(),
                config.getKeyStoreType(), config.getKeyStoreProvider()));
      }
      TrustManagerFactory tmf = null;
      if (isSslTrustStoreEnbaled(config)) {
        tmf = getTrustManagerFactory(config.getTrustStorePath(), new StoreProperties(config.getTrustStorePassword(),
            config.getTrustManagerType(), config.getTrustStoreType(), config.getTrustStoreProvider()));
      }
  
      SSLContext sslContext = SSLContext.getInstance(config.getSslContextType());
      sslContext.init(kmf != null ? kmf.getKeyManagers() : null,
          tmf != null ? tmf.getTrustManagers() : null,
          null);
  
      return sslContext;
    }
docs: Build SSL Socket factory.
  @param config Http client configuration
  @return SSL socket factory.
  @throws IOException
  @throws GeneralSecurityException