-
Bug
-
Resolution: Fixed
-
P3
-
11, 12
-
b25
-
x86_64
-
linux
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8215663 | 13 | Xuelei Fan | P3 | Resolved | Fixed | b01 |
JDK-8216093 | 12.0.1 | Xuelei Fan | P3 | Resolved | Fixed | master |
JDK-8219938 | 11.0.4-oracle | Sean Coffey | P3 | Resolved | Fixed | b01 |
JDK-8215461 | 11.0.3-oracle | Sean Coffey | P3 | Closed | Not an Issue | |
JDK-8219384 | 11.0.3 | Xuelei Fan | P3 | Resolved | Fixed | master |
JDK-8256878 | openjdk8u272 | Martin Balao Alonso | P3 | Closed | Fixed | b06 |
JDK-8243708 | 8u261 | Prasadarao Koppula | P3 | Resolved | Fixed | b05 |
JDK-8247041 | emb-8u261 | Prasadarao Koppula | P3 | Resolved | Fixed | team |
It appears that the TLS1.3-related work in OpenJDK-11 changed SSLSocketImpl.handleException to wrap underlying SocketExceptions in SSLProtocolExceptions.
Specifically, before TLS1.3 changes, handleException simply rethrows IOExceptions (here: https://github.com/unofficial-openjdk/openjdk/blob/322f09b333edd0d26594c52fab7a5346f7b40578/src/java.base/share/classes/sun/security/ssl/SSLSocketImpl.java#L1895). After TLS1.3 changes, handleException pipes a SocketException into .fatal(..) and then into Alert.UNEXPECTED_MESSAGE.createSslException which ultimately wraps the cause in an SSLProtocolException.
First, this contradicts the SSLProtocolException javadoc which says that an SSLProtocolException "Reports an error in the operation of the SSL protocol. Normally this indicates a flaw in one of the protocol implementations."
Additionally, there's existing, widely used code that relies on SocketExceptions being rethrown here. A good example is Apache HttpClient whose default retry logic excludes all SSLExceptions from being retried (see https://hc.apache.org/httpcomponents-client-ga/httpclient/xref/org/apache/http/impl/client/DefaultHttpRequestRetryHandler.html#L104).
REGRESSION : Last worked in version 10.0.2
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Please find a test that reproduces the issue here https://github.com/ogolberg/java-11-sslcontextimpl-bug
It passes on Java 10- and fails on Java 11.
- backported by
-
JDK-8215663 SSLSocketImpl erroneously wraps SocketException
- Resolved
-
JDK-8216093 SSLSocketImpl erroneously wraps SocketException
- Resolved
-
JDK-8219384 SSLSocketImpl erroneously wraps SocketException
- Resolved
-
JDK-8219938 SSLSocketImpl erroneously wraps SocketException
- Resolved
-
JDK-8243708 SSLSocketImpl erroneously wraps SocketException
- Resolved
-
JDK-8247041 SSLSocketImpl erroneously wraps SocketException
- Resolved
-
JDK-8215461 SSLSocketImpl erroneously wraps SocketException
- Closed
-
JDK-8256878 SSLSocketImpl erroneously wraps SocketException
- Closed
- relates to
-
JDK-8235263 Revert TLS 1.3 change that wrapped IOExceptions
- Resolved
-
JDK-8237578 JDK-8214339 (SSLSocketImpl wraps SocketException) appears to not be fully fixed
- Closed