Set namedGroup when generating pqc ciphertext

This fixes an issue where wolfSSL_get_curve_name() will
return NULL when using PQC groups.
This commit is contained in:
res0nance 2023-09-13 13:29:31 +08:00
parent eda3cd6a37
commit 825db397d7

View File

@ -8991,6 +8991,10 @@ static int server_generate_pqc_ciphertext(WOLFSSL* ssl,
keyShareEntry->pubKey = ciphertext;
keyShareEntry->pubKeyLen = (word32)(ecc_kse->pubKeyLen + ctSz);
ciphertext = NULL;
/* Set namedGroup so wolfSSL_get_curve_name() can function properly on
* the server side. */
ssl->namedGroup = keyShareEntry->group;
}
TLSX_KeyShare_FreeAll(ecc_kse, ssl->heap);