You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2024/07/01 17:11:54 UTC
(tomcat) branch main updated: Fix TLS test with Tomcat Native
This is an automated email from the ASF dual-hosted git repository.
markt 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 e88233a1d3 Fix TLS test with Tomcat Native
e88233a1d3 is described below
commit e88233a1d31a1b744842abfe1029f9266b43a7db
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Mon Jul 1 18:11:31 2024 +0100
Fix TLS test with Tomcat Native
---
test/org/apache/tomcat/util/net/TestClientCertTls13.java | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/test/org/apache/tomcat/util/net/TestClientCertTls13.java b/test/org/apache/tomcat/util/net/TestClientCertTls13.java
index 4ccbc594d6..5f8555b1c8 100644
--- a/test/org/apache/tomcat/util/net/TestClientCertTls13.java
+++ b/test/org/apache/tomcat/util/net/TestClientCertTls13.java
@@ -28,6 +28,8 @@ import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameter;
+import org.apache.catalina.Lifecycle;
+import org.apache.catalina.LifecycleEvent;
import org.apache.catalina.connector.Connector;
import org.apache.catalina.core.AprStatus;
import org.apache.catalina.startup.Tomcat;
@@ -51,11 +53,11 @@ public class TestClientCertTls13 extends TomcatBaseTest {
public static Collection<Object[]> parameters() {
List<Object[]> parameterSets = new ArrayList<>();
parameterSets.add(new Object[] {
- "JSSE", Boolean.FALSE, "org.apache.tomcat.util.net.jsse.JSSEImplementation"});
+ "JSSE", Boolean.FALSE, "org.apache.tomcat.util.net.jsse.JSSEImplementation", Boolean.FALSE});
parameterSets.add(new Object[] {
- "OpenSSL", Boolean.TRUE, "org.apache.tomcat.util.net.openssl.OpenSSLImplementation"});
+ "OpenSSL", Boolean.TRUE, "org.apache.tomcat.util.net.openssl.OpenSSLImplementation", Boolean.TRUE});
parameterSets.add(new Object[] {
- "OpenSSL-FFM", Boolean.TRUE, "org.apache.tomcat.util.net.openssl.panama.OpenSSLImplementation"});
+ "OpenSSL-FFM", Boolean.TRUE, "org.apache.tomcat.util.net.openssl.panama.OpenSSLImplementation", Boolean.FALSE});
return parameterSets;
}
@@ -69,6 +71,9 @@ public class TestClientCertTls13 extends TomcatBaseTest {
@Parameter(2)
public String sslImplementationName;
+ @Parameter(3)
+ public boolean initSslImplementation;
+
@Test
public void testClientCertGet() throws Exception {
@@ -110,6 +115,11 @@ public class TestClientCertTls13 extends TomcatBaseTest {
TesterSupport.configureSSLImplementation(tomcat, sslImplementationName, useOpenSSL);
if (useOpenSSL) {
+ // getOpenSSLVersion() requires that the listener has been initialised
+ if (initSslImplementation) {
+ tomcat.getServer().findLifecycleListeners()[0].lifecycleEvent(
+ new LifecycleEvent(tomcat.getServer(), Lifecycle.BEFORE_INIT_EVENT, null));
+ }
Assume.assumeTrue(AprStatus.getOpenSSLVersion() >= 0x1010100f || OpenSSLStatus.getVersion() >= 0x1010100f);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org