CI Addition (ECH): Check only the public SNI is visible#10542
Open
sebastian-carpenter wants to merge 1 commit into
Open
CI Addition (ECH): Check only the public SNI is visible#10542sebastian-carpenter wants to merge 1 commit into
sebastian-carpenter wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug in ECH (Encrypted Client Hello) outer ClientHello handling so that the public SNI is always substituted into the outer ClientHello (regardless of echAccepted state or innerCount), preventing leakage of the private SNI on the wire. A corresponding wire-bytes test is added.
Changes:
- Simplify the condition in
TLSX_EchChangeSNIto swap the SNI whenever the ECH extension type isECH_TYPE_OUTER. - Add
test_wolfSSL_Tls13_ECH_wire_snicovering both ECH-accept and ECH-reject paths, forcing a HelloRetryRequest and asserting the public name appears and the private name does not appear on the wire for both CH1 and CH2.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/tls.c | Always swap SNI to the public name when processing the outer ClientHello, removing extra gating conditions. |
| tests/api.c | New ECH wire-SNI test (accept + reject paths with HRR) registered in testCases. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
retest this please |
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.
Description
Added a test to check that the SNI in the outer ClientHello is always the public SNI. Other checks exist to verify the inner SNI is correct.
Corrected
TLSX_EchChangeSNIto always swap the SNI when it is processing the outer hello.Testing
Added
test_wolfSSL_Tls13_ECH_wire_sniwhich forces a HelloRetryRequest with either ech rejection or acceptance.Checklist