You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.4 KiB

  1. From cee98e71bb3d69e41cd4d2c6e33c68639dd1eaf0 Mon Sep 17 00:00:00 2001
  2. From: Rosen Penev <rosenp@gmail.com>
  3. Date: Thu, 5 Dec 2019 12:13:44 -0800
  4. Subject: [PATCH] Fix compilation without deprecated APIs
  5. ---
  6. dnssec_verify.c | 2 ++
  7. drill/drill.c | 2 ++
  8. keys.c | 1 +
  9. 3 files changed, 5 insertions(+)
  10. diff --git a/dnssec_verify.c b/dnssec_verify.c
  11. index d22962eb..99a7515d 100644
  12. --- a/dnssec_verify.c
  13. +++ b/dnssec_verify.c
  14. @@ -597,7 +597,9 @@ ldns_dnssec_trust_tree_print_sm_fmt(FILE *out,
  15. if (tree->parent_status[i]
  16. == LDNS_STATUS_SSL_ERR) {
  17. printf("; SSL Error: ");
  18. +#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(HAVE_LIBRESSL)
  19. ERR_load_crypto_strings();
  20. +#endif
  21. ERR_print_errors_fp(stdout);
  22. printf("\n");
  23. }
  24. diff --git a/drill/drill.c b/drill/drill.c
  25. index 6efd29a5..186bdff2 100644
  26. --- a/drill/drill.c
  27. +++ b/drill/drill.c
  28. @@ -994,10 +994,12 @@ main(int argc, char *argv[])
  29. xfree(tsig_algorithm);
  30. #ifdef HAVE_SSL
  31. +#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(HAVE_LIBRESSL)
  32. CRYPTO_cleanup_all_ex_data();
  33. ERR_free_strings();
  34. EVP_cleanup();
  35. #endif
  36. +#endif
  37. #ifdef USE_WINSOCK
  38. WSACleanup();
  39. #endif
  40. diff --git a/keys.c b/keys.c
  41. index 016f9731..06afb739 100644
  42. --- a/keys.c
  43. +++ b/keys.c
  44. @@ -15,6 +15,7 @@
  45. #include <ldns/ldns.h>
  46. #ifdef HAVE_SSL
  47. +#include <openssl/ui.h>
  48. #include <openssl/ssl.h>
  49. #include <openssl/rand.h>
  50. #include <openssl/bn.h>