apucher commented on code in PR #8163: URL: https://github.com/apache/pinot/pull/8163#discussion_r934752758
########## pinot-common/src/main/java/org/apache/pinot/common/utils/TlsUtils.java: ########## @@ -339,4 +343,49 @@ public Socket createSocket(String host, int port) return _sslSocketFactory.createSocket(host, port); } } + + /** + * Builds client side SslContext based on a given TlsConfig. + * + * @param tlsConfig TLS config + */ + public static SslContext buildClientContext(TlsConfig tlsConfig) { + SslContextBuilder sslContextBuilder = + SslContextBuilder.forClient().sslProvider(SslProvider.valueOf(tlsConfig.getSslProvider())); + if (tlsConfig.getKeyStorePath() != null) { + sslContextBuilder.keyManager(TlsUtils.createKeyManagerFactory(tlsConfig)); Review Comment: should be no need for the `TlsUtils.` prefix since its the same class file now ########## pinot-common/src/main/java/org/apache/pinot/common/utils/TlsUtils.java: ########## @@ -339,4 +343,49 @@ public Socket createSocket(String host, int port) return _sslSocketFactory.createSocket(host, port); } } + + /** + * Builds client side SslContext based on a given TlsConfig. + * + * @param tlsConfig TLS config + */ + public static SslContext buildClientContext(TlsConfig tlsConfig) { + SslContextBuilder sslContextBuilder = + SslContextBuilder.forClient().sslProvider(SslProvider.valueOf(tlsConfig.getSslProvider())); + if (tlsConfig.getKeyStorePath() != null) { + sslContextBuilder.keyManager(TlsUtils.createKeyManagerFactory(tlsConfig)); Review Comment: same below a few times -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org