Skip to content

Commit bc02006

Browse files
authored
Merge pull request #6794 from res0nance/fix-memory-type
pqc: fix memory type for shared secret storage server side
2 parents f7ca923 + 0983ea9 commit bc02006

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/tls.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8936,7 +8936,7 @@ static int server_generate_pqc_ciphertext(WOLFSSL* ssl,
89368936

89378937
if (ret == 0) {
89388938
sharedSecret = (byte*)XMALLOC(ecc_kse->keyLen + ssSz, ssl->heap,
8939-
DYNAMIC_TYPE_TLSX);
8939+
DYNAMIC_TYPE_SECRET);
89408940
ciphertext = (byte*)XMALLOC(ecc_kse->pubKeyLen + ctSz, ssl->heap,
89418941
DYNAMIC_TYPE_TLSX);
89428942

@@ -9010,7 +9010,7 @@ static int server_generate_pqc_ciphertext(WOLFSSL* ssl,
90109010

90119011
TLSX_KeyShare_FreeAll(ecc_kse, ssl->heap);
90129012
if (sharedSecret != NULL)
9013-
XFREE(sharedSecret, ssl->heap, DYNAMIC_TYPE_TLSX);
9013+
XFREE(sharedSecret, ssl->heap, DYNAMIC_TYPE_SECRET);
90149014
if (ciphertext != NULL)
90159015
XFREE(ciphertext, ssl->heap, DYNAMIC_TYPE_TLSX);
90169016
wc_ecc_free(&eccpubkey);

0 commit comments

Comments
 (0)