You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2026/01/13 11:35:18 UTC

(tomcat) 02/02: Use same fix for NIO2 as 9.0.x

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

commit 270da82263eb575cf4640a1d95dbc53e8e282b76
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Tue Jan 13 11:34:25 2026 +0000

    Use same fix for NIO2 as 9.0.x
---
 test/org/apache/tomcat/util/net/ocsp/TestOcspIntegration.java | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/test/org/apache/tomcat/util/net/ocsp/TestOcspIntegration.java b/test/org/apache/tomcat/util/net/ocsp/TestOcspIntegration.java
index 4d955d4b2b..f87035d400 100644
--- a/test/org/apache/tomcat/util/net/ocsp/TestOcspIntegration.java
+++ b/test/org/apache/tomcat/util/net/ocsp/TestOcspIntegration.java
@@ -318,7 +318,15 @@ public class TestOcspIntegration extends TomcatBaseTest {
             }
             connection.setSSLSocketFactory(sslSocketFactory);
             connection.connect();
-            return connection.getResponseCode();
+            try {
+                return connection.getResponseCode();
+            } catch (IOException ioe) {
+                if (tomcat.getConnector().getProtocolHandlerClassName().contains("Nio2")) {
+                    throw new SSLHandshakeException(ioe.getMessage());
+                } else {
+                    throw ioe;
+                }
+            }
         } finally {
             tomcat.stop();
         }


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org