Fix broken repository link in target/makeccs
[librecmc/librecmc.git] / package / network / services / aria2 / patches / 010-Platform-Fix-compilation-without-deprecated-OpenSSL-.patch
1 From 0e31e37c0f6ad0b3f393f024d1f6d8ce448e4746 Mon Sep 17 00:00:00 2001
2 From: Rosen Penev <rosenp@gmail.com>
3 Date: Sat, 8 Dec 2018 18:39:50 -0800
4 Subject: [PATCH] Platform: Fix compilation without deprecated OpenSSL APIs
5
6 ---
7  src/Platform.cc | 3 +++
8  1 file changed, 3 insertions(+)
9
10 diff --git a/src/Platform.cc b/src/Platform.cc
11 index ea73b6c6..d7882a97 100644
12 --- a/src/Platform.cc
13 +++ b/src/Platform.cc
14 @@ -44,6 +44,7 @@
15  #ifdef HAVE_OPENSSL
16  #include <openssl/err.h>
17  #include <openssl/ssl.h>
18 +#include "libssl_compat.h"
19  #endif // HAVE_OPENSSL
20  #ifdef HAVE_LIBGCRYPT
21  #include <gcrypt.h>
22 @@ -111,11 +112,13 @@ bool Platform::setUp()
23  #endif // ENABLE_NLS
24  
25  #ifdef HAVE_OPENSSL
26 +#if !OPENSSL_101_API
27    // for SSL initialization
28    SSL_load_error_strings();
29    SSL_library_init();
30    // Need this to "decrypt" p12 files.
31    OpenSSL_add_all_algorithms();
32 +#endif // !OPENSSL_101_API
33  #endif // HAVE_OPENSSL
34  #ifdef HAVE_LIBGCRYPT
35    if (!gcry_check_version("1.2.4")) {
36 -- 
37 2.17.1
38