]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common: remove cryptopp digest impls
authorCasey Bodley <cbodley@redhat.com>
Thu, 18 Jan 2018 01:42:46 +0000 (20:42 -0500)
committerCasey Bodley <cbodley@redhat.com>
Fri, 19 Jan 2018 15:25:41 +0000 (10:25 -0500)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/common/ceph_crypto.cc
src/common/ceph_crypto.h

index a0aa8767e428f42b1df583aa1e7a26fce7311777..4668e0bf73017e57d5be82f057309cc426747665 100644 (file)
 #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 <secmod.h>
index e5a9292dc6ff6e286bd57673a48528fd5dbd5613..05d686392e2fc1862f0b86992a03cfdd1cf14235 100644 (file)
@@ -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 <string.h>
-#include <cryptopp/md5.h>
-#include <cryptopp/sha.h>
-#include <cryptopp/hmac.h>
-
-// 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<CryptoPP::SHA1> {
-    public:
-    HMACSHA1 (const ::byte *key, size_t length)
-       : CryptoPP::HMAC<CryptoPP::SHA1>(key, length)
-       {
-       }
-      ~HMACSHA1();
-    };
-
-    class HMACSHA256: public CryptoPP::HMAC<CryptoPP::SHA256> {
-    public:
-    HMACSHA256 (const ::byte *key, size_t length)
-        : CryptoPP::HMAC<CryptoPP::SHA256>(key, length)
-        {
-        }
-      ~HMACSHA256();
-    };
-  }
-}
-#elif defined(USE_NSS)
+#ifdef USE_NSS
 // you *must* use CRYPTO_CXXFLAGS in CMakeLists.txt for including this include
 # include <nss.h>
 # include <pk11pub.h>