diff options
author | Kotresh HR <khiremat@redhat.com> | 2017-12-19 07:21:07 -0500 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2017-12-21 04:31:31 +0000 |
commit | 1d32720335ffd8835c4a7b3164fe9aa9028f77a5 (patch) | |
tree | 9234608444f07d385564e1e386844dadd63fd1ee /xlators/cluster/afr/src/afr-self-heal-data.c | |
parent | 4a06f851dcad6bdd730f3d2e12bd8f26709f27fe (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/cluster/afr/src/afr-self-heal-data.c')
-rw-r--r-- | xlators/cluster/afr/src/afr-self-heal-data.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-data.c b/xlators/cluster/afr/src/afr-self-heal-data.c index 8cf43f2807b..7880a611592 100644 --- a/xlators/cluster/afr/src/afr-self-heal-data.c +++ b/xlators/cluster/afr/src/afr-self-heal-data.c @@ -42,7 +42,7 @@ __checksum_cbk (call_frame_t *frame, void *cookie, xlator_t *this, replies[i].buf_has_zeroes = dict_get_str_boolean (xdata, "buf-has-zeroes", _gf_false); if (strong) - memcpy (local->replies[i].checksum, strong, MD5_DIGEST_LENGTH); + memcpy (local->replies[i].checksum, strong, SHA256_DIGEST_LENGTH); syncbarrier_wake (&local->barrier); return 0; @@ -92,7 +92,7 @@ __afr_can_skip_data_block_heal (call_frame_t *frame, xlator_t *this, fd_t *fd, if (local->replies[i].valid) { if (memcmp (local->replies[source].checksum, local->replies[i].checksum, - MD5_DIGEST_LENGTH)) { + SHA256_DIGEST_LENGTH)) { checksum_match = _gf_false; break; } |