On Wed, 18 Sep 2024 11:40:27 GMT, Daniel Jeliński <djelin...@openjdk.org> wrote:

> Should the client send a close_notify if the connection is closed in the 
> middle of the handshake? I couldn't find a good answer in the TLS1.3 spec, 
> but I'd assume that closing the connection without sending a close_notify 
> would be good enough.

It SHOULD send a `close_notify` after `user_canceled` during handshake per RFC 
and that's what we do in `TransportContext.java#closeNotify`

> Should the server throw a handshake exception when the handshake is aborted?

I don't think the server should throw an exception if handshake is properly 
closed as per RFC. 

> Will the server throw the right exception if the client aborts the connection 
> for a different reason (like a server_hello that fails to decode correctly)?

We are not changing the way we deal with this. This change is about preventing 
a decryption exception when unencrypted alert is received during handshake.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/21043#issuecomment-2359404808

Reply via email to