0001-Fix-build-with-LibreSSL-following-commit-537f37898.patch 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. From 0276d5c239c41b3a63f738a5dc47fd56ac389cf0 Mon Sep 17 00:00:00 2001
  2. From: Ganael Laplanche <ganael.laplanche@martymac.org>
  3. Date: Thu, 20 Aug 2020 12:29:05 +0200
  4. Subject: [PATCH] Fix build with LibreSSL (following commit 537f37898)
  5. Upstream status: https://github.com/lavv17/lftp/commit/0276d5c239c41b3a63f738a5dc47fd56ac389cf0
  6. Signed-off-by: Artem Panfilov <artemp@synopsys.com>
  7. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
  8. ---
  9. src/lftp_ssl.cc | 6 +++---
  10. 1 file changed, 3 insertions(+), 3 deletions(-)
  11. diff --git a/src/lftp_ssl.cc b/src/lftp_ssl.cc
  12. index 14a3b9d4..968d3fb2 100644
  13. --- a/src/lftp_ssl.cc
  14. +++ b/src/lftp_ssl.cc
  15. @@ -34,7 +34,7 @@
  16. #include "misc.h"
  17. #include "network.h"
  18. #include "buffer.h"
  19. -#if OPENSSL_VERSION_NUMBER < 0x10100000L
  20. +#if OPENSSL_VERSION_NUMBER < 0x10100000L || LIBRESSL_VERSION_NUMBER
  21. #define X509_STORE_CTX_get_by_subject X509_STORE_get_by_subject
  22. #endif
  23. extern "C" {
  24. @@ -840,7 +840,7 @@ lftp_ssl_openssl_instance::lftp_ssl_openssl_instance()
  25. ssl_ctx=SSL_CTX_new();
  26. X509_set_default_verify_paths(ssl_ctx->cert);
  27. #else
  28. -#if OPENSSL_VERSION_NUMBER < 0x10100000L
  29. +#if OPENSSL_VERSION_NUMBER < 0x10100000L || LIBRESSL_VERSION_NUMBER
  30. SSLeay_add_ssl_algorithms();
  31. #endif
  32. ssl_ctx=SSL_CTX_new(SSLv23_client_method());
  33. @@ -1080,7 +1080,7 @@ void lftp_ssl_openssl::copy_sid(const lftp_ssl_openssl *o)
  34. const char *lftp_ssl_openssl::strerror()
  35. {
  36. -#if OPENSSL_VERSION_NUMBER < 0x10100000L
  37. +#if OPENSSL_VERSION_NUMBER < 0x10100000L || LIBRESSL_VERSION_NUMBER
  38. SSL_load_error_strings();
  39. #endif
  40. int error=ERR_get_error();
  41. --
  42. 2.25.1