summaryrefslogtreecommitdiffstats
path: root/checksum.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 16:15:01 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 16:15:01 +0000
commit28e02ede59c9edf5e806985df9f05a3344945d7f (patch)
tree989fc0575334db3836990eb814636f5c8276589f /checksum.c
parentReleasing progress-linux version 3.2.7-1~progress7.99u1. (diff)
downloadrsync-28e02ede59c9edf5e806985df9f05a3344945d7f.tar.xz
rsync-28e02ede59c9edf5e806985df9f05a3344945d7f.zip
Merging upstream version 3.3.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--checksum.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/checksum.c b/checksum.c
index 60de365..cb21882 100644
--- a/checksum.c
+++ b/checksum.c
@@ -3,7 +3,7 @@
*
* Copyright (C) 1996 Andrew Tridgell
* Copyright (C) 1996 Paul Mackerras
- * Copyright (C) 2004-2022 Wayne Davison
+ * Copyright (C) 2004-2023 Wayne Davison
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -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");
@@ -300,6 +300,7 @@ uint32 get_checksum1(char *buf1, int32 len)
}
#endif
+/* The "sum" buffer must be at least MAX_DIGEST_LEN bytes! */
void get_checksum2(char *buf, int32 len, char *sum)
{
#ifdef USE_OPENSSL
@@ -787,6 +788,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);