050-crypto-use-nettle-ecc_curve-access-functions.patch 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. From 1f55b09dd88bc65b3ee6e3a665bc844a5a9a9e8d Mon Sep 17 00:00:00 2001
  2. From: Hans Dedecker <dedeckeh@gmail.com>
  3. Date: Fri, 9 Aug 2019 21:08:17 +0200
  4. Subject: [PATCH] crypto: use nettle ecc_curve access functions
  5. Nettle 3.5.1 has made ecc_curve definitions (nettle_secp_192r1,
  6. nettle_secp_224r1, nettle_secp_256r1, ...) private and forces
  7. users to make use of the accessor functions (nettle_get_secp_192r1,
  8. ...) to retrieve the specific ecc_curve structs.
  9. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
  10. ---
  11. src/crypto.c | 4 ++--
  12. 1 file changed, 2 insertions(+), 2 deletions(-)
  13. --- a/src/crypto.c
  14. +++ b/src/crypto.c
  15. @@ -301,7 +301,7 @@ static int dnsmasq_ecdsa_verify(struct b
  16. if (!(key_256 = whine_malloc(sizeof(struct ecc_point))))
  17. return 0;
  18. - nettle_ecc_point_init(key_256, &nettle_secp_256r1);
  19. + nettle_ecc_point_init(key_256, nettle_get_secp_256r1());
  20. }
  21. key = key_256;
  22. @@ -314,7 +314,7 @@ static int dnsmasq_ecdsa_verify(struct b
  23. if (!(key_384 = whine_malloc(sizeof(struct ecc_point))))
  24. return 0;
  25. - nettle_ecc_point_init(key_384, &nettle_secp_384r1);
  26. + nettle_ecc_point_init(key_384, nettle_get_secp_384r1());
  27. }
  28. key = key_384;