test: add unit test for handling of dummy EncryptedClientHello#5871
Open
autumn-night wants to merge 1 commit into
Open
test: add unit test for handling of dummy EncryptedClientHello#5871autumn-night wants to merge 1 commit into
autumn-night wants to merge 1 commit into
Conversation
jouho
reviewed
May 27, 2026
Comment on lines
+1368
to
+1369
| 0x03, | ||
| 0x03, |
Contributor
There was a problem hiding this comment.
I believe Encrypted Client Hello is only available in TLS 1.3, but this test exercises the TLS 1.2 path. Could we test this with a 1.3 ClientHello instead?
| 'r', | ||
| /* Extension type dummy ECH (0xFE0D) */ | ||
| 0xFE, | ||
| 0x0D, |
Contributor
There was a problem hiding this comment.
Could we make this a constant, e.g. TLS_EXTENSION_ENCRYPTED_CLIENT_HELLO, and add a reference to the RFC that defines it?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Goal
Add a unit test for handling a dummy ECH extension.
Why
A dummy EncryptedClientHello extension should be ignored by the server. Adding test coverage helps prevent regressions where such an extension might be misinterpreted or cause handshake failures.
How
Add a unit test that constructs a ClientHello containing a dummy ECH extension and verifies that the server ignores it and continues processing normally.
Callouts
Add a unit test that constructs a ClientHello containing a dummy ECH extension and verifies that the server ignores it and continues processing normally.
Testing
New unit test passes locally:
cd tests/unit && S2N_DONT_MLOCK=1 ../../build/bin/s2n_client_hello_test(PASSED 994 tests)
Related existing unit tests continue to pass:
ctest -L unit -R "s2n_client_hello"(5/5 passed)
Related
Closes #5697
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.