}
}
+namespace TOPNSPC::auth {
+
CryptoRandom::CryptoRandom() : fd(getentropy_works() ? -1 : open_urandom())
{}
#include <bcrypt.h>
+namespace TOPNSPC::auth {
+
CryptoRandom::CryptoRandom() : fd(0) {}
CryptoRandom::~CryptoRandom() = default;
return supported_crypto_types.find(type) != supported_crypto_types.end();
}
+} // namespace TOPNSPC::auth
+
#pragma clang diagnostic pop
#pragma GCC diagnostic pop
class CryptoKeyContext;
namespace ceph { class Formatter; }
+namespace TOPNSPC::auth {
+
/*
* Random byte stream generator suitable for cryptographic use
*/
* To use these functions, you need to call ceph::crypto::init(), see
* common/ceph_crypto.h. common_init_finish does this for you.
*/
+
class CryptoHandler {
public:
virtual ~CryptoHandler() {}
};
+
class CryptoManager {
CephContext *cct;
std::shared_ptr<CryptoHandler> crypto_none;
std::shared_ptr<CryptoHandler> get_handler(int type);
};
-
+} // namespace TOPNSPC::auth
#endif
include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/src/rocksdb/include")
set(crimson_alien_common_srcs
+ ${PROJECT_SOURCE_DIR}/src/auth/Crypto.cc
${PROJECT_SOURCE_DIR}/src/common/admin_socket.cc
${PROJECT_SOURCE_DIR}/src/common/url_escape.cc
${PROJECT_SOURCE_DIR}/src/common/blkdev.cc
class RefCountedWaitObject;
class ConfigProxy;
}
+
+namespace TOPNSPC::auth {
+ class CryptoManager;
+ class CryptoHandler;
+ class CryptoKey;
+ class CryptoRandom;
+}
+
using TOPNSPC::common::CephContext;
using TOPNSPC::common::PerfCounters;
using TOPNSPC::common::PerfCountersBuilder;
using TOPNSPC::common::RefCountedCond;
using TOPNSPC::common::RefCountedWaitObject;
using TOPNSPC::common::ConfigProxy;
+using TOPNSPC::auth::CryptoManager;
+using TOPNSPC::auth::CryptoHandler;
+using TOPNSPC::auth::CryptoKey;
+using TOPNSPC::auth::CryptoRandom;