From 6e971e326f81a54e76dc1dfc06721afc0e863bee Mon Sep 17 00:00:00 2001 From: bagginslin Date: Sat, 7 Sep 2019 13:57:24 +0100 Subject: [PATCH] Added patch which allows dnsmasq to be built with dnssec support for new nettle versions --- srcpkgs/dnsmasq/patches/nettle35.patch | 31 ++++++++++++++++++++++++++ srcpkgs/dnsmasq/template | 2 +- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/dnsmasq/patches/nettle35.patch diff --git a/srcpkgs/dnsmasq/patches/nettle35.patch b/srcpkgs/dnsmasq/patches/nettle35.patch new file mode 100644 index 00000000000..c87646d150e --- /dev/null +++ b/srcpkgs/dnsmasq/patches/nettle35.patch @@ -0,0 +1,31 @@ +--- src/crypto.c ++++ src/crypto.c +@@ -275,6 +275,10 @@ static int dnsmasq_ecdsa_verify(struct b + static struct ecc_point *key_256 = NULL, *key_384 = NULL; + static mpz_t x, y; + static struct dsa_signature *sig_struct; ++#if NETTLE_VERSION_MAJOR == 3 && NETTLE_VERSION_MINOR < 4 ++#define nettle_get_secp_256r1() (&nettle_secp_256r1) ++#define nettle_get_secp_384r1() (&nettle_secp_384r1) ++#endif + + if (!sig_struct) + { +@@ -294,7 +298,7 @@ static int dnsmasq_ecdsa_verify(struct b + if (!(key_256 = whine_malloc(sizeof(struct ecc_point)))) + return 0; + +- nettle_ecc_point_init(key_256, &nettle_secp_256r1); ++ nettle_ecc_point_init(key_256, nettle_get_secp_256r1()); + } + + key = key_256; +@@ -307,7 +311,7 @@ static int dnsmasq_ecdsa_verify(struct b + if (!(key_384 = whine_malloc(sizeof(struct ecc_point)))) + return 0; + +- nettle_ecc_point_init(key_384, &nettle_secp_384r1); ++ nettle_ecc_point_init(key_384, nettle_get_secp_384r1()); + } + + key = key_384; diff --git a/srcpkgs/dnsmasq/template b/srcpkgs/dnsmasq/template index 49824891f6f..121a58f92c8 100644 --- a/srcpkgs/dnsmasq/template +++ b/srcpkgs/dnsmasq/template @@ -1,7 +1,7 @@ # Template file for 'dnsmasq' pkgname=dnsmasq version=2.80 -revision=4 +revision=5 conf_files="/etc/dnsmasq.conf" hostmakedepends="pkg-config" makedepends="dbus-devel libcap-devel libidn2-devel $(vopt_if dnssec nettle-devel)"