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.
This commit is contained in:
Sean Parkinson
2024-06-26 08:21:17 +10:00
parent 22abd37408
commit 6d0dc7f2e7

View File

@@ -38842,6 +38842,10 @@ static int DefTicketEncCb(WOLFSSL* ssl, byte key_name[WOLFSSL_TICKET_NAME_SZ],
WOLFSSL_ENTER("DefTicketEncCb");
if ((!enc) && (inLen != sizeof(InternalTicket))) {
return BUFFER_E;
}
/* Check we have setup the RNG, name and primary key. */
if (keyCtx->expirary[0] == 0) {
#ifndef SINGLE_THREADED