Skip to content

Commit

Permalink
TRACE: automatically respect disabled categories
Browse files Browse the repository at this point in the history
by OSSL_trace_begin() returning NULL when category is not enabled
  • Loading branch information
DDvO committed Oct 9, 2024
1 parent ee0bf38 commit e9e438f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crypto/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ BIO *OSSL_trace_begin(int category)
char *prefix = NULL;

category = ossl_trace_get_category(category);
if (category < 0)
if (category < 0 || !OSSL_trace_enabled(category))
return NULL;

channel = trace_channels[category].bio;
Expand Down

0 comments on commit e9e438f

Please sign in to comment.