Echo HRR Cookie by default on client. Fix a few sniffer issues. Document DES function size requirements. - #11163
Open
kareem-wolfssl wants to merge 5 commits into
Open
Echo HRR Cookie by default on client. Fix a few sniffer issues. Document DES function size requirements.#11163kareem-wolfssl wants to merge 5 commits into
kareem-wolfssl wants to merge 5 commits into
Conversation
… sniffer. Thanks to NVIDIA Project Vanessa for the report.
…ENT_HRR_COOKIE. Fixes wolfSSL#11010.
A complete fix is not possible without breaking OpenSSL compatibility. Fixes F-2246.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR makes TLS 1.3 clients RFC 8446-compliant by enabling HelloRetryRequest (HRR) cookie echoing by default (with an opt-out for size-constrained clients), while also hardening the packet sniffer’s TCP sequence/FIN handling and documenting DES buffer sizing requirements.
Changes:
- Enable
HAVE_TLSX_COOKIEby default for TLS 1.3 clients (opt-out viaWOLFSSL_NO_CLIENT_HRR_COOKIE) and switch HRR-cookie logic to use that feature macro. - Fix sniffer edge cases: negative-length handling, FIN capture when relative sequence is 0, and 32-bit wrap-safe sequence comparisons.
- Document DES-CBC function behavior requiring buffers sized to
round_up(len, DES_BLOCK_SIZE).
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
wolfssl/wolfcrypt/settings.h |
Defines HAVE_TLSX_COOKIE by default for TLS 1.3 clients (with opt-out) to ensure HRR cookie echo support is compiled in. |
wolfssl/internal.h |
Gates hrrSentCookie option bit on HAVE_TLSX_COOKIE instead of WOLFSSL_SEND_HRR_COOKIE. |
src/tls13.c |
Uses HAVE_TLSX_COOKIE to include HRR cookie presence in client-side HRR validation. |
src/tls.c |
Compiles TLSX Cookie extension support under HAVE_TLSX_COOKIE and refines cookie parsing behavior when server-side cookie generation is disabled. |
src/ssl_crypto.c |
Adds Doxygen notes clarifying DES-CBC rounding/padding behavior and buffer size requirements. |
src/sniffer.c |
Improves robustness around negative lengths, sequence wrap comparisons, and FIN capture semantics. |
.wolfssl_known_macro_extras |
Registers HAVE_TLSX_COOKIE and WOLFSSL_NO_CLIENT_HRR_COOKIE as known macros. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
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
Fixes zd#21992, #11010, F-2246
Testing
Built in tests, provided reproducers
Checklist