]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
Use header presence status to avoid openssl engine
authorPetr Menšík <pemensik@redhat.com>
Fri, 19 Jul 2024 11:04:40 +0000 (13:04 +0200)
committerPetr Menšík <pemensik@redhat.com>
Fri, 19 Jul 2024 11:35:15 +0000 (13:35 +0200)
Include presence of openssl/engine.h as indication engines should not be
used. Skip engine if header is not present.

examples/ldns-signzone.c
keys.c

index 9425833e53b69a0ca3520ee1800b8f905698abd7..509a023d1e24301dd0bc34fd3799c751df50cd44 100644 (file)
 #include <ldns/keys.h>
 
 #include <openssl/conf.h>
-#ifndef OPENSSL_NO_ENGINE
+#if defined(HAVE_OPENSSL_ENGINE_H) && !defined(OPENSSL_NO_ENGINE)
 #include <openssl/engine.h>
+#else
+#  ifndef OPENSSL_NO_ENGINE
+#  define OPENSSL_NO_ENGINE
+#  endif
 #endif
 #include <openssl/err.h>
 
diff --git a/keys.c b/keys.c
index 59de186e66c1c3f89225c56feabde6cabd6e8c66..b0927391eaefe9d6446a48437170d0681ec085f6 100644 (file)
--- a/keys.c
+++ b/keys.c
 #ifdef USE_DSA
 #include <openssl/dsa.h>
 #endif
-#ifndef OPENSSL_NO_ENGINE
+#if defined(HAVE_OPENSSL_ENGINE_H) && !defined(OPENSSL_NO_ENGINE)
 #include <openssl/engine.h>
+#else
+#  ifndef OPENSSL_NO_ENGINE
+#  define OPENSSL_NO_ENGINE
+#  endif
 #endif
 #endif /* HAVE_SSL */