This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 11.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/11.0.x by this push:
new 225f9c566a Align with 10.1.x
225f9c566a is described below
commit 225f9c566ae62906c879d0f3b135edf456c488ce
Author: Mark Thomas <[email protected]>
AuthorDate: Mon Jan 19 15:55:30 2026 +0000
Align with 10.1.x
---
test/org/apache/tomcat/util/net/ocsp/TestOcspTimeout.java | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/test/org/apache/tomcat/util/net/ocsp/TestOcspTimeout.java
b/test/org/apache/tomcat/util/net/ocsp/TestOcspTimeout.java
index 0744b094f3..290b08822a 100644
--- a/test/org/apache/tomcat/util/net/ocsp/TestOcspTimeout.java
+++ b/test/org/apache/tomcat/util/net/ocsp/TestOcspTimeout.java
@@ -17,6 +17,7 @@
package org.apache.tomcat.util.net.ocsp;
import java.net.SocketException;
+import java.net.SocketTimeoutException;
import javax.net.ssl.SSLHandshakeException;
@@ -64,13 +65,9 @@ public class TestOcspTimeout extends OcspBaseTest {
public void testTimeoutWithoutSoftFail() throws Exception {
try {
doTest(false, false, ClientCertificateVerification.ENABLED, false,
Boolean.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;
- }
+ } catch (SocketTimeoutException | SocketException e) {
+ // May throw a SocketTimeoutException or SocketException rather
than a SSLHandshakeException
+ throw new SSLHandshakeException(e.getMessage());
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]