mirror of
https://github.com/openssl/openssl.git
synced 2025-03-13 19:47:47 +08:00
cmp_util.c: Fix OSSL_CMP_log_open() in case OPENSSL_NO_TRACE
Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14842)
This commit is contained in:
parent
f56c9c7c94
commit
9518f8957a
@ -22,15 +22,19 @@
|
||||
|
||||
int OSSL_CMP_log_open(void) /* is designed to be idempotent */
|
||||
{
|
||||
#ifndef OPENSSL_NO_STDIO
|
||||
#ifdef OPENSSL_NO_TRACE
|
||||
return 1;
|
||||
#else
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
BIO *bio = BIO_new_fp(stdout, BIO_NOCLOSE);
|
||||
|
||||
if (bio != NULL && OSSL_trace_set_channel(OSSL_TRACE_CATEGORY_CMP, bio))
|
||||
return 1;
|
||||
BIO_free(bio);
|
||||
#endif
|
||||
# endif
|
||||
ERR_raise(ERR_LIB_CMP, CMP_R_NO_STDIO);
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
void OSSL_CMP_log_close(void) /* is designed to be idempotent */
|
||||
|
Loading…
x
Reference in New Issue
Block a user