]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Put proper guards in openssl_shim.{c,h} when compiling with PKCS#11
authorOndřej Surý <ondrej@sury.org>
Thu, 14 Jun 2018 21:54:48 +0000 (23:54 +0200)
committerOndřej Surý <ondrej@isc.org>
Thu, 14 Jun 2018 21:58:03 +0000 (17:58 -0400)
lib/isc/openssl_shim.c
lib/isc/openssl_shim.h

index 96455fc204742694468192b1f4af97aad6b36bae..70435c9c6e61f49d404e2636451c1878d8399a44 100644 (file)
 
 #include <config.h>
 
+#if HAVE_OPENSSL
+
 #include <openssl/opensslv.h>
 
-#if HAVE_OPENSSL && (OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER))
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
 
 #include <stdlib.h>
 #include <string.h>
@@ -92,4 +94,6 @@ int HMAC_CTX_reset(HMAC_CTX *ctx) {
        return 1;
 }
 
-#endif
+#endif /* OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) */
+
+#endif /* HAVE_OPENSSL */
index b10b63b1a258a0a21983f952310097af8bcb6fd2..d6ff64a595af86ab5e0af233d4bef32645f68952 100644 (file)
@@ -9,11 +9,12 @@
  * information regarding copyright ownership.
  */
 
-#ifndef ISC_OPENSSL_P_H
-#define ISC_OPENSSL_P_H
+#pragma once
 
 #include <config.h>
 
+#if HAVE_OPENSSL
+
 #include <openssl/opensslv.h>
 
 #if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
@@ -31,6 +32,6 @@ HMAC_CTX *HMAC_CTX_new(void);
 void HMAC_CTX_free(HMAC_CTX *ctx);
 int HMAC_CTX_reset(HMAC_CTX *ctx);
 
-#endif /* ISC_OPENSSL_P_H */
+#endif /* OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) */
 
-#endif /* ISC_OPENSSL_P_H */
+#endif /* HAVE_OPENSSL */