From 4ca65f0ce7d6129a1ec1c9ad3972dd7636efa56d Mon Sep 17 00:00:00 2001 From: Anthony Hu Date: Fri, 10 Jan 2025 17:24:05 -0500 Subject: [PATCH] Better guarding for LMS SHA256_256 vs LMS SHA256_192 --- wolfcrypt/src/wc_lms.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wolfcrypt/src/wc_lms.c b/wolfcrypt/src/wc_lms.c index b2a3bf8b3e..a0a7f4edd4 100644 --- a/wolfcrypt/src/wc_lms.c +++ b/wolfcrypt/src/wc_lms.c @@ -351,7 +351,9 @@ static const wc_LmsParamsMap wc_lms_map[] = { LMS_PARAMS(1, 10, 8, 3, LMS_SHA256_M24_H10, LMOTS_SHA256_N24_W8, WC_SHA256_192_DIGEST_SIZE) }, #endif +#endif /* WOLFSSL_LMS_SHA256_192 */ #if LMS_MAX_HEIGHT >= 20 +#ifndef WOLFSSL_NO_LMS_SHA256_256 { WC_LMS_PARM_L1_H20_W2 , "LMS/HSS_SHA256/192_L1_H20_W2", LMS_PARAMS(1, 20, 2, 1, LMS_SHA256_M32_H20, LMOTS_SHA256_N32_W2, WC_SHA256_192_DIGEST_SIZE) }, @@ -362,7 +364,7 @@ static const wc_LmsParamsMap wc_lms_map[] = { LMS_PARAMS(1, 20, 8, 3, LMS_SHA256_M32_H20, LMOTS_SHA256_N32_W8, WC_SHA256_192_DIGEST_SIZE) }, #endif -#endif /* WOLFSSL_LMS_SHA256_192 */ +#endif }; /* Number of parameter sets supported. */ #define WC_LMS_MAP_LEN ((int)(sizeof(wc_lms_map) / sizeof(*wc_lms_map)))