TLS ECH Testing Improvements#9737
TLS ECH Testing Improvements#9737sebastian-carpenter wants to merge 7 commits intowolfSSL:masterfrom
Conversation
dee5c47 to
740c55f
Compare
dgarske
left a comment
There was a problem hiding this comment.
Code looks good. I'd like this PR to include testing as well. I don't see any. Thanks
740c55f to
1e03e2f
Compare
I've added testing in api.c. Let me know if there's any tests you disagree with or which I should add. I'll be making the github workflow to test against ECH enabled openssl s_client in the meantime. |
375fbf9 to
97ba44b
Compare
97ba44b to
54dca48
Compare
54dca48 to
40e728e
Compare
40e728e to
fad33e9
Compare
|
Jenkins retest this please. Appears all passed, but FIPS 140-3 test reports failed. I don't think its an issue with this PR |
There was a problem hiding this comment.
Pull request overview
This PR implements significant improvements to TLS 1.3 Encrypted Client Hello (ECH) functionality in wolfSSL. The changes address a confirmation value mismatch issue when connecting to Cloudflare's ECH implementation and add extensive testing infrastructure.
Changes:
- Refactored ECH transcript hash handling to fix HelloRetryRequest confirmation calculation
- Added support for OuterExtensions extension to enable OpenSSL s_client interoperability
- Removed
ssl->options.useEchflag in favor of checkingssl->echConfigs != NULL - Implemented private SNI verification with new state machine tracking
- Added comprehensive test suite including GitHub Actions workflow for OpenSSL ECH interoperability
- Fixed multiple spec compliance issues and improved config management
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| wolfssl/ssl.h | Changed echConfigs64 parameter to const char* for const-correctness |
| wolfssl/internal.h | Added TLSXT_ECH_OUTER_EXTENSIONS constant, EchStateSNI enum, privateName field to WOLFSSL_ECH struct, removed useEch option and hsHashesEchInner |
| tests/api/test_pkcs7.c | Initialized ret variable to prevent potential uninitialized use |
| tests/api.c | Added extensive ECH test coverage including parameter validation, bad configs, GREASE, enable/disable, and interop tests |
| src/tls13.c | Major refactoring of ECH transcript hash calculation, added EchHashHelloInner and EchCalcAcceptance functions, fixed client random handling for HRR |
| src/tls.c | Implemented OuterExtensions support, added SNI state machine for ECH, improved error handling and validation |
| src/ssl_ech.c | Changed config insertion to prepend instead of append, made echConfigs64 parameter const |
| src/internal.c | Removed hsHashesEchInner cleanup, updated useEch checks to echConfigs NULL checks |
| examples/server/server.c | Added --ech command line option and ECH config generation/display |
| examples/client/client.c | Added --ech command line option for setting ECH configs from base64 |
| .github/workflows/openssl-ech.yml | New comprehensive interoperability testing workflow with OpenSSL ECH |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
3e57580
b208f36 to
3e57580
Compare
Description
Original issue stems from
wolfssl-examples/tls/client-echnot working. This issue was a confirmation value mismatch between Cloudflare and our ECH client implementation. The confirmation value is present in the HelloRetryRequest's encrypted_client_hello extension.Issues fixed when writing tests:
Fixed some non-compliance with the ECH spec here and there too.
Based fixes off of esni draft 25 (https://www.ietf.org/archive/id/draft-ietf-tls-esni-25.html)
Addresses github issue #6925
Testing
Tested the client against a 'wild' ECH server (Cloudflare). This test is part of a wolfssl-example PR (wolfSSL/wolfssl-examples#556).
Added a github workflow to test OpenSSL interoperability. It tests a basic ECH connection between wolf client -> ossl server and ossl client -> wolf server.
Added extra tests to more strenuously test ECH:
wolfSSL_UseSNI()is never called on either the client or server and a connection is started.Checklist