From ec4e22b76744687a198a4c4e5380dd63c5198613 Mon Sep 17 00:00:00 2001 From: "Juan A. Suarez Romero" Date: Tue, 18 Aug 2015 15:08:07 +0000 Subject: [PATCH] rgw: Remove useless code in calc_hmac_sha1() Hex conversion from buf is not used at all. Signed-off-by: Juan A. Suarez Romero --- src/rgw/rgw_common.cc | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/rgw/rgw_common.cc b/src/rgw/rgw_common.cc index c06e5e17ef4b..207cc4ec7b92 100644 --- a/src/rgw/rgw_common.cc +++ b/src/rgw/rgw_common.cc @@ -419,9 +419,6 @@ void calc_hmac_sha1(const char *key, int key_len, HMACSHA1 hmac((const unsigned char *)key, key_len); hmac.Update((const unsigned char *)msg, msg_len); hmac.Final((unsigned char *)dest); - - char hex_str[(CEPH_CRYPTO_HMACSHA1_DIGESTSIZE * 2) + 1]; - buf_to_hex((unsigned char *)dest, CEPH_CRYPTO_HMACSHA1_DIGESTSIZE, hex_str); } int gen_rand_base64(CephContext *cct, char *dest, int size) /* size should be the required string size + 1 */ -- 2.47.3