Merge pull request #10236 from Roy-Carter/feature/enhance_conf_and_max_size

Enhance extra user data value and external cookie length max size
This commit is contained in:
David Garske
2026-04-24 14:42:44 -07:00
committed by GitHub
2 changed files with 13 additions and 3 deletions
+3 -2
View File
@@ -11025,9 +11025,10 @@ case "$ENABLED_EX_DATA" in
no) ;;
yes) AM_CFLAGS="$AM_CFLAGS -DHAVE_EX_DATA"
;;
[[1-9]]|[[1-9]][[0-9]]) AM_CFLAGS="$AM_CFLAGS -DHAVE_EX_DATA -DMAX_EX_DATA=$ENABLED_EX_DATA"
[[1-9]]|[[1-9]][[0-9]]|[[1-9]][[0-9]][[0-9]]|[[1-9]][[0-9]][[0-9]][[0-9]])
AM_CFLAGS="$AM_CFLAGS -DHAVE_EX_DATA -DMAX_EX_DATA=$ENABLED_EX_DATA"
;;
*) AC_MSG_ERROR([Invalid argument to --enable-context-extra-user-data -- must be yes, no, or a number from 1 to 99])
*) AC_MSG_ERROR([Invalid argument to --enable-context-extra-user-data -- must be yes, no, or a number from 1 to 9999 (note: each index reserves one pointer per object, so large values increase memory use)])
;;
esac
+10 -1
View File
@@ -1442,6 +1442,15 @@ enum {
*/
#define AEAD_SM4_CCM_LIMIT w64From32(0, (1 << 10) - 1)
#ifndef WOLFSSL_COOKIE_LEN
/* Maximum size for a DTLS cookie */
#define WOLFSSL_COOKIE_LEN 32
#endif
#if WOLFSSL_COOKIE_LEN > 255
#error "WOLFSSL_COOKIE_LEN must be <= 255 per RFC 6347 (opaque<0..2^8-1>)"
#endif
#if defined(WOLFSSL_TLS13) || !defined(NO_PSK)
#define TLS13_TICKET_NONCE_MAX_SZ 255
@@ -1569,7 +1578,7 @@ enum Misc {
SEED_LEN = RAN_LEN * 2, /* tls prf seed length */
ID_LEN = 32, /* session id length */
COOKIE_SECRET_SZ = 14, /* dtls cookie secret size */
MAX_COOKIE_LEN = 32, /* max dtls cookie size */
MAX_COOKIE_LEN = WOLFSSL_COOKIE_LEN, /* max dtls cookie size */
COOKIE_SZ = 20, /* use a 20 byte cookie */
SUITE_LEN = 2, /* cipher suite sz length */
ENUM_LEN = 1, /* always a byte */