@@ -648,10 +648,12 @@ int test_wc_PKCS12_PBKDF(void)
648648 ExpectIntEQ (XMEMCMP (derived , verify2 , 24 ), 0 );
649649
650650 /* iterations <= 0 must be rejected */
651+ #if !defined(HAVE_FIPS ) || FIPS_VERSION3_GE (7 ,0 ,0 )
651652 ExpectIntEQ (wc_PKCS12_PBKDF (derived , passwd , (int )sizeof (passwd ),
652653 salt , (int )sizeof (salt ), 0 , 24 , WC_SHA256 , 1 ), BAD_FUNC_ARG );
653654 ExpectIntEQ (wc_PKCS12_PBKDF (derived , passwd , (int )sizeof (passwd ),
654655 salt , (int )sizeof (salt ), -1 , 24 , WC_SHA256 , 1 ), BAD_FUNC_ARG );
656+ #endif /* !HAVE_FIPS || FIPS_VERSION3_GE(7,0,0) */
655657#endif
656658 return EXPECT_RESULT ();
657659}
@@ -717,12 +719,14 @@ int test_wc_PKCS12_PBKDF_ex(void)
717719 salt , (int )sizeof (salt ), 1 , 24 , WC_SHA256 , 3 , NULL ), 0 );
718720
719721 /* iterations <= 0 must be rejected */
722+ #if !defined(HAVE_FIPS ) || FIPS_VERSION3_GE (7 ,0 ,0 )
720723 ExpectIntEQ (wc_PKCS12_PBKDF_ex (derived , passwd , (int )sizeof (passwd ),
721724 salt , (int )sizeof (salt ), 0 , 24 , WC_SHA256 , 1 , NULL ),
722725 BAD_FUNC_ARG );
723726 ExpectIntEQ (wc_PKCS12_PBKDF_ex (derived , passwd , (int )sizeof (passwd ),
724727 salt , (int )sizeof (salt ), -1 , 24 , WC_SHA256 , 1 , NULL ),
725728 BAD_FUNC_ARG );
729+ #endif /* !HAVE_FIPS || FIPS_VERSION3_GE(7,0,0) */
726730#endif
727731 return EXPECT_RESULT ();
728732}
0 commit comments