summaryrefslogtreecommitdiff
path: root/dnsmasq/nettle-3.5.patch
blob: 9c28755cc57c1bce132f7d93a8a1a2d82c961c8a (plain)
    1 # http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2019q2/013096.html
    2 
    3 diff -Nru dnsmasq-2.80.orig/src/crypto.c dnsmasq-2.80/src/crypto.c
    4 --- dnsmasq-2.80.orig/src/crypto.c	2019-06-27 16:28:48.474960428 +0200
    5 +++ dnsmasq-2.80/src/crypto.c	2019-06-27 16:33:45.004283079 +0200
    6 @@ -275,6 +275,10 @@
    7    static struct ecc_point *key_256 = NULL, *key_384 = NULL;
    8    static mpz_t x, y;
    9    static struct dsa_signature *sig_struct;
   10 +#if NETTLE_VERSION_MAJOR == 3 && NETTLE_VERSION_MINOR < 5
   11 +#define nettle_get_secp_256r1() (&nettle_secp_256r1)
   12 +#define nettle_get_secp_384r1() (&nettle_secp_384r1)
   13 +#endif
   14    
   15    if (!sig_struct)
   16      {
   17 @@ -294,7 +298,7 @@
   18  	  if (!(key_256 = whine_malloc(sizeof(struct ecc_point))))
   19  	    return 0;
   20  	  
   21 -	  nettle_ecc_point_init(key_256, &nettle_secp_256r1);
   22 +	  nettle_ecc_point_init(key_256, nettle_get_secp_256r1());
   23  	}
   24        
   25        key = key_256;
   26 @@ -307,7 +311,7 @@
   27  	  if (!(key_384 = whine_malloc(sizeof(struct ecc_point))))
   28  	    return 0;
   29  	  
   30 -	  nettle_ecc_point_init(key_384, &nettle_secp_384r1);
   31 +	  nettle_ecc_point_init(key_384, nettle_get_secp_384r1());
   32  	}
   33        
   34        key = key_384;

Generated by cgit