git.samba.org
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Call `OpenSSL_add_all_algorithms()` on older openssl versions.
[rsync.git]
/
checksum.c
diff --git
a/checksum.c
b/checksum.c
index 60de3655f38e635f8802dfd8a5e221e40442e502..c6007f36895bba698667377b1f787ea1d1444a95 100644
(file)
--- 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 = 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");
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 (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);
#if defined SUPPORT_XXH3 || defined USE_OPENSSL
for (nni = valid_checksums.list; nni->name; nni++)
verify_digest(nni, True);