Fix building with enable-trace
authorMatt Caswell <matt@openssl.org>
Fri, 14 Jun 2019 08:07:29 +0000 (09:07 +0100)
committerMatt Caswell <matt@openssl.org>
Fri, 14 Jun 2019 08:08:01 +0000 (09:08 +0100)
Tracing doesn't work in the FIPS module. Ensure we switch it off there.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/9159)

crypto/bn/bn_ctx.c

index 882f3bc06e6a09fbba23c21f15f48674e43f91e2..476211411a0c1dd56aea35eec235baa9ebdbb52f 100644 (file)
@@ -166,6 +166,7 @@ void BN_CTX_free(BN_CTX *ctx)
 {
     if (ctx == NULL)
         return;
+#ifndef FIPS_MODE
     OSSL_TRACE_BEGIN(BN_CTX) {
         BN_POOL_ITEM *pool = ctx->pool.head;
         BIO_printf(trc_out,
@@ -180,6 +181,7 @@ void BN_CTX_free(BN_CTX *ctx)
         }
         BIO_printf(trc_out, "\n");
     } OSSL_TRACE_END(BN_CTX);
+#endif
     BN_STACK_finish(&ctx->stack);
     BN_POOL_finish(&ctx->pool);
     OPENSSL_free(ctx);