diff options
Diffstat (limited to 'tests/test-helper.cpp')
-rw-r--r-- | tests/test-helper.cpp | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/tests/test-helper.cpp b/tests/test-helper.cpp index ac17a0d..f6001e7 100644 --- a/tests/test-helper.cpp +++ b/tests/test-helper.cpp @@ -36,31 +36,9 @@ namespace Wae { namespace Test { -namespace { const uid_t UID_OWNER = 5001; -void copy_file(const char *src_path, const char *dst_path) -{ - std::ifstream src; - std::ofstream dst; - - src.exceptions(std::ifstream::failbit | std::ifstream::badbit); - dst.exceptions(std::ofstream::failbit | std::ofstream::badbit); - - src.open(src_path, std::ifstream::binary); - dst.open(dst_path, std::ofstream::binary); - - dst << src.rdbuf(); - - // std::ofstream destructor will call close automatically so no need to handle - // close in the exception cases - src.close(); - dst.close(); -} - -} // namespace anonymous - void add_get_remove_ce(wae_app_type_e app_type) { const char *pkg_id = "TEST_PKG_ID"; @@ -251,16 +229,9 @@ void remove_dek_store() void restore_dummy_preloaded_app_dek_keks() { - // Generate pri/pub key pair. Private key is protected - // with assigned password: APP_DEK_KEK_PRIKEY_PASSWORD) which is same to password - // of real private key because it's built in source of srcs/key_handler.c - // It should be removed after private key goes into key-manager initial-value. restore_dek_store(); - copy_file("/opt/share/wae/test/app_dek/prikey.pem", _get_dek_kek_pri_key_path()); - copy_file("/opt/share/wae/test/app_dek/pubkey.pem", _get_dek_kek_pub_key_path()); - - BOOST_MESSAGE("copying dummy pri/pub key pair to dek store done"); + BOOST_MESSAGE("Restored dek store done"); } } // namespace Test |