From 2fe9ed17647a8312e18002cb76c0919a60a4fec8 Mon Sep 17 00:00:00 2001 From: Jakub Jelen Date: Thu, 4 Jul 2024 19:20:40 +0200 Subject: [PATCH] libcrypto: Remove the need for the engine.h Turns out it indirectly included err.h, which was needed for some other uses in this file. Signed-off-by: Jakub Jelen Reviewed-by: Sahana Prasad Reviewed-by: Eshan Kelkar --- src/libcrypto.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/libcrypto.c b/src/libcrypto.c index e69f3194..b2e95cfe 100644 --- a/src/libcrypto.c +++ b/src/libcrypto.c @@ -41,9 +41,10 @@ #ifdef HAVE_LIBCRYPTO +#include +#include #include #include -#include #if OPENSSL_VERSION_NUMBER < 0x30000000L #include #include @@ -52,7 +53,9 @@ #include #endif /* OPENSSL_VERSION_NUMBER */ #include +#if defined(WITH_PKCS11_URI) && !defined(WITH_PKCS11_PROVIDER) #include +#endif #include "libcrypto-compat.h" @@ -93,7 +96,7 @@ void ssh_reseed(void){ #endif } -#ifndef WITH_PKCS11_PROVIDER +#if defined(WITH_PKCS11_URI) && !defined(WITH_PKCS11_PROVIDER) static ENGINE *engine = NULL; ENGINE *pki_get_engine(void) @@ -125,7 +128,7 @@ ENGINE *pki_get_engine(void) } return engine; } -#endif /* WITH_PKCS11_PROVIDER */ +#endif /* defined(WITH_PKCS11_URI) && !defined(WITH_PKCS11_PROVIDER) */ #ifdef HAVE_OPENSSL_EVP_KDF_CTX #if OPENSSL_VERSION_NUMBER < 0x30000000L