Merge pull request #11353 from kvuorine/fwknop-fixes
[feed/packages.git] / net / boinc / patches / 010-openssl.patch
1 --- a/lib/crypt.cpp
2 +++ b/lib/crypt.cpp
3 @@ -44,6 +44,7 @@
4 #include <openssl/engine.h>
5 #include <openssl/err.h>
6 #include <openssl/rsa.h>
7 +#include <openssl/bn.h>
8
9 #ifdef _USING_FCGI_
10 #include "boinc_fcgi.h"
11 @@ -720,8 +721,10 @@ char *check_validity(
12 int rbytes;
13 unsigned char md5_md[MD5_DIGEST_LENGTH], rbuf[2048];
14
15 +#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(HAVE_LIBRESSL)
16 SSL_load_error_strings();
17 SSL_library_init();
18 +#endif
19
20 if (!is_file(origFile)) {
21 return NULL;
22 @@ -772,7 +775,9 @@ int cert_verify_file(
23 fflush(stdout);
24 return false;
25 }
26 +#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(HAVE_LIBRESSL)
27 SSL_library_init();
28 +#endif
29 if (!is_file(origFile)) return false;
30 FILE* of = boinc_fopen(origFile, "r");
31 if (!of) return false;