You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2024/06/27 09:08:47 UTC
(tomcat) branch 10.1.x updated: Only tomcat-native needs the extra initializeSSL call
This is an automated email from the ASF dual-hosted git repository.
remm pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.1.x by this push:
new 9091500a81 Only tomcat-native needs the extra initializeSSL call
9091500a81 is described below
commit 9091500a815e3ba9c3370478fe6a9b7aba353aef
Author: remm <re...@apache.org>
AuthorDate: Thu Jun 27 11:06:55 2024 +0200
Only tomcat-native needs the extra initializeSSL call
---
test/org/apache/tomcat/util/net/openssl/TestOpenSSLConf.java | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/test/org/apache/tomcat/util/net/openssl/TestOpenSSLConf.java b/test/org/apache/tomcat/util/net/openssl/TestOpenSSLConf.java
index aa429ca917..cbf957d195 100644
--- a/test/org/apache/tomcat/util/net/openssl/TestOpenSSLConf.java
+++ b/test/org/apache/tomcat/util/net/openssl/TestOpenSSLConf.java
@@ -86,21 +86,19 @@ public class TestOpenSSLConf extends TomcatBaseTest {
Assert.assertTrue(tomcat.getConnector().setProperty("sslImplementationName", sslImplementationName));
- LifecycleListener listener = null;
if (OpenSSLImplementation.class.getName().equals(sslImplementationName)) {
- listener = new AprLifecycleListener();
+ LifecycleListener listener = new AprLifecycleListener();
Assume.assumeTrue(AprLifecycleListener.isAprAvailable());
StandardServer server = (StandardServer) tomcat.getServer();
server.addLifecycleListener(listener);
+ // Initialize only the listener as the OpenSSL version is not available before initializeSSL
+ listener.lifecycleEvent(new LifecycleEvent(tomcat.getServer(), Lifecycle.BEFORE_INIT_EVENT, null));
} else if ("org.apache.tomcat.util.net.openssl.panama.OpenSSLImplementation".equals(sslImplementationName)) {
- listener = new OpenSSLLifecycleListener();
+ LifecycleListener listener = new OpenSSLLifecycleListener();
Assume.assumeTrue(OpenSSLLifecycleListener.isAvailable());
StandardServer server = (StandardServer) tomcat.getServer();
server.addLifecycleListener(listener);
}
- Assert.assertNotNull("Test configuragiton error: Invalid sslImplementationName", listener);
- // Initialize only the listener as the OpenSSL version is not available before
- listener.lifecycleEvent(new LifecycleEvent(tomcat.getServer(), Lifecycle.BEFORE_INIT_EVENT, null));
}
private SSLHostConfig initOpenSSLConfCmd(String... commands) throws Exception {
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org