aboutsummaryrefslogtreecommitdiff
path: root/dns/dnsmasq
diff options
context:
space:
mode:
authorMatthias Andree <mandree@FreeBSD.org>2019-07-08 01:40:36 +0000
committerMatthias Andree <mandree@FreeBSD.org>2019-07-08 01:40:36 +0000
commit825cdd64f41480b0d803d73044dd4a9fbbd54235 (patch)
tree4ce4f46358e2d0ab3d865dc0a1bb66b16816ce37 /dns/dnsmasq
parent8abfdc2b2be96beba09920fb451ca85cf9cf913d (diff)
downloadports-825cdd64f41480b0d803d73044dd4a9fbbd54235.tar.gz
ports-825cdd64f41480b0d803d73044dd4a9fbbd54235.zip
Make compatible with nettle >= 3.5 (not yet in ports)
Notes
Notes: svn path=/head/; revision=506199
Diffstat (limited to 'dns/dnsmasq')
-rw-r--r--dns/dnsmasq/files/patch-src_crypto.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/dns/dnsmasq/files/patch-src_crypto.c b/dns/dnsmasq/files/patch-src_crypto.c
new file mode 100644
index 000000000000..caf63280d398
--- /dev/null
+++ b/dns/dnsmasq/files/patch-src_crypto.c
@@ -0,0 +1,31 @@
+--- src/crypto.c.orig 2018-10-18 18:21:55 UTC
++++ src/crypto.c
+@@ -275,6 +275,10 @@ static int dnsmasq_ecdsa_verify(struct blockdata *key_
+ 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 blockdata *key_
+ 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 blockdata *key_
+ 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;