summaryrefslogtreecommitdiffstats
path: root/xlators/storage/bd/src
diff options
context:
space:
mode:
authorKotresh HR <khiremat@redhat.com>2017-12-19 07:21:07 -0500
committerAmar Tumballi <amarts@redhat.com>2017-12-21 04:31:31 +0000
commit1d32720335ffd8835c4a7b3164fe9aa9028f77a5 (patch)
tree9234608444f07d385564e1e386844dadd63fd1ee /xlators/storage/bd/src
parent4a06f851dcad6bdd730f3d2e12bd8f26709f27fe (diff)
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 <khiremat@redhat.com>
Diffstat (limited to 'xlators/storage/bd/src')
-rw-r--r--xlators/storage/bd/src/bd.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/xlators/storage/bd/src/bd.c b/xlators/storage/bd/src/bd.c
index 07b7ecd52ad..57699ae0aac 100644
--- a/xlators/storage/bd/src/bd.c
+++ b/xlators/storage/bd/src/bd.c
@@ -2148,7 +2148,7 @@ bd_rchecksum (call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset,
char *buf = NULL;
int32_t weak_checksum = 0;
bd_fd_t *bd_fd = NULL;
- unsigned char strong_checksum[MD5_DIGEST_LENGTH] = {0};
+ unsigned char strong_checksum[SHA256_DIGEST_LENGTH] = {0};
VALIDATE_OR_GOTO (frame, out);
VALIDATE_OR_GOTO (this, out);
@@ -2162,8 +2162,6 @@ bd_rchecksum (call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset,
return 0;
}
- memset (strong_checksum, 0, MD5_DIGEST_LENGTH);
-
alloc_buf = page_aligned_alloc (len, &buf);
if (!alloc_buf) {
op_errno = ENOMEM;