This is an automated email from the ASF dual-hosted git repository.

petersomogyi pushed a commit to branch branch-3
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-3 by this push:
     new 9ddfc64500c HBASE-30172 Skip OpenSsl.isAvailable() check when OpenSSL 
is disabled by config (#8266)
9ddfc64500c is described below

commit 9ddfc64500cb17c400ae54902d43b4d527f9ba65
Author: Peter Somogyi <[email protected]>
AuthorDate: Fri May 22 12:41:40 2026 +0200

    HBASE-30172 Skip OpenSsl.isAvailable() check when OpenSSL is disabled by 
config (#8266)
    
    Signed-off-by: Wellington Chevreuil <[email protected]>
    (cherry picked from commit 27e4e78fd7f57db1c7a34a34e14e4105ade7424e)
---
 .../java/org/apache/hadoop/hbase/io/crypto/tls/X509Util.java     | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/io/crypto/tls/X509Util.java
 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/io/crypto/tls/X509Util.java
index 273cf938c87..b06d4aa0d32 100644
--- 
a/hbase-common/src/main/java/org/apache/hadoop/hbase/io/crypto/tls/X509Util.java
+++ 
b/hbase-common/src/main/java/org/apache/hadoop/hbase/io/crypto/tls/X509Util.java
@@ -226,15 +226,14 @@ public final class X509Util {
    */
   private static boolean configureOpenSslIfAvailable(SslContextBuilder 
sslContextBuilder,
     Configuration conf) {
-    if (OpenSsl.isAvailable() && conf.getBoolean(TLS_USE_OPENSSL, true)) {
+    boolean openSslEnabled = conf.getBoolean(TLS_USE_OPENSSL, true);
+    if (openSslEnabled && OpenSsl.isAvailable()) {
       LOG.debug("Using netty-tcnative to accelerate SSL handling");
       sslContextBuilder.sslProvider(SslProvider.OPENSSL);
       return true;
     } else {
-      if (LOG.isDebugEnabled()) {
-        LOG.debug("Using default JDK SSL provider because netty-tcnative is 
not {}",
-          OpenSsl.isAvailable() ? "enabled" : "available");
-      }
+      LOG.debug("Using default JDK SSL provider because netty-tcnative is not 
{}",
+        openSslEnabled ? "available" : "enabled");
       sslContextBuilder.sslProvider(SslProvider.JDK);
       return false;
     }

Reply via email to