mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-29 18:27:29 +02:00
pqc: fix memory type for shared secret storage server side
This gets copied to preMasterSecret and freed in TLSX_KeyShare_ProcessPqc with the SECRET type but is allocated with the TLSX type.
This commit is contained in:
@ -8925,7 +8925,7 @@ static int server_generate_pqc_ciphertext(WOLFSSL* ssl,
|
||||
|
||||
if (ret == 0) {
|
||||
sharedSecret = (byte*)XMALLOC(ecc_kse->keyLen + ssSz, ssl->heap,
|
||||
DYNAMIC_TYPE_TLSX);
|
||||
DYNAMIC_TYPE_SECRET);
|
||||
ciphertext = (byte*)XMALLOC(ecc_kse->pubKeyLen + ctSz, ssl->heap,
|
||||
DYNAMIC_TYPE_TLSX);
|
||||
|
||||
@ -8999,7 +8999,7 @@ static int server_generate_pqc_ciphertext(WOLFSSL* ssl,
|
||||
|
||||
TLSX_KeyShare_FreeAll(ecc_kse, ssl->heap);
|
||||
if (sharedSecret != NULL)
|
||||
XFREE(sharedSecret, ssl->heap, DYNAMIC_TYPE_TLSX);
|
||||
XFREE(sharedSecret, ssl->heap, DYNAMIC_TYPE_SECRET);
|
||||
if (ciphertext != NULL)
|
||||
XFREE(ciphertext, ssl->heap, DYNAMIC_TYPE_TLSX);
|
||||
wc_ecc_free(&eccpubkey);
|
||||
|
Reference in New Issue
Block a user