From ae7c0ac55c305a57d802b12ebd1558aafc9fdfad Mon Sep 17 00:00:00 2001 From: Jakub Jelen Date: Tue, 20 Aug 2024 18:32:31 +0200 Subject: [PATCH] Unbreak the build by removing the engine.h dependency --- libssh-0.10.6-no-engine.patch | 48 +++++++++++++++++++++++++++++++++++ libssh.spec | 1 + 2 files changed, 49 insertions(+) create mode 100644 libssh-0.10.6-no-engine.patch diff --git a/libssh-0.10.6-no-engine.patch b/libssh-0.10.6-no-engine.patch new file mode 100644 index 0000000..d38a36a --- /dev/null +++ b/libssh-0.10.6-no-engine.patch @@ -0,0 +1,48 @@ +diff -up libssh-0.10.6/src/libcrypto.c.no-engine libssh-0.10.6/src/libcrypto.c +--- libssh-0.10.6/src/libcrypto.c.no-engine 2024-07-31 09:25:56.460404672 +0200 ++++ libssh-0.10.6/src/libcrypto.c 2024-07-31 09:28:46.900273530 +0200 +@@ -94,7 +94,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) +@@ -126,7 +126,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 +diff -up libssh-0.10.6/src/pki_crypto.c.no-engine libssh-0.10.6/src/pki_crypto.c +--- libssh-0.10.6/src/pki_crypto.c.no-engine 2024-07-31 09:26:34.296823306 +0200 ++++ libssh-0.10.6/src/pki_crypto.c 2024-07-31 09:29:36.414810967 +0200 +@@ -33,7 +33,9 @@ + + #include + #include ++#if defined(WITH_PKCS11_URI) && !defined(WITH_PKCS11_PROVIDER) + #include ++#endif + #include + #if OPENSSL_VERSION_NUMBER < 0x30000000L + #include +diff -up libssh-0.10.6/src/libcrypto.c.no-engine libssh-0.10.6/src/libcrypto.c +--- libssh-0.10.6/src/libcrypto.c.no-engine 2024-07-31 11:03:45.262319724 +0200 ++++ libssh-0.10.6/src/libcrypto.c 2024-07-31 11:04:59.842161279 +0200 +@@ -53,7 +53,9 @@ + #include + #endif /* OPENSSL_VERSION_NUMBER */ + #include ++#if defined(WITH_PKCS11_URI) && !defined(WITH_PKCS11_PROVIDER) + #include ++#endif + + #include "libcrypto-compat.h" + + diff --git a/libssh.spec b/libssh.spec index ebb71d8..4834db8 100644 --- a/libssh.spec +++ b/libssh.spec @@ -26,6 +26,7 @@ Patch2: libssh-0.10.6-ipv6-hostname.patch # 2c876464ab0a27387a122c6a4b39ec187a6fc596 ecdh: Fix missing-prototype warning # 2c918aad6763754bdffb84796b410e21f24bb7ec tests: Use /tmp for tmpdirs that contain sockets Patch3: libssh-0.10.6-pkcs11-provider.patch +Patch4: libssh-0.10.6-no-engine.patch BuildRequires: cmake BuildRequires: gcc-c++