Fixed including provider.h #2

Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
Janos SUTO 2023-01-24 12:35:34 +01:00
parent e0c986e184
commit 63b0caff59

View File

@ -16,10 +16,8 @@
#include <syslog.h> #include <syslog.h>
#include <openssl/blowfish.h> #include <openssl/blowfish.h>
#include <openssl/evp.h> #include <openssl/evp.h>
#ifdef OPENSSL_VERSION_MAJOR #if OPENSSL_VERSION_MAJOR >= 3
#if OPENSSL_VERSION_MAJOR >= 3
#include <openssl/provider.h> #include <openssl/provider.h>
#endif
#endif #endif
#include <zlib.h> #include <zlib.h>
#include <assert.h> #include <assert.h>
@ -188,7 +186,9 @@ int retrieve_file_from_archive(char *filename, int mode, char **buffer, FILE *de
ctx = EVP_CIPHER_CTX_new(); ctx = EVP_CIPHER_CTX_new();
if(!ctx) goto CLEANUP; if(!ctx) goto CLEANUP;
#if OPENSSL_VERSION_MAJOR >= 3
OSSL_PROVIDER_load(NULL, "legacy"); OSSL_PROVIDER_load(NULL, "legacy");
#endif
EVP_CIPHER_CTX_init(ctx); EVP_CIPHER_CTX_init(ctx);
if(strstr(filename, "/5000")){ if(strstr(filename, "/5000")){