aboutsummaryrefslogtreecommitdiffstats
path: root/main/neon/fix-libressl.patch
blob: 226e79878eb6e1777e689ae7b9b22f7802b83fd8 (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
Version number juggling for libressl

--- a/src/ne_openssl.c	2016-09-30 10:46:00.000000000 +0200
+++ b/src/ne_openssl.c	2016-10-06 00:19:58.366044580 +0200
@@ -66,7 +66,7 @@
 typedef const unsigned char ne_d2i_uchar;
 #endif
 
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
 #define X509_up_ref(x) x->references++
 #define EVP_PKEY_up_ref(x) x->references++
 #define EVP_PKEY_get0_RSA(evp) (evp->pkey.rsa)
@@ -1199,7 +1199,7 @@
 
 int ne__ssl_init(void)
 {
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
     CRYPTO_malloc_init();
     SSL_load_error_strings();
     SSL_library_init();
@@ -1242,7 +1242,7 @@
                  "for %" NE_FMT_SIZE_T " locks.\n", num_locks);
     }
 #endif
-#endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */
+#endif /* (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) */
 
     return 0;
 }