From 74fea31cfbad88fb36e6c1b6b47e135b3f614f68 Mon Sep 17 00:00:00 2001 From: tb Date: Mon, 19 Jun 2023 18:32:05 +0000 Subject: [PATCH] Properly guard ENGINE usage with !OPENSSL_NO_ENGINE --- lib/libcrypto/crypto_init.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/libcrypto/crypto_init.c b/lib/libcrypto/crypto_init.c index ccf60223bc9..347f9542f1b 100644 --- a/lib/libcrypto/crypto_init.c +++ b/lib/libcrypto/crypto_init.c @@ -1,4 +1,4 @@ -/* $OpenBSD: crypto_init.c,v 1.8 2023/05/08 13:53:26 tb Exp $ */ +/* $OpenBSD: crypto_init.c,v 1.9 2023/06/19 18:32:05 tb Exp $ */ /* * Copyright (c) 2018 Bob Beck * @@ -21,7 +21,9 @@ #include #include +#ifndef OPENSSL_NO_ENGINE #include +#endif #include #include #include @@ -79,7 +81,9 @@ OPENSSL_cleanup(void) ERR_free_strings(); CRYPTO_cleanup_all_ex_data(); +#ifndef OPENSSL_NO_ENGINE ENGINE_cleanup(); +#endif EVP_cleanup(); x509_issuer_cache_free(); -- 2.20.1