diff --git a/src/archive.c b/src/archive.c index e3cfa9c5..a6571849 100644 --- a/src/archive.c +++ b/src/archive.c @@ -16,10 +16,8 @@ #include #include #include -#ifdef OPENSSL_VERSION_MAJOR - #if OPENSSL_VERSION_MAJOR >= 3 - #include - #endif +#if OPENSSL_VERSION_MAJOR >= 3 + #include #endif #include #include @@ -188,7 +186,9 @@ int retrieve_file_from_archive(char *filename, int mode, char **buffer, FILE *de ctx = EVP_CIPHER_CTX_new(); if(!ctx) goto CLEANUP; - OSSL_PROVIDER_load(NULL, "legacy"); + #if OPENSSL_VERSION_MAJOR >= 3 + OSSL_PROVIDER_load(NULL, "legacy"); + #endif EVP_CIPHER_CTX_init(ctx); if(strstr(filename, "/5000")){