blob: d8569322e1395100e0dc09414601774fd62499c4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
--- lftp-4.9.2.orig/src/lftp_ssl.cc 2020-01-29 21:36:37.000000000 +0100
+++ lftp-4.9.2/src/lftp_ssl.cc 2024-02-22 14:42:11.060809468 +0100
@@ -34,7 +34,7 @@
#include "misc.h"
#include "network.h"
#include "buffer.h"
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || LIBRESSL_VERSION_NUMBER
#define X509_STORE_CTX_get_by_subject X509_STORE_get_by_subject
#endif
extern "C" {
@@ -775,7 +775,7 @@ error:
#elif USE_OPENSSL
//static int lftp_ssl_passwd_callback(char *buf,int size,int rwflag,void *userdata);
-#if OPENSSL_VERSION_NUMBER < 0x10100000L || LIBRESSL_VERSION_NUMBER
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000L)
// for compatibility with older versions
X509_OBJECT *X509_OBJECT_new()
{
@@ -840,7 +840,7 @@ lftp_ssl_openssl_instance::lftp_ssl_open
ssl_ctx=SSL_CTX_new();
X509_set_default_verify_paths(ssl_ctx->cert);
#else
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || LIBRESSL_VERSION_NUMBER
SSLeay_add_ssl_algorithms();
#endif
ssl_ctx=SSL_CTX_new(SSLv23_client_method());
@@ -1080,7 +1080,7 @@ void lftp_ssl_openssl::copy_sid(const lf
const char *lftp_ssl_openssl::strerror()
{
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || LIBRESSL_VERSION_NUMBER
SSL_load_error_strings();
#endif
int error=ERR_get_error();
|