summaryrefslogtreecommitdiff
blob: d0e0ae1f9cb5ead5f90946efdda8910294d78f40 (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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
--- a/src/ssh/libcrypto-compat.c
+++ b/src/ssh/libcrypto-compat.c
@@ -8,7 +8,7 @@
  */
 
 #include "libcrypto-compat.h"
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
 #include <string.h>
 #include <openssl/engine.h>
 
--- a/src/ssh/libcrypto-compat.h
+++ b/src/ssh/libcrypto-compat.h
@@ -9,7 +9,7 @@
 #include <openssl/evp.h>
 #include <openssl/hmac.h>
 
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
 
 int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d);
 int RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q);
--- a/src/ssh/socket.cpp
+++ b/src/ssh/socket.cpp
@@ -36,7 +36,7 @@
 SSH2SocketPriv::SSH2SocketPriv(SocketPrivate * plainSocket, QByteArray & banner, QObject * parent)
         : SSHSocketPriv(parent), m_banner(banner), m_status(Init), m_sessionID(), m_channelList()
 {
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
     OpenSSL_add_all_ciphers();
 #endif
     m_sessionID = NULL;
@@ -56,7 +56,7 @@
 
 SSH2SocketPriv::~SSH2SocketPriv()
 {
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
     EVP_cleanup();
 #endif
 }
@@ -133,7 +133,7 @@
 #ifdef SSH_DEBUG
     qDebug() << "init ssh1 session";
 #endif
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
     OpenSSL_add_all_ciphers();
 #endif
     m_inPacket = new SSH1InBuffer(plainSocket, this);
@@ -148,7 +148,7 @@
 
 SSH1SocketPriv::~SSH1SocketPriv()
 {
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
     EVP_cleanup();
 #endif
 }