summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
authorKotresh HR <khiremat@redhat.com>2017-12-19 00:05:05 -0500
committerJeff Darcy <jeff@pl.atyp.us>2017-12-19 14:39:04 +0000
commit5aca4cf569f19d235662c4fbaa04df21e5fd46c2 (patch)
treefaf822a3e6f342a42f1dc4d00f390292728d3a48 /libglusterfs
parent7ff0ba71d50a324b0099ea85c2a0873dcede779f (diff)
fips: Replace md5sum usage to enable fips support
md5sum is not fips compliant. Using xxhash64 instead of md5sum for socket file generation in glusterd and changelog to enable fips support. NOTE: md5sum is 128 bit hash. xxhash used is 64 bit. Updates: #230 Change-Id: I1bf2ea05905b9151cd29fa951f903685ab0dc84c Signed-off-by: Kotresh HR <khiremat@redhat.com>
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/common-utils.c11
-rw-r--r--libglusterfs/src/common-utils.h1
2 files changed, 0 insertions, 12 deletions
diff --git a/libglusterfs/src/common-utils.c b/libglusterfs/src/common-utils.c
index ad0359d7cb2..ef76bdfe750 100644
--- a/libglusterfs/src/common-utils.c
+++ b/libglusterfs/src/common-utils.c
@@ -74,17 +74,6 @@ typedef int32_t (*rw_op_t)(int32_t fd, char *buf, int32_t size);
typedef int32_t (*rwv_op_t)(int32_t fd, const struct iovec *buf, int32_t size);
void
-md5_wrapper(const unsigned char *data, size_t len, char *md5)
-{
- unsigned short i = 0;
- unsigned short lim = MD5_DIGEST_LENGTH*2+1;
- unsigned char scratch[MD5_DIGEST_LENGTH] = {0,};
- MD5(data, len, scratch);
- for (; i < MD5_DIGEST_LENGTH; i++)
- snprintf(md5 + i * 2, lim-i*2, "%02x", scratch[i]);
-}
-
-void
gf_xxh64_wrapper(const unsigned char *data, size_t len, unsigned long long seed,
char *xxh64)
{
diff --git a/libglusterfs/src/common-utils.h b/libglusterfs/src/common-utils.h
index 1954892ff8f..8df96c338f5 100644
--- a/libglusterfs/src/common-utils.h
+++ b/libglusterfs/src/common-utils.h
@@ -841,7 +841,6 @@ gf_ports_reserved (char *blocked_port, unsigned char *ports, uint32_t ceiling);
int gf_get_hostname_from_ip (char *client_ip, char **hostname);
gf_boolean_t gf_is_local_addr (char *hostname);
gf_boolean_t gf_is_same_address (char *host1, char *host2);
-void md5_wrapper(const unsigned char *data, size_t len, char *md5);
void gf_xxh64_wrapper(const unsigned char *data, size_t len,
unsigned long long seed, char *xxh64);
int gf_set_timestamp (const char *src, const char* dest);