dnsmasq: compatibility with nettle 3.0
[openwrt/openwrt.git] / package / network / services / dnsmasq / patches / 120-nettle-3.0-compatibility.patch
1 --- a/src/dnssec.c
2 +++ b/src/dnssec.c
3 @@ -20,7 +20,7 @@
4 #ifdef HAVE_DNSSEC
5
6 #include <nettle/rsa.h>
7 -#include <nettle/dsa.h>
8 +#include <nettle/dsa-compat.h>
9 #ifndef NO_NETTLE_ECC
10 # include <nettle/ecdsa.h>
11 # include <nettle/ecc-curve.h>
12 @@ -173,7 +173,7 @@ static int rsa_verify(struct blockdata *
13 return 0;
14 }
15
16 -static int dsa_verify(struct blockdata *key_data, unsigned int key_len, unsigned char *sig, size_t sig_len,
17 +static int dnsmasq_dsa_verify(struct blockdata *key_data, unsigned int key_len, unsigned char *sig, size_t sig_len,
18 unsigned char *digest, int algo)
19 {
20 unsigned char *p;
21 @@ -296,7 +296,7 @@ static int verify(struct blockdata *key_
22 return rsa_verify(key_data, key_len, sig, sig_len, digest, algo);
23
24 case 3: case 6:
25 - return dsa_verify(key_data, key_len, sig, sig_len, digest, algo);
26 + return dnsmasq_dsa_verify(key_data, key_len, sig, sig_len, digest, algo);
27
28 #ifndef NO_NETTLE_ECC
29 case 13: case 14: