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 4e4bdd9458 Align with 9.0.x
4e4bdd9458 is described below
commit 4e4bdd9458913edbbd104b211c5fe3f0e29345be
Author: Mark Thomas <[email protected]>
AuthorDate: Mon Feb 9 14:14:50 2026 +0000
Align with 9.0.x
Better handles failure modes with some newer versions of Java
---
test/org/apache/tomcat/util/net/ocsp/TestOcspSoftFail.java | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/test/org/apache/tomcat/util/net/ocsp/TestOcspSoftFail.java
b/test/org/apache/tomcat/util/net/ocsp/TestOcspSoftFail.java
index 7252f9de7e..26193ece41 100644
--- a/test/org/apache/tomcat/util/net/ocsp/TestOcspSoftFail.java
+++ b/test/org/apache/tomcat/util/net/ocsp/TestOcspSoftFail.java
@@ -16,6 +16,9 @@
*/
package org.apache.tomcat.util.net.ocsp;
+import java.net.SocketException;
+
+import javax.net.ssl.SSLException;
import javax.net.ssl.SSLHandshakeException;
import org.junit.Test;
@@ -43,6 +46,13 @@ public class TestOcspSoftFail extends OcspBaseTest {
@Test(expected = SSLHandshakeException.class)
public void testNoResponderWithoutSoftFail() throws Exception {
- doTest(false, false, ClientCertificateVerification.ENABLED, false,
Boolean.FALSE);
+ try {
+ doTest(false, false, ClientCertificateVerification.ENABLED, false,
Boolean.FALSE);
+ } catch (SocketException | SSLException e) {
+ // APR or NIO2 may throw a SocketException rather than a
SSLHandshakeException. Not observed with NIO but
+ // for consistency / just in case.
+ // Different Java versions may throw an SSLException rather than a
SSLHandshakeException
+ throw new SSLHandshakeException(e.getMessage());
+ }
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]