Skip to content

Commit

Permalink
feat(encryption): add kms key management
Browse files Browse the repository at this point in the history
  • Loading branch information
yujingwei committed Jan 9, 2024
1 parent 1c611a6 commit 24176f4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 126 deletions.
42 changes: 0 additions & 42 deletions src/replica/replication_app_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,48 +52,6 @@ class learn_state;
class mutation;
class replica;

<<<<<<< HEAD
=======
namespace {
template <class T>
error_code write_blob_to_file(const std::string &fname,
const T &data,
const dsn::utils::FileDataType &fileDataType)
{
std::string tmp_fname = fname + ".tmp";
auto cleanup = defer([tmp_fname]() { utils::filesystem::remove_path(tmp_fname); });
auto s = rocksdb::WriteStringToFile(dsn::utils::PegasusEnv(fileDataType),
rocksdb::Slice(data.data(), data.length()),
tmp_fname,
/* should_sync */ true);
LOG_AND_RETURN_NOT_TRUE(
ERROR, s.ok(), ERR_FILE_OPERATION_FAILED, "write file {} failed", tmp_fname);
LOG_AND_RETURN_NOT_TRUE(ERROR,
utils::filesystem::rename_path(tmp_fname, fname),
ERR_FILE_OPERATION_FAILED,
"move file from {} to {} failed",
tmp_fname,
fname);
return ERR_OK;
}

template <typename T, dsn::utils::FileDataType FileType>
error_code load_json_generic(const std::string &fname, T &object)
{
std::string data;
auto s = rocksdb::ReadFileToString(dsn::utils::PegasusEnv(FileType), fname, &data);
LOG_AND_RETURN_NOT_TRUE(ERROR, s.ok(), ERR_FILE_OPERATION_FAILED, "read file {} failed", fname);
LOG_AND_RETURN_NOT_TRUE(
ERROR,
json::json_forwarder<T>::decode(blob::create_from_bytes(std::move(data)), object),
ERR_FILE_OPERATION_FAILED,
"decode json from file {} failed",
fname);
return ERR_OK;
}
} // namespace

>>>>>>> 4bd797d87 (feat(encryption): add kms key management)
class replica_init_info
{
public:
Expand Down
84 changes: 0 additions & 84 deletions src/test/function_test/base_api/test_default_key_provider.cpp

This file was deleted.

0 comments on commit 24176f4

Please sign in to comment.