rework ECH examples and add more#601
Open
sebastian-carpenter wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR modernizes and expands the TLS Encrypted Client Hello (ECH) examples in tls/, replacing the prior GREASE-based flow with clearer “local” and multi-tenant server patterns and updating supporting documentation/cert material.
Changes:
- Added multi-tenant ECH server examples (
server-ech-multi-sni,server-ech-multi-ctx) demonstrating inner-SNI dispatch with either per-connection cert install or mid-handshake CTX swap. - Updated local/client ECH examples and
tls/README.mdto reflect the new recommended workflows and to document ECH rejection/retry-config behavior. - Removed the deprecated/incorrect GREASE ECH probe example and refreshed various cert artifacts used by the examples.
Reviewed changes
Copilot reviewed 15 out of 21 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| tls/server-ech-multi-sni.c | New multi-tenant ECH server selecting tenant cert/key via SNI callback. |
| tls/server-ech-multi-ctx.c | New multi-tenant ECH server swapping to a tenant WOLFSSL_CTX mid-handshake (OpenSSL extra APIs). |
| tls/server-ech-local.c | Expanded comments and behavior around ECH status and minimal local ECH flow. |
| tls/README.md | Reworked ECH section to document Cloudflare flow, local flow, and multi-tenant servers. |
| tls/client-ech.c | Changed Cloudflare ECH client to take base64 ECH config arg and print retry configs on failure. |
| tls/client-ech-local.c | Updated local client to take base64 config + target SNI, perform domain verification, and print retry configs on failure. |
| tls/client-ech-grease.c | Removed GREASE probe example. |
| certs/tenant-b-cert.pem | Added tenant cert used by multi-tenant ECH servers. |
| certs/tenant-a-cert.pem | Added tenant cert used by multi-tenant ECH servers. |
| certs/server-revoked-cert.pem | Refreshed certificate contents/metadata. |
| certs/server-ecc-rsa.pem | Refreshed certificate contents/metadata. |
| certs/server-cert.pem | Refreshed certificate contents/metadata. |
| certs/ech-public-key.pem | Added key material for the ECH public name/cert pairing. |
| certs/ech-public-cert.pem | Added cert material for the ECH public name. |
| certs/ca-cert.pem | Refreshed CA certificate contents/metadata. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
sebastian-carpenter
force-pushed
the
tls-ech-examples
branch
from
July 15, 2026 22:58
99a8b46 to
515de00
Compare
sebastian-carpenter
force-pushed
the
tls-ech-examples
branch
from
July 16, 2026 20:29
515de00 to
268ee2f
Compare
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.
The GREASE ECH example was an incorrect usage of ECH, removed it.
Deprecated the server-ech-local example but did keep it since it is nice and simple.
Updated the other examples to be more robust and to use features added recently. Improved comments throughout.
Added examples for multi-tenant ECH: server-ech-multi-sni, server-ech-multi-ctx
Updated README.md to reflect current state of ECH examples
Depends on: wolfSSL/wolfssl#10913