Kyber: fix TLS usage

Allow only select parameter sets to be compiled in.
Fixed unit.test to recognize when level is supported.
This commit is contained in:
Sean Parkinson
2024-08-27 10:35:08 +10:00
parent bf074d2bb9
commit 893a486ae1
5 changed files with 127 additions and 16 deletions

View File

@@ -13141,7 +13141,7 @@ static int TLSX_PopulateSupportedGroups(WOLFSSL* ssl, TLSX** extensions)
ret = TLSX_UseSupportedCurve(extensions, WOLFSSL_P384_KYBER_LEVEL3,
ssl->heap);
#endif
#ifdef WOLFSSL_KYBER768
#ifdef WOLFSSL_KYBER1024
if (ret == WOLFSSL_SUCCESS)
ret = TLSX_UseSupportedCurve(extensions, WOLFSSL_KYBER_LEVEL5,
ssl->heap);