Change HAVE_NETTLEHASH compile-time to HAVE_CRYPTOHASH.

HAVE_NETTLEHASH is retained for backwards compatibility, but deprecated.
This commit is contained in:
Simon Kelley committed 2021-01-24 21:53:28 +00:00
1 parent e75069f79a
commit a69b017902
5 files changed
+15 -9

No files matched your search

+2 -2
View File
@@ -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 @@ unsigned char *hash_questions(struct dns_header *header, size_t plen, char *name
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