Clear decrypted ticket that failed checks in DoClientTicket_ex

pull/5910/head
Juliusz Sosinowicz 2023-02-21 13:23:00 +01:00
parent b0d7656ad2
commit f2032e8744
1 changed files with 4 additions and 0 deletions

View File

@ -34821,6 +34821,10 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
ret = DoClientTicketCheckVersion(ssl, psk->it);
if (ret != 0) {
psk->decryptRet = PSK_DECRYPT_FAIL;
ForceZero(psk->identity, psk->identityLen);
#ifdef WOLFSSL_CHECK_MEM_ZERO
wc_MemZero_Check(psk->it, sizeof(InternalTicket));
#endif
return ret;
}
return decryptRet;