Skip to content

Commit

Permalink
Do not call BIO_printf() from FIPS_MODULE
Browse files Browse the repository at this point in the history
  • Loading branch information
t8m committed Feb 13, 2025
1 parent 5949918 commit d80f6c5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion crypto/property/property.c
Original file line number Diff line number Diff line change
Expand Up @@ -409,13 +409,15 @@ int ossl_method_store_add(OSSL_METHOD_STORE *store, const OSSL_PROVIDER *prov,
if (i == sk_IMPLEMENTATION_num(alg->impls)
&& sk_IMPLEMENTATION_push(alg->impls, impl)) {
ret = 1;
#ifndef FIPS_MODULE
OSSL_TRACE_BEGIN(QUERY) {
BIO_printf(trc_out, "Adding to method store "
"nid: %d\nproperties: %s\nprovider: %s\n",
nid, properties,
ossl_provider_name(prov) == NULL ? "none" :
ossl_provider_name(prov));
} OSSL_TRACE_END(QUERY);
#endif
}
ossl_property_unlock(store);
if (ret == 0)
Expand Down Expand Up @@ -500,7 +502,7 @@ alg_cleanup_by_provider(ossl_uintmax_t idx, ALGORITHM *alg, void *arg)
IMPLEMENTATION *impl = sk_IMPLEMENTATION_value(alg->impls, i);

if (impl->provider == data->prov) {

#ifndef FIPS_MODULE
OSSL_TRACE_BEGIN(QUERY) {
char buf[512];
size_t size;
Expand All @@ -513,6 +515,7 @@ alg_cleanup_by_provider(ossl_uintmax_t idx, ALGORITHM *alg, void *arg)
ossl_provider_name(impl->provider) == NULL ? "none" :
ossl_provider_name(impl->provider));
} OSSL_TRACE_END(QUERY);
#endif

(void)sk_IMPLEMENTATION_delete(alg->impls, i);
count++;
Expand Down Expand Up @@ -720,6 +723,7 @@ int ossl_method_store_fetch(OSSL_METHOD_STORE *store,
ret = 0;
}

#ifndef FIPS_MODULE
OSSL_TRACE_BEGIN(QUERY) {
char buf[512];
int size;
Expand All @@ -731,6 +735,7 @@ int ossl_method_store_fetch(OSSL_METHOD_STORE *store,
best_impl == NULL ? "none" :
ossl_provider_name(best_impl->provider));
} OSSL_TRACE_END(QUERY);
#endif

ossl_property_unlock(store);
ossl_property_free(p2);
Expand Down

0 comments on commit d80f6c5

Please sign in to comment.