mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-24 18:40:13 +01:00
Fixed loading openssl legacy stuff
Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
parent
7519da6743
commit
949792ef9a
@ -186,14 +186,13 @@ int retrieve_file_from_archive(char *filename, int mode, char **buffer, FILE *de
|
||||
ctx = EVP_CIPHER_CTX_new();
|
||||
if(!ctx) goto CLEANUP;
|
||||
|
||||
#if OPENSSL_VERSION_MAJOR >= 3
|
||||
OSSL_PROVIDER_load(NULL, "legacy");
|
||||
#endif
|
||||
|
||||
EVP_CIPHER_CTX_init(ctx);
|
||||
if(strstr(filename, "/5000")){
|
||||
rc = EVP_DecryptInit_ex(ctx, EVP_aes_256_cbc(), NULL, cfg->key, cfg->iv);
|
||||
} else {
|
||||
#if OPENSSL_VERSION_MAJOR >= 3
|
||||
OSSL_PROVIDER_load(NULL, "legacy");
|
||||
#endif
|
||||
rc = EVP_DecryptInit_ex(ctx, EVP_bf_cbc(), NULL, cfg->key, cfg->iv);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user