From: Casey Bodley Date: Thu, 18 Jan 2018 01:42:46 +0000 (-0500) Subject: common: remove cryptopp digest impls X-Git-Tag: v13.0.2~466^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a18f0589c0641e588f1e09d432fc224fa3fc27aa;p=ceph.git common: remove cryptopp digest impls Signed-off-by: Casey Bodley --- diff --git a/src/common/ceph_crypto.cc b/src/common/ceph_crypto.cc index a0aa8767e428..4668e0bf7301 100644 --- a/src/common/ceph_crypto.cc +++ b/src/common/ceph_crypto.cc @@ -15,25 +15,7 @@ #include "common/config.h" #include "ceph_crypto.h" -#ifdef USE_CRYPTOPP -void ceph::crypto::init(CephContext *cct) -{ -} - -void ceph::crypto::shutdown(bool) -{ -} - -// nothing -ceph::crypto::HMACSHA1::~HMACSHA1() -{ -} - -ceph::crypto::HMACSHA256::~HMACSHA256() -{ -} - -#elif defined(USE_NSS) +#ifdef USE_NSS // for SECMOD_RestartModules() #include diff --git a/src/common/ceph_crypto.h b/src/common/ceph_crypto.h index e5a9292dc6ff..05d686392e2f 100644 --- a/src/common/ceph_crypto.h +++ b/src/common/ceph_crypto.h @@ -9,50 +9,7 @@ #define CEPH_CRYPTO_HMACSHA256_DIGESTSIZE 32 #define CEPH_CRYPTO_SHA256_DIGESTSIZE 32 -#ifdef USE_CRYPTOPP -# define CRYPTOPP_ENABLE_NAMESPACE_WEAK 1 -#include -#include -#include -#include - -// reinclude our assert to clobber the system one -# include "include/assert.h" - -namespace ceph { - namespace crypto { - void assert_init(); - void init(CephContext *cct); - // @param shared true if the the underlying crypto library could be shared - // with the application linked against the Ceph library. - // @note we do extra global cleanup specific to the underlying crypto - // library, if @c shared is @c false. - void shutdown(bool shared=true); - - using CryptoPP::Weak::MD5; - using CryptoPP::SHA1; - using CryptoPP::SHA256; - - class HMACSHA1: public CryptoPP::HMAC { - public: - HMACSHA1 (const ::byte *key, size_t length) - : CryptoPP::HMAC(key, length) - { - } - ~HMACSHA1(); - }; - - class HMACSHA256: public CryptoPP::HMAC { - public: - HMACSHA256 (const ::byte *key, size_t length) - : CryptoPP::HMAC(key, length) - { - } - ~HMACSHA256(); - }; - } -} -#elif defined(USE_NSS) +#ifdef USE_NSS // you *must* use CRYPTO_CXXFLAGS in CMakeLists.txt for including this include # include # include