This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push: new 025cb59362 Avoid using APR strings since the connector has been removed 025cb59362 is described below commit 025cb59362f08bd74a2135a4e8fed630b482b0d7 Author: remm <r...@apache.org> AuthorDate: Wed Jan 24 21:12:20 2024 +0100 Avoid using APR strings since the connector has been removed --- .../org/apache/tomcat/util/net/openssl/LocalStrings.properties | 2 ++ java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java | 10 ++-------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/java/org/apache/tomcat/util/net/openssl/LocalStrings.properties b/java/org/apache/tomcat/util/net/openssl/LocalStrings.properties index db09d853fd..7823c29050 100644 --- a/java/org/apache/tomcat/util/net/openssl/LocalStrings.properties +++ b/java/org/apache/tomcat/util/net/openssl/LocalStrings.properties @@ -46,6 +46,8 @@ openssl.errApplyConf=Could not apply OpenSSLConf to SSL context openssl.errCheckConf=Error during OpenSSLConf check openssl.errMakeConf=Could not create OpenSSLConf context openssl.errorSSLCtxInit=Error initializing SSL context +openssl.failSslContextMake=Unable to create SSLContext. Check that SSLEngine is enabled in the AprLifecycleListener, the AprLifecycleListener has initialised correctly and that a valid SSLProtocol has been specified +openssl.invalidSslProtocol=An invalid value [{0}] was provided for the SSLProtocol attribute openssl.keyManagerMissing=No key manager found openssl.keyManagerMissing.warn=No key manager found. TLS will work but the certificate will not be visible to Tomcat so management/monitoring features will not work for this certificate openssl.makeConf=Creating OpenSSLConf context diff --git a/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java b/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java index 00b3ddacc3..11f15589e5 100644 --- a/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java +++ b/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java @@ -50,7 +50,6 @@ import org.apache.tomcat.jni.Pool; import org.apache.tomcat.jni.SSL; import org.apache.tomcat.jni.SSLConf; import org.apache.tomcat.jni.SSLContext; -import org.apache.tomcat.util.net.AbstractEndpoint; import org.apache.tomcat.util.net.Constants; import org.apache.tomcat.util.net.SSLHostConfig; import org.apache.tomcat.util.net.SSLHostConfig.CertificateVerification; @@ -62,9 +61,6 @@ import org.apache.tomcat.util.res.StringManager; public class OpenSSLContext implements org.apache.tomcat.util.net.SSLContext { private static final Log log = LogFactory.getLog(OpenSSLContext.class); - - // Note: this uses the main "net" package strings as many are common with APR - private static final StringManager netSm = StringManager.getManager(AbstractEndpoint.class); private static final StringManager sm = StringManager.getManager(OpenSSLContext.class); private static final String defaultProtocol = "TLS"; @@ -144,8 +140,7 @@ public class OpenSSLContext implements org.apache.tomcat.util.net.SSLContext { } else { // Should not happen since filtering to build // enabled protocols removes invalid values. - throw new Exception(netSm.getString( - "endpoint.apr.invalidSslProtocol", protocol)); + throw new Exception(sm.getString("openssl.invalidSslProtocol", protocol)); } } @@ -156,8 +151,7 @@ public class OpenSSLContext implements org.apache.tomcat.util.net.SSLContext { // If the sslEngine is disabled on the AprLifecycleListener // there will be an Exception here but there is no way to check // the AprLifecycleListener settings from here - throw new Exception( - netSm.getString("endpoint.apr.failSslContextMake"), e); + throw new Exception(sm.getString("openssl.failSslContextMake"), e); } this.negotiableProtocols = negotiableProtocols; --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org