This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new fc4547b330 Fix failure observed in local testing
fc4547b330 is described below
commit fc4547b3303cead4e0ad4802500f4b2ef0f34164
Author: Mark Thomas <[email protected]>
AuthorDate: Wed Jan 14 11:39:46 2026 +0000
Fix failure observed in local testing
---
test/org/apache/tomcat/security/TestSecurity2017Ocsp.java | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/test/org/apache/tomcat/security/TestSecurity2017Ocsp.java
b/test/org/apache/tomcat/security/TestSecurity2017Ocsp.java
index 13bc922d0f..935c67b2dc 100644
--- a/test/org/apache/tomcat/security/TestSecurity2017Ocsp.java
+++ b/test/org/apache/tomcat/security/TestSecurity2017Ocsp.java
@@ -17,6 +17,7 @@
package org.apache.tomcat.security;
import java.io.IOException;
+import java.net.SocketException;
import javax.net.ssl.SSLHandshakeException;
import javax.servlet.http.HttpServletResponse;
@@ -95,7 +96,17 @@ public class TestSecurity2017Ocsp extends OcspBaseTest {
tomcat.start();
- int rc = getUrl("https://localhost:" + getPort() + "/simple", new
ByteChunk(), false);
+ int rc;
+ try {
+ rc = getUrl("https://localhost:" + getPort() + "/simple", new
ByteChunk(), false);
+ } catch (SocketException se) {
+ // NIO2 may throw a SocketException rather than a
SSLHandshakeException
+ if
(getTomcatInstance().getConnector().getProtocolHandlerClassName().contains("Nio2"))
{
+ throw new SSLHandshakeException(se.getMessage());
+ } else {
+ throw se;
+ }
+ }
// If the TLS handshake fails, the test won't get this far.
Assert.assertEquals(HttpServletResponse.SC_OK, rc);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]