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 a460a41c9d Fix failure observed in local testing
a460a41c9d is described below
commit a460a41c9d6363b59d8b7bde36d297a3c3ba1d45
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 3da985ae59..e255f02948 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;
@@ -96,7 +97,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]