Skip to content

Commit f285a52

Browse files
committed
Make sure ticket lifetime is in allowed range
1 parent 1c8d593 commit f285a52

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/ssl.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3502,6 +3502,11 @@ int wolfSSL_CTX_set_TicketHint(WOLFSSL_CTX* ctx, int hint)
35023502
if (ctx == NULL)
35033503
return BAD_FUNC_ARG;
35043504

3505+
/* RFC8446 Section 4.6.1: Servers MUST NOT use any value greater than
3506+
* 604800 seconds (7 days). */
3507+
if (hint < 0 || hint > 604800)
3508+
return BAD_FUNC_ARG;
3509+
35053510
ctx->ticketHint = hint;
35063511

35073512
return WOLFSSL_SUCCESS;

0 commit comments

Comments
 (0)