summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2018-12-08 18:39:50 -0800
committerRosen Penev <rosenp@gmail.com>2019-01-22 00:47:29 -0800
commit0e31e37c0f6ad0b3f393f024d1f6d8ce448e4746 (patch)
tree24dcda4d19326733c5f604087ff42e477139e769
parent879e4a89b637007823709349c8f63b458551abc0 (diff)
Platform: Fix compilation without deprecated OpenSSL APIs
-rw-r--r--src/Platform.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Platform.cc b/src/Platform.cc
index ea73b6c6..d7882a97 100644
--- a/src/Platform.cc
+++ b/src/Platform.cc
@@ -44,6 +44,7 @@
#ifdef HAVE_OPENSSL
# include <openssl/err.h>
# include <openssl/ssl.h>
+# include "libssl_compat.h"
#endif // HAVE_OPENSSL
#ifdef HAVE_LIBGCRYPT
# include <gcrypt.h>
@@ -111,11 +112,13 @@ bool Platform::setUp()
#endif // ENABLE_NLS
#ifdef HAVE_OPENSSL
+#if !OPENSSL_101_API
// for SSL initialization
SSL_load_error_strings();
SSL_library_init();
// Need this to "decrypt" p12 files.
OpenSSL_add_all_algorithms();
+#endif // !OPENSSL_101_API
#endif // HAVE_OPENSSL
#ifdef HAVE_LIBGCRYPT
if (!gcry_check_version("1.2.4")) {