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

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


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

commit 271527e8ea46b03da44f3550b0685750ebce06c5
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 37f6222844f..b378d41cf8a 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
@@ -308,15 +308,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