Commit 64d78ad7 authored by Rosen Penev's avatar Rosen Penev
Browse files

fix compilation without deprecated OpenSSL APIs

Initialization is deprecated.
parent bab861df
......@@ -42,6 +42,7 @@
#include <openssl/engine.h>
#include <openssl/err.h>
#include <openssl/rsa.h>
#include <openssl/bn.h>
#ifdef _USING_FCGI_
#include "boinc_fcgi.h"
......@@ -718,8 +719,11 @@ char *check_validity(
int rbytes;
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_library_init();
#endif
if (!is_file(origFile)) {
return NULL;
......@@ -770,7 +774,10 @@ int cert_verify_file(
fflush(stdout);
return false;
}
// OpenSSL 1.1 does initialization internally. This is default.
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(HAVE_LIBRESSL)
SSL_library_init();
#endif
if (!is_file(origFile)) return false;
FILE* of = boinc_fopen(origFile, "r");
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