0001-Fix-build-with-LibreSSL-2.7.patch 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. From 7490d449b518115a1ae86b01397e95c38e39cff1 Mon Sep 17 00:00:00 2001
  2. From: Bernard Spil <brnrd@FreeBSD.org>
  3. Date: Mon, 2 Apr 2018 20:00:07 +0200
  4. Subject: [PATCH] Fix build with LibreSSL 2.7
  5. LibreSSL 2.7 adds OpenSSL 1.1 API
  6. Signed-off-by: Bernard Spil <brnrd@FreeBSD.org>
  7. Signed-off-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>
  8. ---
  9. src/streams/openssl.c | 3 ++-
  10. src/streams/openssl.h | 3 ++-
  11. 2 files changed, 4 insertions(+), 2 deletions(-)
  12. diff --git a/src/streams/openssl.c b/src/streams/openssl.c
  13. index 9cbb2746f..adcb7f14e 100644
  14. --- a/src/streams/openssl.c
  15. +++ b/src/streams/openssl.c
  16. @@ -104,7 +104,8 @@ int git_openssl_stream_global_init(void)
  17. ssl_opts |= SSL_OP_NO_COMPRESSION;
  18. #endif
  19. -#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
  20. +#if OPENSSL_VERSION_NUMBER < 0x10100000L || \
  21. + (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
  22. SSL_load_error_strings();
  23. OpenSSL_add_ssl_algorithms();
  24. #else
  25. diff --git a/src/streams/openssl.h b/src/streams/openssl.h
  26. index 2bbad7c68..44329ec90 100644
  27. --- a/src/streams/openssl.h
  28. +++ b/src/streams/openssl.h
  29. @@ -31,7 +31,8 @@ extern int git_openssl__set_cert_location(const char *file, const char *path);
  30. -# if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
  31. +# if OPENSSL_VERSION_NUMBER < 0x10100000L || \
  32. + (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
  33. GIT_INLINE(BIO_METHOD*) BIO_meth_new(int type, const char *name)
  34. {
  35. --
  36. 2.17.0