Skip to content

rework ECH examples and add more#601

Open
sebastian-carpenter wants to merge 1 commit into
wolfSSL:masterfrom
sebastian-carpenter:tls-ech-examples
Open

rework ECH examples and add more#601
sebastian-carpenter wants to merge 1 commit into
wolfSSL:masterfrom
sebastian-carpenter:tls-ech-examples

Conversation

@sebastian-carpenter

@sebastian-carpenter sebastian-carpenter commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

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

  • Added cert/keys for these examples and updated some that were old.

Updated README.md to reflect current state of ECH examples

Depends on: wolfSSL/wolfssl#10913

@sebastian-carpenter sebastian-carpenter self-assigned this Jul 15, 2026
Copilot AI review requested due to automatic review settings July 15, 2026 18:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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.md to 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.

Comment thread tls/server-ech-multi-sni.c
Comment thread tls/server-ech-multi-sni.c Outdated
Comment thread tls/server-ech-multi-sni.c Outdated
Comment thread tls/server-ech-multi-ctx.c
Comment thread tls/server-ech-multi-ctx.c
Comment thread tls/client-ech.c
Comment thread tls/client-ech.c Outdated
Comment thread tls/client-ech-local.c
Comment thread tls/client-ech-local.c Outdated
Comment thread certs/ech-public-key.pem

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 15 out of 21 changed files in this pull request and generated 12 comments.

Comment thread tls/server-ech-multi-sni.c
Comment thread tls/server-ech-multi-ctx.c
Comment thread tls/server-ech-local.c
Comment thread tls/server-ech-multi-sni.c
Comment thread tls/server-ech-multi-ctx.c
Comment thread tls/client-ech-local.c
Comment thread certs/ech-public-key.pem
Comment thread tls/client-ech.c
Comment thread tls/server-ech-local.c Outdated
Comment thread tls/client-ech-local.c Outdated
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.

2 participants