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 a810be5a10 Only tomcat-native needs the extra initializeSSL call
a810be5a10 is described below
commit a810be5a10ae950b3f45661f5d51b68dd297c5f1
Author: remm <[email protected]>
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: [email protected]
For additional commands, e-mail: [email protected]