Add separate client cookie enable config - #11101
Conversation
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #11101
Scan targets checked: wolfcrypt-rs-bugs, wolfssl-bugs, wolfssl-src
Findings: 4
4 finding(s) posted as inline comments (see file-level comments below)
This review was generated automatically by Fenrir. Findings are non-blocking.
fec3b81 to
9a5aabf
Compare
|
|
Jenkins retest this please |
dgarske
left a comment
There was a problem hiding this comment.
Testing configuration:
--enable-tls13 --disable-tlsv12 --enable-secure-renegotiation --enable-nullcipher CFLAGS="-DNO_WOLFSSL_CLIENT"
1579: test_tls13_server_cookie_parse :
ERROR - tests/api/test_tls13.c line 7835 failed with:
expected: TLSX_Parse(ssl, badExt, (word16)sizeof(badExt), client_hello, (Suites*)((const Suites*) ((ssl)->suites != ((void *)0) ? (ssl)->suites : (ssl)->ctx->suites))) == (BUFFER_E)
result: 0 != -132
failed ( 0.00005)
ERROR - tests/api.c line 39831 failed with:
expected: Test failed
result: ret 0
|
jenkins retest this please |
af7f938 to
5cd590b
Compare
5cd590b to
2dfc2bc
Compare
There was a problem hiding this comment.
Pull request overview
Adds default TLS 1.3 client support for echoing HRR cookies, addressing #11074 while retaining server-side opt-in.
Changes:
- Introduces client-side cookie support and a configurable size limit.
- Separates client echo behavior from server cookie generation.
- Adds handshake, parsing, echo, and size-limit tests.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
wolfssl/internal.h |
Defines cookie capability, limit, and state. |
src/tls.c |
Parses, stores, and echoes HRR cookies. |
src/tls13.c |
Accepts cookie-only HRRs. |
src/ssl.c |
Resets cookie state on reuse. |
tests/api/test_tls13.c |
Adds cookie behavior tests. |
tests/api/test_tls13.h |
Registers new tests. |
configure.ac |
Clarifies Autotools option behavior. |
CMakeLists.txt |
Clarifies CMake option behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| } | ||
|
|
||
| /* Test that a client rejects a HelloRetryRequest cookie larger than it is | ||
| * willing to store and echo back. RFC 8446 4.2.2 sets no upper bound. |
There was a problem hiding this comment.
nit: this is a little confusing.
RFC 8446 4.2.2 says upper bound is 2 ** 16 - 1 = 65535.
This test requires WOLFSSL_MAX_TLS13_COOKIE_SZ <= 65528 because 2 ** 16 - 1 - 1 - 6 = 65528.
2dfc2bc to
9d7ec9a
Compare
Description
Split the existing flag which enables TLS cookie support
WOLFSSL_SEND_HRR_COOKIEinto a smaller portionWOLFSSL_TLS13_COOKIEwhich enables replying with a cookie echo'ed from the HelloClientResponse (HRR). This is enabled by default for clients.Fixes #11074
Testing
New unit test
Checklist