From: Casey Bodley Date: Mon, 20 Aug 2018 15:28:54 +0000 (-0400) Subject: msg/dpdk: use ceph::crypto::MD5 instead of cryptopp X-Git-Tag: v14.0.1~292^2~4 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=f87f3bafba4ab3aab31400b5860df4ac05a8bd9a;p=ceph.git msg/dpdk: use ceph::crypto::MD5 instead of cryptopp Signed-off-by: Casey Bodley --- diff --git a/src/msg/async/dpdk/TCP.h b/src/msg/async/dpdk/TCP.h index 9445dbce536de..8005e783c2a62 100644 --- a/src/msg/async/dpdk/TCP.h +++ b/src/msg/async/dpdk/TCP.h @@ -32,14 +32,12 @@ #include #include -#define CRYPTOPP_ENABLE_NAMESPACE_WEAK 1 -#include - #include "msg/async/dpdk/EventDPDK.h" #include "include/utime.h" #include "common/Throttle.h" #include "common/ceph_time.h" +#include "common/ceph_crypto.h" #include "msg/async/Event.h" #include "IPChecksum.h" #include "IP.h" @@ -1441,7 +1439,9 @@ tcp_sequence tcp::tcb::get_isn() { hash[1] = _foreign_ip.ip; hash[2] = (_local_port << 16) + _foreign_port; hash[3] = _isn_secret.key[15]; - CryptoPP::Weak::MD5::Transform(hash, _isn_secret.key); + ceph::crypto::MD5 md5; + md5.Update((const unsigned char*)_isn_secret.key, sizeof(_isn_secret.key)); + md5.Final((unsigned char*)hash); auto seq = hash[0]; auto m = duration_cast(clock_type::now().time_since_epoch()); seq += m.count() / 4;