Skip to content

Commit

Permalink
JNI: call wc_RunAllCast_fips() when used with FIPS 140-3 pilot
Browse files Browse the repository at this point in the history
  • Loading branch information
cconlon committed Apr 12, 2024
1 parent 74876dc commit 5c8597e
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion jni/jni_wolfobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,17 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_wolfcrypt_WolfObject_init
}
#endif

#if defined(HAVE_FIPS) && defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION == 5)
#if defined(HAVE_FIPS) && defined(HAVE_FIPS_VERSION) && \
(HAVE_FIPS_VERSION >= 7)

ret = wc_RunAllCast_fips();
if (ret != 0) {
printf("FIPS CASTs failed to run");
}

#elif defined(HAVE_FIPS) && defined(HAVE_FIPS_VERSION) && \
(HAVE_FIPS_VERSION == 5)

/* run FIPS 140-3 conditional algorithm self tests early to prevent
* multi threaded issues later on */
#if !defined(NO_AES) && !defined(NO_AES_CBC)
Expand Down

0 comments on commit 5c8597e

Please sign in to comment.