Skip to content

Commit f18ebef

Browse files
authored
Merge pull request #10959 from lealem47/WC_FIPS_NOT_APPROVED
Testing: AES GCM opps with IV < 96-bits now returns WC_FIPS_NOT_APPROVED with FIPS
2 parents 4a7695e + 9548753 commit f18ebef

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

.wolfssl_known_macro_extras

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,8 +1078,6 @@ XGETPASSWD
10781078
XMSS_CALL_PRF_KEYGEN
10791079
XPAR_VERSAL_CIPS_0_PSPMC_0_PSV_CORTEXA72_0_TIMESTAMP_CLK_FREQ
10801080
XSECURE_CACHE_DISABLE
1081-
fipsCastStatus_get
1082-
wc_Des3_SetKey
10831081
_ABI64
10841082
_ABIO64
10851083
_ARCH_PPC64
@@ -1262,8 +1260,10 @@ __xtensa__
12621260
byte
12631261
configTICK_RATE_HZ
12641262
fallthrough
1263+
fipsCastStatus_get
12651264
noinline
12661265
ssize_t
12671266
sun
12681267
versal
1268+
wc_Des3_SetKey
12691269
wc_Tls13_HKDF_Expand_Label

tests/api/test_aes.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9239,8 +9239,12 @@ int test_wc_AesGcmArgMcdc(void)
92399239
* self-contained demonstration). */
92409240
ExpectIntEQ(wc_AesGcmSetIV(&aes, 10, NULL, 0, &rng),
92419241
WC_NO_ERR_TRACE(BAD_FUNC_ARG));
9242+
#if defined(HAVE_FIPS) && FIPS_VERSION3_GE(7,0,0)
92429243
ExpectIntEQ(wc_AesGcmSetIV(&aes, GCM_NONCE_MIN_SZ, NULL, 0, &rng),
9243-
0);
9244+
WC_FIPS_NOT_APPROVED);
9245+
#else
9246+
ExpectIntEQ(wc_AesGcmSetIV(&aes, GCM_NONCE_MIN_SZ, NULL, 0, &rng), 0);
9247+
#endif
92449248
ExpectIntEQ(wc_AesGcmSetIV(&aes, GCM_NONCE_MID_SZ, NULL, 0, &rng),
92459249
0);
92469250
ExpectIntEQ(wc_AesGcmSetIV(&aes, GCM_NONCE_MAX_SZ, NULL, 0, &rng),

0 commit comments

Comments
 (0)