Added
Link Here
|
1 |
LibreSSL uses a synthetic version in order to force consumers to check |
2 |
individual features instead but API isn't compatible with OpenSSL 1.1.x. |
3 |
|
4 |
--- openssl-compat.h.orig 2017-01-25 23:37:15 UTC |
5 |
+++ openssl-compat.h |
6 |
@@ -1,7 +1,7 @@ |
7 |
#ifndef OPENSSL_COMPAT_H |
8 |
#define OPENSSL_COMPAT_H |
9 |
|
10 |
-#if OPENSSL_VERSION_NUMBER < 0x10100000L |
11 |
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) |
12 |
|
13 |
static inline BIO_METHOD *BIO_meth_new(int type, const char *name) |
14 |
{ |
15 |
--- sample/https-client.c.orig 2017-01-25 23:37:15 UTC |
16 |
+++ sample/https-client.c |
17 |
@@ -312,7 +312,7 @@ main(int argc, char **argv) |
18 |
} |
19 |
uri[sizeof(uri) - 1] = '\0'; |
20 |
|
21 |
-#if OPENSSL_VERSION_NUMBER < 0x10100000L |
22 |
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) |
23 |
// Initialize OpenSSL |
24 |
SSL_library_init(); |
25 |
ERR_load_crypto_strings(); |
26 |
@@ -480,7 +480,7 @@ cleanup: |
27 |
SSL_CTX_free(ssl_ctx); |
28 |
if (type == HTTP && ssl) |
29 |
SSL_free(ssl); |
30 |
-#if OPENSSL_VERSION_NUMBER < 0x10100000L |
31 |
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) |
32 |
EVP_cleanup(); |
33 |
ERR_free_strings(); |
34 |
|
35 |
--- sample/le-proxy.c.orig 2017-01-25 23:37:15 UTC |
36 |
+++ sample/le-proxy.c |
37 |
@@ -259,7 +259,7 @@ main(int argc, char **argv) |
38 |
|
39 |
if (use_ssl) { |
40 |
int r; |
41 |
-#if OPENSSL_VERSION_NUMBER < 0x10100000L |
42 |
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) |
43 |
SSL_library_init(); |
44 |
ERR_load_crypto_strings(); |
45 |
SSL_load_error_strings(); |
46 |
--- sample/openssl_hostname_validation.c.orig 2017-01-25 23:37:15 UTC |
47 |
+++ sample/openssl_hostname_validation.c |
48 |
@@ -48,7 +48,7 @@ SOFTWARE. |
49 |
|
50 |
#define HOSTNAME_MAX_SIZE 255 |
51 |
|
52 |
-#if OPENSSL_VERSION_NUMBER < 0x10100000L |
53 |
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) |
54 |
#define ASN1_STRING_get0_data ASN1_STRING_data |
55 |
#endif |
56 |
|
57 |
--- test/regress_ssl.c.orig 2017-01-25 23:37:15 UTC |
58 |
+++ test/regress_ssl.c |
59 |
@@ -186,7 +186,7 @@ get_ssl_ctx(void) |
60 |
void |
61 |
init_ssl(void) |
62 |
{ |
63 |
-#if OPENSSL_VERSION_NUMBER < 0x10100000L |
64 |
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) |
65 |
SSL_library_init(); |
66 |
ERR_load_crypto_strings(); |
67 |
SSL_load_error_strings(); |