Change HAVE_NETTLEHASH compile-time to HAVE_CRYPTOHASH.
HAVE_NETTLEHASH is retained for backwards compatibility, but deprecated.
diff --git a/src/config.h b/src/config.h
index e71a117..ba461b7 100644
--- a/src/config.h
+++ b/src/config.h
@@ -120,8 +120,8 @@
define this to include the facility to act as an authoritative DNS
server for one or more zones.
-HAVE_NETTLEHASH
- include just hash function from nettle, but no DNSSEC.
+HAVE_CRYPTOHASH
+ include just hash function from crypto library, but no DNSSEC.
HAVE_DNSSEC
include DNSSEC validator.
@@ -190,7 +190,7 @@
/* #define HAVE_IDN */
/* #define HAVE_LIBIDN2 */
/* #define HAVE_CONNTRACK */
-/* #define HAVE_NETTLEHASH */
+/* #define HAVE_CRYPTOHASH */
/* #define HAVE_DNSSEC */
@@ -424,10 +424,10 @@
"no-"
#endif
"auth "
-#if !defined(HAVE_NETTLEHASH) && !defined(HAVE_DNSSEC)
+#if !defined(HAVE_CRYPTOHASH) && !defined(HAVE_DNSSEC)
"no-"
#endif
-"nettlehash "
+"cryptohash "
#ifndef HAVE_DNSSEC
"no-"
#endif
diff --git a/src/crypto.c b/src/crypto.c
index 09525d2..5f4c390 100644
--- a/src/crypto.c
+++ b/src/crypto.c
@@ -27,7 +27,7 @@
#endif
#endif
-#if defined(HAVE_DNSSEC) || defined(HAVE_NETTLEHASH)
+#if defined(HAVE_DNSSEC) || defined(HAVE_CRYPTOHASH)
#include <nettle/nettle-meta.h>
#include <nettle/bignum.h>
diff --git a/src/dnsmasq.h b/src/dnsmasq.h
index 8493285..f8d7d96 100644
--- a/src/dnsmasq.h
+++ b/src/dnsmasq.h
@@ -157,7 +157,11 @@
#include <priv.h>
#endif
-#if defined(HAVE_DNSSEC) || defined(HAVE_NETTLEHASH)
+/* Backwards compat with 2.83 */
+#if defined(HAVE_NETTLEHASH)
+# define HAVE_CRYPTOHASH
+#endif
+#if defined(HAVE_DNSSEC) || defined(HAVE_CRYPTOHASH)
# include <nettle/nettle-meta.h>
#endif
diff --git a/src/hash_questions.c b/src/hash_questions.c
index fad32d7..8b96505 100644
--- a/src/hash_questions.c
+++ b/src/hash_questions.c
@@ -28,7 +28,7 @@
#include "dnsmasq.h"
-#if defined(HAVE_DNSSEC) || defined(HAVE_NETTLEHASH)
+#if defined(HAVE_DNSSEC) || defined(HAVE_CRYPTOHASH)
static const struct nettle_hash *hash;
static void *ctx;
@@ -71,7 +71,7 @@
return digest;
}
-#else /* HAVE_DNSSEC */
+#else /* HAVE_DNSSEC || HAVE_CRYPTOHASH */
#define SHA256_BLOCK_SIZE 32 // SHA256 outputs a 32 byte digest
typedef unsigned char BYTE; // 8-bit byte