updated build system
This commit is contained in:
@ -190,10 +190,9 @@ auto s3_provider::decrypt_object_name(std::string &object_name) const
|
|||||||
-> api_error {
|
-> api_error {
|
||||||
auto parts = utils::string::split(object_name, '/', false);
|
auto parts = utils::string::split(object_name, '/', false);
|
||||||
for (auto &part : parts) {
|
for (auto &part : parts) {
|
||||||
auto err = utils::encryption::decrypt_file_name(
|
if (not utils::encryption::decrypt_file_name(
|
||||||
get_config().get_s3_config().encryption_token, part);
|
get_config().get_s3_config().encryption_token, part)) {
|
||||||
if (err != api_error::success) {
|
return api_error::decryption_error;
|
||||||
return err;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -313,10 +312,9 @@ auto s3_provider::get_directory_items_impl(
|
|||||||
std::string child_object_name;
|
std::string child_object_name;
|
||||||
if (is_encrypted) {
|
if (is_encrypted) {
|
||||||
child_object_name = child_api_path;
|
child_object_name = child_api_path;
|
||||||
ret = utils::encryption::decrypt_file_path(cfg.encryption_token,
|
if (not utils::encryption::decrypt_file_path(cfg.encryption_token,
|
||||||
child_api_path);
|
child_api_path)) {
|
||||||
if (ret != api_error::success) {
|
return api_error::decryption_error;
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -166,9 +166,8 @@ const auto decrypt_parts = [](const repertory::app_config &cfg,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPECT_EQ(repertory::api_error::success,
|
EXPECT_EQ(true, repertory::utils::encryption::decrypt_file_name(
|
||||||
repertory::utils::encryption::decrypt_file_name(
|
cfg.get_encrypt_config().encryption_token, part));
|
||||||
cfg.get_encrypt_config().encryption_token, part));
|
|
||||||
}
|
}
|
||||||
path = repertory::utils::string::join(parts, '/');
|
path = repertory::utils::string::join(parts, '/');
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#include "utils/encryption.hpp"
|
#include "utils/encryption.hpp"
|
||||||
|
|
||||||
#include "utils/collection.hpp"
|
#include "utils/collection.hpp"
|
||||||
|
#include "utils/encrypting_reader.hpp"
|
||||||
|
|
||||||
#if defined(PROJECT_ENABLE_LIBSODIUM) && defined(PROJECT_ENABLE_BOOST)
|
#if defined(PROJECT_ENABLE_LIBSODIUM) && defined(PROJECT_ENABLE_BOOST)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user