forked from wolfSSL/wolfssl
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) {
|
if (ret == 0) {
|
||||||
sharedSecret = (byte*)XMALLOC(ecc_kse->keyLen + ssSz, ssl->heap,
|
sharedSecret = (byte*)XMALLOC(ecc_kse->keyLen + ssSz, ssl->heap,
|
||||||
DYNAMIC_TYPE_TLSX);
|
DYNAMIC_TYPE_SECRET);
|
||||||
ciphertext = (byte*)XMALLOC(ecc_kse->pubKeyLen + ctSz, ssl->heap,
|
ciphertext = (byte*)XMALLOC(ecc_kse->pubKeyLen + ctSz, ssl->heap,
|
||||||
DYNAMIC_TYPE_TLSX);
|
DYNAMIC_TYPE_TLSX);
|
||||||
|
|
||||||
@ -8999,7 +8999,7 @@ static int server_generate_pqc_ciphertext(WOLFSSL* ssl,
|
|||||||
|
|
||||||
TLSX_KeyShare_FreeAll(ecc_kse, ssl->heap);
|
TLSX_KeyShare_FreeAll(ecc_kse, ssl->heap);
|
||||||
if (sharedSecret != NULL)
|
if (sharedSecret != NULL)
|
||||||
XFREE(sharedSecret, ssl->heap, DYNAMIC_TYPE_TLSX);
|
XFREE(sharedSecret, ssl->heap, DYNAMIC_TYPE_SECRET);
|
||||||
if (ciphertext != NULL)
|
if (ciphertext != NULL)
|
||||||
XFREE(ciphertext, ssl->heap, DYNAMIC_TYPE_TLSX);
|
XFREE(ciphertext, ssl->heap, DYNAMIC_TYPE_TLSX);
|
||||||
wc_ecc_free(&eccpubkey);
|
wc_ecc_free(&eccpubkey);
|
||||||
|
Reference in New Issue
Block a user