mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-07-08 13:40:51 +02:00
fixes for issues identified by CI tests and AI review:
tests/api/api.h: always use FIPS 186-4 settings if defined(HAVE_SELFTEST). wolfssl/wolfcrypt/settings.h: if defined(HAVE_SELFTEST), #define WC_FIPS_186_4.
This commit is contained in:
+2
-2
@@ -47,8 +47,8 @@
|
||||
defined(HAVE_FIPS) && FIPS_VERSION3_LT(7, 0, 0)
|
||||
#define TEST_STRING "WC_FIPS_186_5_PLUS test test"
|
||||
#define TEST_STRING_SZ 28
|
||||
#elif defined(WC_FIPS_186_4_PLUS) && (defined(HAVE_SELFTEST) || \
|
||||
(defined(HAVE_FIPS) && FIPS_VERSION3_LT(7, 0, 0)))
|
||||
#elif defined(HAVE_SELFTEST) || (defined(WC_FIPS_186_4_PLUS) && \
|
||||
defined(HAVE_FIPS) && FIPS_VERSION3_LT(7, 0, 0))
|
||||
#define TEST_STRING "WC_FIPS_186_4_PLUS test.."
|
||||
#define TEST_STRING_SZ 25
|
||||
#elif WC_MIN_DIGEST_SIZE_FOR_SIGN <= 25
|
||||
|
||||
@@ -980,6 +980,10 @@ WOLFSSL_API int wc_rng_bank_reseed(struct wc_rng_bank *bank,
|
||||
break;
|
||||
}
|
||||
}
|
||||
ret = WC_CHECK_FOR_INTR_SIGNALS();
|
||||
if (ret == WC_NO_ERR_TRACE(INTERRUPTED_E))
|
||||
break;
|
||||
WC_RELAX_LONG_LOOP();
|
||||
}
|
||||
#ifdef WC_VERBOSE_RNG
|
||||
if ((ret != 0) && (ret != WC_NO_ERR_TRACE(WC_TIMEOUT_E)))
|
||||
@@ -988,8 +992,11 @@ WOLFSSL_API int wc_rng_bank_reseed(struct wc_rng_bank *bank,
|
||||
"for DRBG #%d returned %d.", n, ret);
|
||||
#endif
|
||||
(void)wc_rng_bank_checkin(bank, &drbg);
|
||||
if (ret == WC_NO_ERR_TRACE(WC_TIMEOUT_E))
|
||||
if ((ret == WC_NO_ERR_TRACE(WC_TIMEOUT_E)) ||
|
||||
(ret == WC_NO_ERR_TRACE(INTERRUPTED_E)))
|
||||
{
|
||||
return ret;
|
||||
}
|
||||
ret = WC_CHECK_FOR_INTR_SIGNALS();
|
||||
if (ret == WC_NO_ERR_TRACE(INTERRUPTED_E))
|
||||
return ret;
|
||||
|
||||
@@ -517,15 +517,14 @@
|
||||
#define FIPS_VERSION3_NE(major,minor,patch) \
|
||||
(WOLFSSL_FIPS_VERSION_CODE != WOLFSSL_MAKE_FIPS_VERSION3(major,minor,patch))
|
||||
|
||||
#if defined(HAVE_FIPS) && !defined(WC_FIPS_186_5) && !defined(WC_FIPS_186_4)
|
||||
#if FIPS_VERSION3_GE(7,0,0) && !defined(WOLFSSL_FIPS_READY)
|
||||
#ifndef WC_FIPS_186_5
|
||||
#define WC_FIPS_186_5
|
||||
#endif
|
||||
#if (defined(HAVE_FIPS) || defined(HAVE_SELFTEST)) && \
|
||||
!defined(WC_FIPS_186_5) && !defined(WC_FIPS_186_4)
|
||||
#if defined(HAVE_SELFTEST)
|
||||
#define WC_FIPS_186_4
|
||||
#elif FIPS_VERSION3_GE(7,0,0) && !defined(WOLFSSL_FIPS_READY)
|
||||
#define WC_FIPS_186_5
|
||||
#else
|
||||
#ifndef WC_FIPS_186_4
|
||||
#define WC_FIPS_186_4
|
||||
#endif
|
||||
#define WC_FIPS_186_4
|
||||
#endif
|
||||
#endif
|
||||
#if defined(WC_FIPS_186_4) && defined(WC_FIPS_186_5)
|
||||
|
||||
Reference in New Issue
Block a user