summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs/src')
-rw-r--r--libglusterfs/src/checksum.c8
-rw-r--r--libglusterfs/src/default-args.c2
2 files changed, 6 insertions, 4 deletions
diff --git a/libglusterfs/src/checksum.c b/libglusterfs/src/checksum.c
index 5fac133009..a7f9877ddf 100644
--- a/libglusterfs/src/checksum.c
+++ b/libglusterfs/src/checksum.c
@@ -8,9 +8,10 @@
cases as published by the Free Software Foundation.
*/
-#include <openssl/md5.h>
+#include <openssl/sha.h>
#include <zlib.h>
#include <stdint.h>
+#include <string.h>
/*
* The "weak" checksum required for the rsync algorithm.
@@ -30,7 +31,8 @@ gf_rsync_weak_checksum (unsigned char *buf, size_t len)
* The "strong" checksum required for the rsync algorithm.
*/
void
-gf_rsync_strong_checksum (unsigned char *data, size_t len, unsigned char *md5)
+gf_rsync_strong_checksum (unsigned char *data, size_t len,
+ unsigned char *sha256_md)
{
- MD5 (data, len, md5);
+ SHA256((const unsigned char *)data, len, sha256_md);
}
diff --git a/libglusterfs/src/default-args.c b/libglusterfs/src/default-args.c
index 20cd05e68c..2bc1ec2864 100644
--- a/libglusterfs/src/default-args.c
+++ b/libglusterfs/src/default-args.c
@@ -1180,7 +1180,7 @@ args_rchecksum_cbk_store (default_args_cbk_t *args,
args->weak_checksum =
weak_checksum;
args->strong_checksum =
- memdup (strong_checksum, MD5_DIGEST_LENGTH);
+ memdup (strong_checksum, SHA256_DIGEST_LENGTH);
}
if (xdata)
args->xdata = dict_ref (xdata);