NULL the correct key in TLSX_KeyShare_ProcessPqcHybridClient when using WOLFSSL_TLSX_PQC_MLKEM_STORE_OBJ.

Thanks to Haiyang Huang for the report.
This commit is contained in:
Kareem
2026-05-18 10:25:02 -07:00
parent 9096bcc8fa
commit 9467d82ae6
+4
View File
@@ -10215,7 +10215,11 @@ static int TLSX_KeyShare_ProcessPqcHybridClient(WOLFSSL* ssl,
keyShareEntry->lastRet = WC_PENDING_E;
/* Prevent freeing of the ECC and ML-KEM private keys */
ecc_kse->key = NULL;
#ifndef WOLFSSL_TLSX_PQC_MLKEM_STORE_OBJ
pqc_kse->privKey = NULL;
#else
pqc_kse->key = NULL;
#endif
}
else
#endif