mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 10:18:25 +00:00
Change HAVE_NETTLEHASH compile-time to HAVE_CRYPTOHASH.
HAVE_NETTLEHASH is retained for backwards compatibility, but deprecated.
This commit is contained in:
2
Makefile
2
Makefile
@@ -63,8 +63,10 @@ ct_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_CONNTRACK $(PKG_CON
|
|||||||
lua_cflags = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LUASCRIPT $(PKG_CONFIG) --cflags lua5.2`
|
lua_cflags = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LUASCRIPT $(PKG_CONFIG) --cflags lua5.2`
|
||||||
lua_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LUASCRIPT $(PKG_CONFIG) --libs lua5.2`
|
lua_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LUASCRIPT $(PKG_CONFIG) --libs lua5.2`
|
||||||
nettle_cflags = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DNSSEC $(PKG_CONFIG) --cflags 'nettle hogweed' \
|
nettle_cflags = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DNSSEC $(PKG_CONFIG) --cflags 'nettle hogweed' \
|
||||||
|
HAVE_CRYPTOHASH $(PKG_CONFIG) --cflags nettle \
|
||||||
HAVE_NETTLEHASH $(PKG_CONFIG) --cflags nettle`
|
HAVE_NETTLEHASH $(PKG_CONFIG) --cflags nettle`
|
||||||
nettle_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DNSSEC $(PKG_CONFIG) --libs 'nettle hogweed' \
|
nettle_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DNSSEC $(PKG_CONFIG) --libs 'nettle hogweed' \
|
||||||
|
HAVE_CRYPTOHASH $(PKG_CONFIG) --libs nettle \
|
||||||
HAVE_NETTLEHASH $(PKG_CONFIG) --libs nettle`
|
HAVE_NETTLEHASH $(PKG_CONFIG) --libs nettle`
|
||||||
gmp_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DNSSEC NO_GMP --copy -lgmp`
|
gmp_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DNSSEC NO_GMP --copy -lgmp`
|
||||||
sunos_libs = `if uname | grep SunOS >/dev/null 2>&1; then echo -lsocket -lnsl -lposix4; fi`
|
sunos_libs = `if uname | grep SunOS >/dev/null 2>&1; then echo -lsocket -lnsl -lposix4; fi`
|
||||||
|
|||||||
10
src/config.h
10
src/config.h
@@ -120,8 +120,8 @@ HAVE_AUTH
|
|||||||
define this to include the facility to act as an authoritative DNS
|
define this to include the facility to act as an authoritative DNS
|
||||||
server for one or more zones.
|
server for one or more zones.
|
||||||
|
|
||||||
HAVE_NETTLEHASH
|
HAVE_CRYPTOHASH
|
||||||
include just hash function from nettle, but no DNSSEC.
|
include just hash function from crypto library, but no DNSSEC.
|
||||||
|
|
||||||
HAVE_DNSSEC
|
HAVE_DNSSEC
|
||||||
include DNSSEC validator.
|
include DNSSEC validator.
|
||||||
@@ -190,7 +190,7 @@ RESOLVFILE
|
|||||||
/* #define HAVE_IDN */
|
/* #define HAVE_IDN */
|
||||||
/* #define HAVE_LIBIDN2 */
|
/* #define HAVE_LIBIDN2 */
|
||||||
/* #define HAVE_CONNTRACK */
|
/* #define HAVE_CONNTRACK */
|
||||||
/* #define HAVE_NETTLEHASH */
|
/* #define HAVE_CRYPTOHASH */
|
||||||
/* #define HAVE_DNSSEC */
|
/* #define HAVE_DNSSEC */
|
||||||
|
|
||||||
|
|
||||||
@@ -424,10 +424,10 @@ static char *compile_opts =
|
|||||||
"no-"
|
"no-"
|
||||||
#endif
|
#endif
|
||||||
"auth "
|
"auth "
|
||||||
#if !defined(HAVE_NETTLEHASH) && !defined(HAVE_DNSSEC)
|
#if !defined(HAVE_CRYPTOHASH) && !defined(HAVE_DNSSEC)
|
||||||
"no-"
|
"no-"
|
||||||
#endif
|
#endif
|
||||||
"nettlehash "
|
"cryptohash "
|
||||||
#ifndef HAVE_DNSSEC
|
#ifndef HAVE_DNSSEC
|
||||||
"no-"
|
"no-"
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(HAVE_DNSSEC) || defined(HAVE_NETTLEHASH)
|
#if defined(HAVE_DNSSEC) || defined(HAVE_CRYPTOHASH)
|
||||||
#include <nettle/nettle-meta.h>
|
#include <nettle/nettle-meta.h>
|
||||||
#include <nettle/bignum.h>
|
#include <nettle/bignum.h>
|
||||||
|
|
||||||
|
|||||||
@@ -157,7 +157,11 @@ extern int capget(cap_user_header_t header, cap_user_data_t data);
|
|||||||
#include <priv.h>
|
#include <priv.h>
|
||||||
#endif
|
#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>
|
# include <nettle/nettle-meta.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
#include "dnsmasq.h"
|
#include "dnsmasq.h"
|
||||||
|
|
||||||
#if defined(HAVE_DNSSEC) || defined(HAVE_NETTLEHASH)
|
#if defined(HAVE_DNSSEC) || defined(HAVE_CRYPTOHASH)
|
||||||
|
|
||||||
static const struct nettle_hash *hash;
|
static const struct nettle_hash *hash;
|
||||||
static void *ctx;
|
static void *ctx;
|
||||||
@@ -71,7 +71,7 @@ unsigned char *hash_questions(struct dns_header *header, size_t plen, char *name
|
|||||||
return digest;
|
return digest;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* HAVE_DNSSEC */
|
#else /* HAVE_DNSSEC || HAVE_CRYPTOHASH */
|
||||||
|
|
||||||
#define SHA256_BLOCK_SIZE 32 // SHA256 outputs a 32 byte digest
|
#define SHA256_BLOCK_SIZE 32 // SHA256 outputs a 32 byte digest
|
||||||
typedef unsigned char BYTE; // 8-bit byte
|
typedef unsigned char BYTE; // 8-bit byte
|
||||||
|
|||||||
Reference in New Issue
Block a user