Skip to content

Commit 9327bcf

Browse files
committed
AES GCM opps with IV < 96-bits now returns WC_FIPS_NOT_APPROVED
1 parent 4a7695e commit 9327bcf

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

tests/api/test_aes.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9240,7 +9240,11 @@ int test_wc_AesGcmArgMcdc(void)
92409240
ExpectIntEQ(wc_AesGcmSetIV(&aes, 10, NULL, 0, &rng),
92419241
WC_NO_ERR_TRACE(BAD_FUNC_ARG));
92429242
ExpectIntEQ(wc_AesGcmSetIV(&aes, GCM_NONCE_MIN_SZ, NULL, 0, &rng),
9243+
#if FIPS_VERSION3_EQ(5,2,4) || FIPS_VERSION3_GE(7,0,0)
9244+
WC_FIPS_NOT_APPROVED);
9245+
#else
92439246
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)