On Wed, 18 Sep 2024 11:32:01 GMT, Daniel Jeliński <djelin...@openjdk.org> wrote:
>> https://bugs.openjdk.org/browse/JDK-8331682 > > test/jdk/javax/net/ssl/TLSv13/SSLEngineNoServerHelloClientShutdown.java line > 204: > >> 202: // Server unwrap should process an unencrypted 2 byte packet, >> 203: log("---Server Unwrap user_cancelled alert---"); >> 204: serverResult = serverEngine.unwrap(cTOs, serverIn); > > does that mean that we don't throw a SSLHandshakeException on receipt of > close_notify in the middle of the handshake? Our own client code is unable to produce `close_notify` during the handshake, it sends `user_cancelled` as per RFC. If `close_notify` alert is received during handshake and it doesn't follow the `user_cancelled` alert, then we throw UNEXPECTED_MESSAGE SSLHandshakeException. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/21043#discussion_r1765118713