From: Wayne Davison Date: Tue, 25 Oct 2022 16:02:05 +0000 (-0700) Subject: Call `OpenSSL_add_all_algorithms()` on older openssl versions. X-Git-Tag: v3.3.0pre1~22 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=27feda0436e39e04ae53e08247739f8b6c906d56;p=thirdparty%2Frsync.git Call `OpenSSL_add_all_algorithms()` on older openssl versions. --- diff --git a/checksum.c b/checksum.c index 60de3655..c6007f36 100644 --- a/checksum.c +++ b/checksum.c @@ -154,7 +154,7 @@ static const EVP_MD *csum_evp_md(struct name_num_item *nni) emd = NULL; else #endif - emd = EVP_get_digestbyname(nni->name); + emd = EVP_get_digestbyname(nni->name); if (emd && !(nni->flags & NNI_EVP_OK)) { /* Make sure it works before we advertise it */ if (!ctx_evp && !(ctx_evp = EVP_MD_CTX_create())) out_of_memory("csum_evp_md"); @@ -787,6 +787,10 @@ void init_checksum_choices() if (initialized_choices) return; +#if defined USE_OPENSSL && OPENSSL_VERSION_NUMBER < 0x10100000L + OpenSSL_add_all_algorithms(); +#endif + #if defined SUPPORT_XXH3 || defined USE_OPENSSL for (nni = valid_checksums.list; nni->name; nni++) verify_digest(nni, True);