Skip to content

Commit 4447f0c

Browse files
authored
Merge pull request #9881 from Frauschi/f-297
Make sure session ticket lifetime is in allowed range
2 parents b2454d1 + f285a52 commit 4447f0c

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)