]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
autoconf: Fix engine checks for openssl 1.1
authorJames Bottomley <James.Bottomley@HansenPartnership.com>
Sun, 29 Oct 2017 15:34:48 +0000 (15:34 +0000)
committerGert Doering <gert@greenie.muc.de>
Sat, 4 Nov 2017 17:54:57 +0000 (18:54 +0100)
In openssl 1.1, ENGINE_cleanup became a #define instead of a function
(because it's no longer needed as engines are self cleaning).  Update
the autoconf.ac script to check for ENGINE_cleanup as a declaration to
avoid falsely undefinig HAVE_OPENSSL_ENGINE in openssl 1.1+

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Acked-by: Steffan Karger <steffan.karger@fox-it.com>
Message-Id: <1509291288.3116.14.camel@HansenPartnership.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg15676.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit 6b5dbf6c8da0ff82fa1dca4eb4665be0a4fe31d3)

configure.ac

index bc014221473391d92ab4e12920f851515e451863..afcecb1373e2bf156985d2b6c66592649640a7e3 100644 (file)
@@ -879,6 +879,13 @@ if test "${enable_crypto}" = "yes" -a "${with_crypto_library}" = "openssl"; then
                ,
                [have_openssl_engine="no"; break]
        )
+       if test "${have_openssl_engine}" = "no"; then
+               AC_CHECK_DECL( [ENGINE_cleanup], [have_openssl_engine="yes"],,
+                       [[
+                               #include <openssl/engine.h>
+                       ]]
+               )
+       fi
        if test "${have_openssl_engine}" = "yes"; then
                AC_DEFINE([HAVE_OPENSSL_ENGINE], [1], [OpenSSL engine support available])
        fi