Browse Source

Added some checks in KSSL (in TDEIO) to correctly recognize LibreSSL (which is a fork of OpenSSL 1.0.1b)

This resolves issue #28.

Signed-off-by: Mavridis Philippe <mfilippos@yandex.ru>
pull/29/head
Mavridis Philippe 2 months ago
parent
commit
86fea6f5c5
2 changed files with 4 additions and 3 deletions
  1. 3
    2
      tdeio/kssl/kopenssl.h
  2. 1
    1
      tdeio/kssl/ksslcertificate.cc

+ 3
- 2
tdeio/kssl/kopenssl.h View File

@@ -48,7 +48,8 @@ class KOpenSSLProxyPrivate;
48 48
 #include <openssl/stack.h>
49 49
 #include <openssl/bn.h>
50 50
 #undef crypt
51
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
51
+
52
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
52 53
 #define STACK OPENSSL_STACK
53 54
 #else
54 55
 #if OPENSSL_VERSION_NUMBER >= 0x10000000L
@@ -59,7 +60,7 @@ class KOpenSSLProxyPrivate;
59 60
 
60 61
 #include <kstaticdeleter.h>
61 62
 
62
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
63
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
63 64
 typedef int (*X509_STORE_CTX_verify_cb)(int, X509_STORE_CTX *);
64 65
 typedef int X509_LOOKUP_TYPE;
65 66
 #endif

+ 1
- 1
tdeio/kssl/ksslcertificate.cc View File

@@ -1069,7 +1069,7 @@ return qba;
1069 1069
 
1070 1070
 #define NETSCAPE_CERT_HDR     "certificate"
1071 1071
 #ifdef KSSL_HAVE_SSL
1072
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
1072
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBERSSL_VERSION_NUMBER)
1073 1073
 typedef struct NETSCAPE_X509_st
1074 1074
 {
1075 1075
 	ASN1_OCTET_STRING *header;

Loading…
Cancel
Save