Skip to content

Commit 1ae9e85

Browse files
committed
Allow wolfProvider to be built with debug when wolfSSL is not built with debug
1 parent c1f7010 commit 1ae9e85

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/wp_wolfprov.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,8 +1191,17 @@ int wolfssl_provider_init(const OSSL_CORE_HANDLE* handle,
11911191
OSSL_FUNC_core_get_libctx_fn* c_get_libctx = NULL;
11921192

11931193
#ifdef WOLFPROV_DEBUG
1194-
ok = (wolfProv_Debugging_ON() == 0) && (wolfSSL_Debugging_ON() == 0);
1195-
wolfSSL_SetLoggingPrefix("wolfSSL");
1194+
ok = (wolfProv_Debugging_ON() == 0);
1195+
if (ok) {
1196+
if (wolfSSL_Debugging_ON() != 0) {
1197+
WOLFPROV_MSG(WP_LOG_PROVIDER,
1198+
"WARNING: wolfProvider built with debug but underlying wolfSSL is not!"
1199+
"Building wolfSSl with debug is highly recommended, proceeding...");
1200+
}
1201+
else {
1202+
wolfSSL_SetLoggingPrefix("wolfSSL");
1203+
}
1204+
}
11961205
#endif
11971206

11981207
#ifdef HAVE_FIPS

0 commit comments

Comments
 (0)