Skip to content

Commit a22956d

Browse files
committed
Address periodic CAST failures observed in unit.test by pre-empting the CASTs
1 parent b8aec63 commit a22956d

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

tests/unit.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ int unit_test(int argc, char** argv)
6868

6969
(void)argc;
7070
(void)argv;
71-
7271
#ifdef WOLFSSL_FORCE_MALLOC_FAIL_TEST
7372
if (argc > 1) {
7473
int memFailCount = atoi(argv[1]);
@@ -161,7 +160,7 @@ int unit_test(int argc, char** argv)
161160
err_sys("KDF TLSv1.2 CAST failed");
162161
}
163162
#endif
164-
#if defined(WOLFSSL_HAVE_PRF) && defined(WOLFSSL_TLS13)
163+
#if defined(HAVE_HKDF) && !defined(NO_HMAC)
165164
if (wc_RunCast_fips(FIPS_CAST_KDF_TLS13) != 0) {
166165
err_sys("KDF TLSv1.3 CAST failed");
167166
}
@@ -172,6 +171,11 @@ int unit_test(int argc, char** argv)
172171
}
173172
#endif
174173
#endif /* HAVE_FIPS && HAVE_FIPS_VERSION == 5 */
174+
#if FIPS_VERSION3_GT(5,2,0)
175+
if (wc_RunAllCast_fips() != 0) {
176+
err_sys("wc_RunAllCast_fips() failed\n");
177+
}
178+
#endif
175179

176180
while (argc > 1) {
177181
if (argv[1][0] != '-') {

0 commit comments

Comments
 (0)