Unverified Commit f25e4d78 authored by Christian Beer's avatar Christian Beer Committed by GitHub
Browse files

Merge pull request #3961 from neheb/patch-1

fix compilation without deprecated OpenSSL APIs
parents b6e54cbc 64d78ad7
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#include <openssl/engine.h> #include <openssl/engine.h>
#include <openssl/err.h> #include <openssl/err.h>
#include <openssl/rsa.h> #include <openssl/rsa.h>
#include <openssl/bn.h>
#ifdef _USING_FCGI_ #ifdef _USING_FCGI_
#include "boinc_fcgi.h" #include "boinc_fcgi.h"
...@@ -713,8 +714,11 @@ char *check_validity( ...@@ -713,8 +714,11 @@ char *check_validity(
int rbytes; int rbytes;
unsigned char md5_md[MD5_DIGEST_LENGTH], rbuf[2048]; unsigned char md5_md[MD5_DIGEST_LENGTH], rbuf[2048];
// OpenSSL 1.1 does initialization internally. This is default.
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(HAVE_LIBRESSL)
SSL_load_error_strings(); SSL_load_error_strings();
SSL_library_init(); SSL_library_init();
#endif
if (!is_file(origFile)) { if (!is_file(origFile)) {
return NULL; return NULL;
...@@ -765,7 +769,10 @@ int cert_verify_file( ...@@ -765,7 +769,10 @@ int cert_verify_file(
fflush(stdout); fflush(stdout);
return false; return false;
} }
// OpenSSL 1.1 does initialization internally. This is default.
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(HAVE_LIBRESSL)
SSL_library_init(); SSL_library_init();
#endif
if (!is_file(origFile)) return false; if (!is_file(origFile)) return false;
FILE* of = boinc_fopen(origFile, "r"); FILE* of = boinc_fopen(origFile, "r");
if (!of) return false; if (!of) return false;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment