Skip to content

Commit 6d0dc7f

Browse files
committed
SSL default ticket encryption callback: check in len on decrypt
Make sure that the length of the data to decrypt is correct for the default ticket encryption implementation.
1 parent 22abd37 commit 6d0dc7f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/internal.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38842,6 +38842,10 @@ static int DefTicketEncCb(WOLFSSL* ssl, byte key_name[WOLFSSL_TICKET_NAME_SZ],
3884238842

3884338843
WOLFSSL_ENTER("DefTicketEncCb");
3884438844

38845+
if ((!enc) && (inLen != sizeof(InternalTicket))) {
38846+
return BUFFER_E;
38847+
}
38848+
3884538849
/* Check we have setup the RNG, name and primary key. */
3884638850
if (keyCtx->expirary[0] == 0) {
3884738851
#ifndef SINGLE_THREADED

0 commit comments

Comments
 (0)