stoty commented on code in PR #2270: URL: https://github.com/apache/zookeeper/pull/2270#discussion_r2212148314
########## zookeeper-server/src/main/java/org/apache/zookeeper/common/ClientX509Util.java: ########## @@ -79,7 +79,11 @@ public SslContext createNettySslContextForClient(ZKConfig config) sslContextBuilder.trustManager(tm); } - sslContextBuilder.enableOcsp(config.getBoolean(getSslOcspEnabledProperty())); + SslProvider sslProvider = getSslProvider(config); + sslContextBuilder.sslProvider(sslProvider); + if (sslProvider == SslProvider.OPENSSL || sslProvider == SslProvider.OPENSSL_REFCNT) { Review Comment: OpenSsl.isAvailable() is completely irrelevant. It only tells if the OpenSSL provider is present on the classpath (perhaps with some sanity checks). We COULD make a different check for it, but Netty will handle this and error out anyway (whether enableOcsp is called or not), so I don't see any added value. **The actual error that we want to fix is the error that we get when netty is configured to use the JRE PROVIDER and we're calling enableOCSP().** I have some doubts about whether OpenSSL.enableOcsp() does what we would expect it to do, but as this is the API we have, we should use it. Even if it returns a wrong result (i.e. true for BoringSSL), that only means that the setting will be silently ignored. We can't fix that from our side. -- 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: notifications-unsubscr...@zookeeper.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org