This is an automated email from the ASF dual-hosted git repository.
remm 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 fd3159ebad Use SSLException when handshake failed and nothing can get
read/written
fd3159ebad is described below
commit fd3159ebad046faecc1a9883139baca419bdf4c8
Author: remm <[email protected]>
AuthorDate: Thu Mar 12 17:12:25 2026 +0100
Use SSLException when handshake failed and nothing can get read/written
---
java/org/apache/tomcat/util/net/openssl/panama/OpenSSLEngine.java | 4 ++--
webapps/docs/changelog.xml | 4 ++++
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLEngine.java
b/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLEngine.java
index 5b6f648cdf..308d7d7653 100644
--- a/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLEngine.java
+++ b/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLEngine.java
@@ -413,7 +413,7 @@ public final class OpenSSLEngine extends SSLEngine
implements SSLUtil.ProtocolIn
}
if (bytesWritten == 0) {
- throw new
IllegalStateException(sm.getString("engine.failedToWriteBytes"));
+ throw new
SSLException(sm.getString("engine.failedToWriteBytes"));
}
// Check to see if the engine wrote data into the network BIO
@@ -541,7 +541,7 @@ public final class OpenSSLEngine extends SSLEngine
implements SSLUtil.ProtocolIn
if (bytesRead == 0) {
// This should not be possible. pendingApp is positive
// therefore the read should have read at least one byte.
- throw new
IllegalStateException(sm.getString("engine.failedToReadAvailableBytes"));
+ throw new
SSLException(sm.getString("engine.failedToReadAvailableBytes"));
}
bytesProduced += bytesRead;
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 1e8ee4340e..a17109b7f6 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -217,6 +217,10 @@
<fix>
Free certificate chain if an error occurs, in the FFM code. (remm)
</fix>
+ <fix>
+ Report handshake issues as <code>SSLException</code> in the FFM
+ code, rather than <code>IllegalStateException</code>. (remm)
+ </fix>
</changelog>
</subsection>
<subsection name="Jasper">
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]