From 527154dc853a08ad31b2860a279c9dc75c1ec7e4 Mon Sep 17 00:00:00 2001 From: Lealem Amedie Date: Tue, 21 Jul 2026 13:59:57 -0600 Subject: [PATCH 1/3] Testing: AES GCM opps with IV < 96-bits now returns WC_FIPS_NOT_APPROVED with FIPS --- tests/api/test_aes.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/api/test_aes.c b/tests/api/test_aes.c index f7fe62b0c2..545a1c09a9 100644 --- a/tests/api/test_aes.c +++ b/tests/api/test_aes.c @@ -9240,7 +9240,11 @@ int test_wc_AesGcmArgMcdc(void) ExpectIntEQ(wc_AesGcmSetIV(&aes, 10, NULL, 0, &rng), WC_NO_ERR_TRACE(BAD_FUNC_ARG)); ExpectIntEQ(wc_AesGcmSetIV(&aes, GCM_NONCE_MIN_SZ, NULL, 0, &rng), +#if defined(HAVE_FIPS) && FIPS_VERSION3_GE(7,0,0) + WC_FIPS_NOT_APPROVED); +#else 0); +#endif ExpectIntEQ(wc_AesGcmSetIV(&aes, GCM_NONCE_MID_SZ, NULL, 0, &rng), 0); ExpectIntEQ(wc_AesGcmSetIV(&aes, GCM_NONCE_MAX_SZ, NULL, 0, &rng), From 7b7ce703c73fb73b0425322396adb00dab2db665 Mon Sep 17 00:00:00 2001 From: night1rider Date: Tue, 21 Jul 2026 12:33:58 -0600 Subject: [PATCH 2/3] .wolfssl_known_macro_extras: restore C lexical sort order for fipsCastStatus_get and wc_Des3_SetKey. --- .wolfssl_known_macro_extras | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.wolfssl_known_macro_extras b/.wolfssl_known_macro_extras index 3c3879c33f..e71e4a00c7 100644 --- a/.wolfssl_known_macro_extras +++ b/.wolfssl_known_macro_extras @@ -1078,8 +1078,6 @@ XGETPASSWD XMSS_CALL_PRF_KEYGEN XPAR_VERSAL_CIPS_0_PSPMC_0_PSV_CORTEXA72_0_TIMESTAMP_CLK_FREQ XSECURE_CACHE_DISABLE -fipsCastStatus_get -wc_Des3_SetKey _ABI64 _ABIO64 _ARCH_PPC64 @@ -1262,8 +1260,10 @@ __xtensa__ byte configTICK_RATE_HZ fallthrough +fipsCastStatus_get noinline ssize_t sun versal +wc_Des3_SetKey wc_Tls13_HKDF_Expand_Label From 9548753bb326df863bb1b113e03de3e0cd0e4b3a Mon Sep 17 00:00:00 2001 From: Lealem Amedie Date: Tue, 21 Jul 2026 18:40:13 -0600 Subject: [PATCH 3/3] Remove embedding of macros within a function call --- tests/api/test_aes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/api/test_aes.c b/tests/api/test_aes.c index 545a1c09a9..c463cea61d 100644 --- a/tests/api/test_aes.c +++ b/tests/api/test_aes.c @@ -9239,11 +9239,11 @@ int test_wc_AesGcmArgMcdc(void) * self-contained demonstration). */ ExpectIntEQ(wc_AesGcmSetIV(&aes, 10, NULL, 0, &rng), WC_NO_ERR_TRACE(BAD_FUNC_ARG)); - ExpectIntEQ(wc_AesGcmSetIV(&aes, GCM_NONCE_MIN_SZ, NULL, 0, &rng), #if defined(HAVE_FIPS) && FIPS_VERSION3_GE(7,0,0) + ExpectIntEQ(wc_AesGcmSetIV(&aes, GCM_NONCE_MIN_SZ, NULL, 0, &rng), WC_FIPS_NOT_APPROVED); #else - 0); + ExpectIntEQ(wc_AesGcmSetIV(&aes, GCM_NONCE_MIN_SZ, NULL, 0, &rng), 0); #endif ExpectIntEQ(wc_AesGcmSetIV(&aes, GCM_NONCE_MID_SZ, NULL, 0, &rng), 0);