Skip to contentSkip to conversation

configure: disable engines if OPENSSL_NO_ENGINE is defined

PATCH In review [email protected]... 2 participants 2 messages Sep 9, 2023 – Sep 10, 2023 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): https://sourceforge.net/p/openvpn/mailman/message/37893638/

#1 lore raw

PATCH v2 1/1 configure: disable engines if OPENSSL_NO_ENGINE is defined

From: orbea <[email protected]...>

Starting with LibreSSL 3.8.1 the engines have been removed which causes the OpenVPN build to fail. This can be solved during configure by checking if OPENSSL_NO_ENGINE is defined in opensslconf.h.

---
 configure.ac | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
configure.ac +7 -1
index 2f65cbd5..266b66f0 100644
@@ -927,11 +927,17 @@ if test "${with_crypto_library}" = "openssl"; then
 				    [AC_LANG_PROGRAM(
 					    [[
 	    #include <openssl/opensslv.h>
+	    #include <openssl/opensslconf.h>
 					    ]],
 					    [[
 	    /*	     Version encoding: MNNFFPPS - see opensslv.h for details */
 	    #if OPENSSL_VERSION_NUMBER >= 0x30000000L
-	    #error Engine supported disabled by default in OpenSSL 3.0+
+	    #error Engine support disabled by default in OpenSSL 3.0+
+	    #endif
+
+	    /*	     BoringSSL and LibreSSL >= 3.8.1 removed engine support */
+	    #ifdef OPENSSL_NO_ENGINE
+	    #error Engine support disabled in openssl/opensslconf.h
 	    #endif
 					    ]]
 				    )],
Signature · 1 line
2.41.0
Acked-by on v2 1/1
#2 lore raw

Compile-tested on our GH Actions farm (OpenSSL 1.1 and 3.0, on various OSes). Not tested against LibreSSL.

Your patch has been applied to the master and release/2.6 branch (compat).

commit 34bf473e19118eecf525e7401ef37b1cbf661e67 (master) commit a22f017ac249df1170a9480b5d7a1f9cc81201e5 (release/2.6)

Author: orbea
Date:   Sat Sep 9 06:49:56 2023 -0700
     configure: disable engines if OPENSSL_NO_ENGINE is defined

     Signed-off-by: orbea <[email protected]...>
     Acked-by: Gert Doering <[email protected]...>
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg26994.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering