Re: (tomcat) branch main updated: Remove MacOS workaround
On 28/06/2024 13:25, r...@apache.org wrote: 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 61f8c08253 Remove MacOS workaround 61f8c08253 is described below commit 61f8c08253746733f73209522f37182a9d672bd1 Author: remm AuthorDate: Fri Jun 28 14:24:47 2024 +0200 Remove MacOS workaround I'm afraid I am going to need to make further changes to this. The issue appears to be that SymbolLookup.libraryLookup(System.mapLibraryName("ssl"), LIBRARY_ARENA) ignores java.library.path That in turns causes crashes (at least in the tests) when it tries to load the LibreSSL implementation that ships with MacOS. I think we need to go back to the version that was MacOS specific and used System.loadLibrary("ssl"); I am also seeing an issue where the TLS 1.3 client cert test that requires BEFORE_INIT_EVENT to be called on the listener before the test. I have these changes working locally on my M1 mac but they need cleaning up. My plan is to do the clean-up, test on my M1, commit and then test on MacOS Intel, Linux and Windows. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: (tomcat) branch main updated: Remove MacOS workaround
On Mon, Jul 1, 2024 at 5:00 PM Mark Thomas wrote: > > On 28/06/2024 13:25, r...@apache.org wrote: > > 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 61f8c08253 Remove MacOS workaround > > 61f8c08253 is described below > > > > commit 61f8c08253746733f73209522f37182a9d672bd1 > > Author: remm > > AuthorDate: Fri Jun 28 14:24:47 2024 +0200 > > > > Remove MacOS workaround > > I'm afraid I am going to need to make further changes to this. > > The issue appears to be that > SymbolLookup.libraryLookup(System.mapLibraryName("ssl"), LIBRARY_ARENA) > ignores java.library.path > > That in turns causes crashes (at least in the tests) when it tries to > load the LibreSSL implementation that ships with MacOS. > > I think we need to go back to the version that was MacOS specific and > used System.loadLibrary("ssl"); Ok. After testing it didn't seem to me like it was adding anything since it's not really a crash. > I am also seeing an issue where the TLS 1.3 client cert test that > requires BEFORE_INIT_EVENT to be called on the listener before the test. Not sure I understand, the one in TestOpenSSLConf needed it, but I didn't notice anything wrong with TestClientCertTls13. Feel free to add it if needed. Rémy > I have these changes working locally on my M1 mac but they need cleaning > up. My plan is to do the clean-up, test on my M1, commit and then test > on MacOS Intel, Linux and Windows. > > Mark > > - > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 10.1.x 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 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 abb9d6fe01 Fix TLS test with Tomcat Native abb9d6fe01 is described below commit abb9d6fe01ad6f6140ea6d4ddcaf03c3601c5283 Author: Mark Thomas 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 parameters() { List 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-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(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 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 parameters() { List 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-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org