Relax HRR consistency requirements for second client hello #4429
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of changes:
When a HelloRetryRequest is sent to a client in TLS 1.3, the RFC states that the client must send a second ClientHello that matches the first ClientHello, with a few exceptions for extensions:
https://datatracker.ietf.org/doc/html/rfc8446#section-4.1.2
While the RFC doesn't specifically state that the server must enforce this requirement, s2n-tls servers do check the second ClientHello for consistency when doing so doesn't sacrifice compatibility.
However, some noncompliant TLS 1.3 clients have been found to modify the following values in their second ClientHello:
This PR removes the consistency validation for each of these fields for increased compatibility with these clients.
Call-outs:
Modifying these fields in a second ClientHello could have unintended consequences on the state of the handshake. For example,the following RFC requirement must be upheld when a client sends a modified cipher suite list:
Additionally, new logic was added to ensure a client can't downgrade their connection below TLS 1.3 when sending a modified supported versions extension. Are there any other cases that I'm missing?
Testing:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.