code: private SslContext getSslContext() {
          final SslContext sslCtx;
          if (clientConfig.isEnableTls()) {
              try {
                  SslContextBuilder clientSslCtxBuilder = SslContextBuilder.forClient();
                  if (Strings.isNullOrEmpty(clientConfig.getTrustStore())) {
                      clientSslCtxBuilder = clientSslCtxBuilder.trustManager(FingerprintTrustManagerFactory
                                                                                     .getInstance(FingerprintTrustManagerFactory.getDefaultAlgorithm()));
                      log.debug("SslContextBuilder was set to an instance of {}", FingerprintTrustManagerFactory.class);
                  } else {
                      clientSslCtxBuilder = SslContextBuilder.forClient()
                                                             .trustManager(new File(clientConfig.getTrustStore()));
                  }
                  sslCtx = clientSslCtxBuilder.build();
              } catch (SSLException | NoSuchAlgorithmException e) {
                  throw new RuntimeException(e);
              }
          } else {
              sslCtx = null;
          }
          return sslCtx;
      }
docs: Obtain {@link SslContext} based on {@link ClientConfig}.