From 1d32720335ffd8835c4a7b3164fe9aa9028f77a5 Mon Sep 17 00:00:00 2001 From: Kotresh HR Date: Tue, 19 Dec 2017 07:21:07 -0500 Subject: rchecksum/fips: Replace MD5 usage to enable fips support rchecksum uses MD5 which is not fips compliant. Hence using sha256 for the same. Updates: #230 Change-Id: I7fad016fcc2a9900395d0da919cf5ba996ec5278 Signed-off-by: Kotresh HR --- xlators/storage/posix/src/posix-inode-fd-ops.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'xlators/storage/posix/src/posix-inode-fd-ops.c') diff --git a/xlators/storage/posix/src/posix-inode-fd-ops.c b/xlators/storage/posix/src/posix-inode-fd-ops.c index 9d1b19ac9a0..2a3c7a2b025 100644 --- a/xlators/storage/posix/src/posix-inode-fd-ops.c +++ b/xlators/storage/posix/src/posix-inode-fd-ops.c @@ -4852,7 +4852,7 @@ posix_rchecksum (call_frame_t *frame, xlator_t *this, ssize_t bytes_read = 0; int32_t weak_checksum = 0; int32_t zerofillcheck = 0; - unsigned char strong_checksum[MD5_DIGEST_LENGTH] = {0}; + unsigned char strong_checksum[SHA256_DIGEST_LENGTH] = {0}; struct posix_private *priv = NULL; dict_t *rsp_xdata = NULL; gf_boolean_t buf_has_zeroes = _gf_false; @@ -4862,7 +4862,6 @@ posix_rchecksum (call_frame_t *frame, xlator_t *this, VALIDATE_OR_GOTO (fd, out); priv = this->private; - memset (strong_checksum, 0, MD5_DIGEST_LENGTH); alloc_buf = _page_aligned_alloc (len, &buf); if (!alloc_buf) { -- cgit