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.

38 lines
986 B

  1. From 0e31e37c0f6ad0b3f393f024d1f6d8ce448e4746 Mon Sep 17 00:00:00 2001
  2. From: Rosen Penev <rosenp@gmail.com>
  3. Date: Sat, 8 Dec 2018 18:39:50 -0800
  4. Subject: [PATCH] Platform: Fix compilation without deprecated OpenSSL APIs
  5. ---
  6. src/Platform.cc | 3 +++
  7. 1 file changed, 3 insertions(+)
  8. diff --git a/src/Platform.cc b/src/Platform.cc
  9. index ea73b6c6..d7882a97 100644
  10. --- a/src/Platform.cc
  11. +++ b/src/Platform.cc
  12. @@ -44,6 +44,7 @@
  13. #ifdef HAVE_OPENSSL
  14. #include <openssl/err.h>
  15. #include <openssl/ssl.h>
  16. +#include "libssl_compat.h"
  17. #endif // HAVE_OPENSSL
  18. #ifdef HAVE_LIBGCRYPT
  19. #include <gcrypt.h>
  20. @@ -111,11 +112,13 @@ bool Platform::setUp()
  21. #endif // ENABLE_NLS
  22. #ifdef HAVE_OPENSSL
  23. +#if !OPENSSL_101_API
  24. // for SSL initialization
  25. SSL_load_error_strings();
  26. SSL_library_init();
  27. // Need this to "decrypt" p12 files.
  28. OpenSSL_add_all_algorithms();
  29. +#endif // !OPENSSL_101_API
  30. #endif // HAVE_OPENSSL
  31. #ifdef HAVE_LIBGCRYPT
  32. if (!gcry_check_version("1.2.4")) {
  33. --
  34. 2.17.1