Skip to content

CI Addition (ECH): Check only the public SNI is visible#10542

Open
sebastian-carpenter wants to merge 1 commit into
wolfSSL:masterfrom
sebastian-carpenter:public-sni-test
Open

CI Addition (ECH): Check only the public SNI is visible#10542
sebastian-carpenter wants to merge 1 commit into
wolfSSL:masterfrom
sebastian-carpenter:public-sni-test

Conversation

@sebastian-carpenter
Copy link
Copy Markdown
Contributor

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_EchChangeSNI to always swap the SNI when it is processing the outer hello.

Testing

Added test_wolfSSL_Tls13_ECH_wire_sni which forces a HelloRetryRequest with either ech rejection or acceptance.

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

@sebastian-carpenter sebastian-carpenter self-assigned this May 27, 2026
Copilot AI review requested due to automatic review settings May 27, 2026 16:18
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_EchChangeSNI to swap the SNI whenever the ECH extension type is ECH_TYPE_OUTER.
  • Add test_wolfSSL_Tls13_ECH_wire_sni covering 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.

@sebastian-carpenter sebastian-carpenter marked this pull request as ready for review May 27, 2026 16:50
@github-actions
Copy link
Copy Markdown

retest this please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants