|
@ -0,0 +1,28 @@ |
|
|
|
|
|
From 45904ae4548c848d053bea20e2f3e38189043c3a Mon Sep 17 00:00:00 2001 |
|
|
|
|
|
From: Rosen Penev <rosenp@gmail.com> |
|
|
|
|
|
Date: Fri, 3 May 2019 23:37:10 -0700 |
|
|
|
|
|
Subject: [PATCH] Fix compilation without deprecated OpenSSL APIs (#1785) |
|
|
|
|
|
|
|
|
|
|
|
Initialization is deprecated and causes compile errors with OpenSSL 1.1 when |
|
|
|
|
|
deprecated APIs are disabled. |
|
|
|
|
|
---
|
|
|
|
|
|
src/libmeasurement_kit/net/libssl.hpp | 2 ++ |
|
|
|
|
|
1 file changed, 2 insertions(+) |
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/libmeasurement_kit/net/libssl.hpp b/src/libmeasurement_kit/net/libssl.hpp
|
|
|
|
|
|
index eacee86ae..d1cecebbb 100644
|
|
|
|
|
|
--- a/src/libmeasurement_kit/net/libssl.hpp
|
|
|
|
|
|
+++ b/src/libmeasurement_kit/net/libssl.hpp
|
|
|
|
|
|
@@ -38,10 +38,12 @@ static inline void libssl_init_once(SharedPtr<Logger> logger) {
|
|
|
|
|
|
static bool initialized = false; |
|
|
|
|
|
if (!initialized) { |
|
|
|
|
|
logger->debug2("initializing libssl once"); |
|
|
|
|
|
+#if OPENSSL_VERSION_NUMBER < 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
|
|
|
|
|
|
SSL_library_init(); |
|
|
|
|
|
ERR_load_crypto_strings(); |
|
|
|
|
|
SSL_load_error_strings(); |
|
|
|
|
|
OpenSSL_add_all_algorithms(); |
|
|
|
|
|
+#endif
|
|
|
|
|
|
initialized = true; |
|
|
|
|
|
} |
|
|
|
|
|
}); |