summaryrefslogtreecommitdiffstats
path: root/modules/openssl/stream_peer_openssl.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2017-10-18 11:16:24 +0200
committerGitHub <noreply@github.com>2017-10-18 11:16:24 +0200
commitf52ab8d86418a67ddee247ed7765e72935b0c57f (patch)
tree073d74afbb6f86dbddc6c544f26d2672b707d572 /modules/openssl/stream_peer_openssl.cpp
parent215af244f3a6fc34fac31be82c120db254eb27d1 (diff)
parentd154b846e8a113b56ef464f036c0e316d4e44568 (diff)
downloadredot-engine-f52ab8d86418a67ddee247ed7765e72935b0c57f.tar.gz
Merge pull request #12201 from SoWhich/master
Adjust openssl #defines to be libressl compatible [ci skip]
Diffstat (limited to 'modules/openssl/stream_peer_openssl.cpp')
-rw-r--r--modules/openssl/stream_peer_openssl.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/openssl/stream_peer_openssl.cpp b/modules/openssl/stream_peer_openssl.cpp
index c19bdc4214..6d1d5485f3 100644
--- a/modules/openssl/stream_peer_openssl.cpp
+++ b/modules/openssl/stream_peer_openssl.cpp
@@ -30,7 +30,7 @@
#include "stream_peer_openssl.h"
// Compatibility with OpenSSL 1.1.0.
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
#define BIO_set_num(b, n)
#else
#define BIO_set_num(b, n) ((b)->num = (n))
@@ -269,7 +269,7 @@ int StreamPeerOpenSSL::_bio_puts(BIO *b, const char *str) {
return _bio_write(b, str, strlen(str));
}
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
BIO_METHOD *StreamPeerOpenSSL::_bio_method = NULL;
BIO_METHOD *StreamPeerOpenSSL::_get_bio_method() {
@@ -568,7 +568,7 @@ void StreamPeerOpenSSL::initialize_ssl() {
load_certs_func = _load_certs;
_create = _create_func;
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
CRYPTO_malloc_init(); // Initialize malloc, free, etc for OpenSSL's use
#endif
SSL_library_init(); // Initialize OpenSSL's SSL libraries