mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 18:28:25 +00:00
Fix build with libnettle 3.5
This commit is contained in:
committed by
Simon Kelley
parent
69bc94779c
commit
ab73a746a0
@@ -275,6 +275,10 @@ static int dnsmasq_ecdsa_verify(struct blockdata *key_data, unsigned int key_len
|
|||||||
static struct ecc_point *key_256 = NULL, *key_384 = NULL;
|
static struct ecc_point *key_256 = NULL, *key_384 = NULL;
|
||||||
static mpz_t x, y;
|
static mpz_t x, y;
|
||||||
static struct dsa_signature *sig_struct;
|
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)
|
if (!sig_struct)
|
||||||
{
|
{
|
||||||
@@ -294,7 +298,7 @@ static int dnsmasq_ecdsa_verify(struct blockdata *key_data, unsigned int key_len
|
|||||||
if (!(key_256 = whine_malloc(sizeof(struct ecc_point))))
|
if (!(key_256 = whine_malloc(sizeof(struct ecc_point))))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
nettle_ecc_point_init(key_256, &nettle_secp_256r1);
|
nettle_ecc_point_init(key_256, nettle_get_secp_256r1());
|
||||||
}
|
}
|
||||||
|
|
||||||
key = key_256;
|
key = key_256;
|
||||||
@@ -307,7 +311,7 @@ static int dnsmasq_ecdsa_verify(struct blockdata *key_data, unsigned int key_len
|
|||||||
if (!(key_384 = whine_malloc(sizeof(struct ecc_point))))
|
if (!(key_384 = whine_malloc(sizeof(struct ecc_point))))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
nettle_ecc_point_init(key_384, &nettle_secp_384r1);
|
nettle_ecc_point_init(key_384, nettle_get_secp_384r1());
|
||||||
}
|
}
|
||||||
|
|
||||||
key = key_384;
|
key = key_384;
|
||||||
|
|||||||
Reference in New Issue
Block a user