Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions src/wp_wolfprov.c
Original file line number Diff line number Diff line change
Expand Up @@ -1191,8 +1191,17 @@ int wolfssl_provider_init(const OSSL_CORE_HANDLE* handle,
OSSL_FUNC_core_get_libctx_fn* c_get_libctx = NULL;

#ifdef WOLFPROV_DEBUG
ok = (wolfProv_Debugging_ON() == 0) && (wolfSSL_Debugging_ON() == 0);
wolfSSL_SetLoggingPrefix("wolfSSL");
ok = (wolfProv_Debugging_ON() == 0);
if (ok) {
if (wolfSSL_Debugging_ON() != 0) {
WOLFPROV_MSG(WP_LOG_PROVIDER,
"WARNING: wolfProvider built with debug but underlying wolfSSL is not!"
"Building wolfSSl with debug is highly recommended, proceeding...");
}
else {
wolfSSL_SetLoggingPrefix("wolfSSL");
}
}
#endif

#ifdef HAVE_FIPS
Expand All @@ -1204,8 +1213,8 @@ int wolfssl_provider_init(const OSSL_CORE_HANDLE* handle,
#if defined(XGETENV) && !defined(NO_GETENV)
forceFailEnv = XGETENV("WOLFPROV_FORCE_FAIL");
if (forceFailEnv != NULL && XATOI(forceFailEnv) == 1) {
WOLFPROV_MSG(WP_LOG_PROVIDER, "WOLFPROV_FORCE_FAIL=1, Forcing failure\n");
forceFail = 1;
WOLFPROV_MSG(WP_LOG_PROVIDER, "WOLFPROV_FORCE_FAIL=1, Forcing failure\n");
forceFail = 1;
}
#else
#error "Force failure check enabled but impossible to perform without XGETENV, use -DWP_NO_FORCE_FAIL"
Expand Down