Skip to content

Add separate client cookie enable config - #11101

Open
padelsbach wants to merge 3 commits into
wolfSSL:masterfrom
padelsbach:client-cookie-enable
Open

Add separate client cookie enable config#11101
padelsbach wants to merge 3 commits into
wolfSSL:masterfrom
padelsbach:client-cookie-enable

Conversation

@padelsbach

Copy link
Copy Markdown
Contributor

Description

Split the existing flag which enables TLS cookie support WOLFSSL_SEND_HRR_COOKIE into a smaller portion WOLFSSL_TLS13_COOKIE which 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

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

@padelsbach padelsbach changed the title Add separate client cookie enable Add separate client cookie enable config Aug 6, 2026

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Comment thread tests/api/test_tls13.c Outdated
Comment thread src/tls.c
Comment thread wolfssl/internal.h
Comment thread tests/api/test_tls13.c
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

MemBrowse Memory Report

gcc-arm-cortex-m0plus

  • FLASH: .rodata.GetCertName.str1.1 +23 B, .rodata.rdnChoice +1 B, .text +72 B (+0.1%, 64,351 B / 262,144 B, total: 25% used)

gcc-arm-cortex-m3

  • FLASH: .rodata.GetCertName.str1.1 +23 B, .rodata.rdnChoice +1 B, .text +96 B (+0.1%, 123,063 B / 262,144 B, total: 47% used)

gcc-arm-cortex-m4

  • FLASH: .rodata.GetCertName.str1.1 +23 B, .rodata.rdnChoice +1 B, .text +128 B (+0.1%, 201,391 B / 262,144 B, total: 77% used)

gcc-arm-cortex-m4-baremetal

  • FLASH: .rodata.GetCertName.str1.1 +23 B, .rodata.rdnChoice +1 B, .text +64 B (+0.1%, 66,979 B / 262,144 B, total: 26% used)

gcc-arm-cortex-m4-crypto-only

  • FLASH: .rodata.GetCertName.str1.1 +23 B, .rodata.rdnChoice +1 B, .text +64 B (+0.1%, 175,338 B / 262,144 B, total: 67% used)

gcc-arm-cortex-m4-dtls13

  • FLASH: .rodata +24 B, .text +256 B (+0.2%, 182,204 B / 1,048,576 B, total: 17% used)

gcc-arm-cortex-m4-min-ecc

  • FLASH: .rodata.GetCertName.str1.1 +23 B, .rodata.rdnChoice +1 B, .text +64 B (+0.1%, 61,893 B / 262,144 B, total: 24% used)

gcc-arm-cortex-m4-openssl-compat

  • FLASH: .rodata +392 B, .text +1,408 B (+0.2%, 775,284 B / 1,048,576 B, total: 74% used)

gcc-arm-cortex-m4-pkcs7

  • FLASH: .rodata.GetCertName.str1.1 +23 B, .rodata.rdnChoice +1 B, .text +128 B (+0.1%, 214,190 B / 262,144 B, total: 82% used)

gcc-arm-cortex-m4-pq

  • FLASH: .rodata +604 B, .text +15,360 B (+5.7%, 297,244 B / 1,048,576 B, total: 28% used)
  • RAM: .bss +4 B (+0.0%, 33,424 B / 262,144 B, total: 13% used)

gcc-arm-cortex-m4-rsa-only

  • FLASH: .rodata +16 B, .text +576 B (+0.2%, 327,984 B / 1,048,576 B, total: 31% used)

gcc-arm-cortex-m4-sp-math

  • FLASH: .rodata.GetCertName.str1.1 +23 B, .rodata.rdnChoice +1 B, .text +64 B (+0.1%, 61,893 B / 262,144 B, total: 24% used)

gcc-arm-cortex-m4-tls12

  • FLASH: .rodata.GetCertName.str1.1 +23 B, .rodata.rdnChoice +1 B, .text +64 B (+0.1%, 123,827 B / 262,144 B, total: 47% used)

gcc-arm-cortex-m4-tls13

  • FLASH: .rodata.GetCertName.str1.1 +23 B, .rodata.rdnChoice +1 B, .text +576 B (+0.3%, 237,985 B / 262,144 B, total: 91% used)

gcc-arm-cortex-m7

  • FLASH: .rodata.GetCertName.str1.1 +23 B, .rodata.rdnChoice +1 B, .text +64 B (+0.0%, 201,327 B / 262,144 B, total: 77% used)

gcc-arm-cortex-m7-pq

  • FLASH: .rodata +604 B, .text +15,680 B (+5.8%, 298,140 B / 1,048,576 B, total: 28% used)
  • RAM: .bss +4 B (+0.0%, 33,424 B / 262,144 B, total: 13% used)

gcc-arm-cortex-m7-tls13

  • FLASH: .rodata.GetCertName.str1.1 +23 B, .rodata.rdnChoice +1 B, .text +576 B (+0.3%, 238,049 B / 262,144 B, total: 91% used)

linuxkm-standard

  • Data: __patchable_function_entries +16 B (+0.0%, 49,208 B)

stm32-sim-stm32h753

  • FLASH: .text +280 B (+0.2%, 186,096 B / 2,097,152 B, total: 9% used)
    No memory changes detected for:
  • linuxkm-pie

@dgarske

dgarske commented Aug 7, 2026

Copy link
Copy Markdown
Member

Jenkins retest this please

Comment thread src/tls.c Outdated
Comment thread src/tls.c
Comment thread src/tls.c
@padelsbach padelsbach removed their assignment Aug 7, 2026

@dgarske dgarske left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

@padelsbach padelsbach removed their assignment Aug 7, 2026
@padelsbach

padelsbach commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

jenkins retest this please

@padelsbach
padelsbach force-pushed the client-cookie-enable branch from af7f938 to 5cd590b Compare August 7, 2026 20:32
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.

TLS 1.3 cookie extension is absent in the audited default build and only available behind build/runtime gates

4 participants