diff --git a/build.gradle b/build.gradle index ba70d1ff50..05d72739ea 100644 --- a/build.gradle +++ b/build.gradle @@ -698,8 +698,8 @@ dependencies { // Only osx-x86_64, osx-aarch_64, linux-x86_64, linux-aarch_64, windows-x86_64 are available if (osdetector.classifier in ["osx-x86_64", "osx-aarch_64", "linux-x86_64", "linux-aarch_64", "windows-x86_64"]) { - testImplementation "io.netty:netty-tcnative-classes:2.0.61.Final" - testImplementation "io.netty:netty-tcnative-boringssl-static:2.0.61.Final:${osdetector.classifier}" + testImplementation "io.netty:netty-tcnative-classes:2.0.66.Final" + testImplementation "io.netty:netty-tcnative-boringssl-static:2.0.66.Final:${osdetector.classifier}" } // JUnit build requirement testCompileOnly 'org.apiguardian:apiguardian-api:1.1.2' @@ -710,7 +710,7 @@ dependencies { } testRuntimeOnly 'org.scala-lang:scala-library:2.13.15' testRuntimeOnly 'com.typesafe.scala-logging:scala-logging_3:3.9.5' - testRuntimeOnly('org.apache.zookeeper:zookeeper:3.9.2') { + testRuntimeOnly('org.apache.zookeeper:zookeeper:3.9.3') { exclude(group:'ch.qos.logback', module: 'logback-classic' ) exclude(group:'ch.qos.logback', module: 'logback-core' ) } diff --git a/src/main/java/org/opensearch/security/ssl/SslSettingsManager.java b/src/main/java/org/opensearch/security/ssl/SslSettingsManager.java index 381c510894..16a05b2f55 100644 --- a/src/main/java/org/opensearch/security/ssl/SslSettingsManager.java +++ b/src/main/java/org/opensearch/security/ssl/SslSettingsManager.java @@ -23,6 +23,7 @@ import org.apache.logging.log4j.Logger; import org.opensearch.OpenSearchException; +import org.opensearch.common.Booleans; import org.opensearch.common.settings.Settings; import org.opensearch.env.Environment; import org.opensearch.security.ssl.config.CertType; @@ -374,10 +375,23 @@ void openSslWarnings(final Settings settings) { LOGGER.debug("OpenSSL available ciphers {}", OpenSsl.availableOpenSslCipherSuites()); } else { - LOGGER.warn( - "OpenSSL not available (this is not an error, we simply fallback to built-in JDK SSL) because of {}", - OpenSsl.unavailabilityCause() - ); + boolean openSslIsEnabled = false; + + if (settings.hasValue(SECURITY_SSL_HTTP_ENABLE_OPENSSL_IF_AVAILABLE) == true) { + openSslIsEnabled |= Booleans.parseBoolean(settings.get(SECURITY_SSL_HTTP_ENABLE_OPENSSL_IF_AVAILABLE)); + } + + if (settings.hasValue(SECURITY_SSL_TRANSPORT_ENABLE_OPENSSL_IF_AVAILABLE) == true) { + openSslIsEnabled |= Booleans.parseBoolean(settings.get(SECURITY_SSL_TRANSPORT_ENABLE_OPENSSL_IF_AVAILABLE)); + } + + if (openSslIsEnabled == true) { + /* only print warning if OpenSsl is enabled explicitly but not available */ + LOGGER.warn( + "OpenSSL not available (this is not an error, we simply fallback to built-in JDK SSL) because of ", + OpenSsl.unavailabilityCause() + ); + } } }