From: Tomasz Iwanek Date: Fri, 19 Aug 2016 10:28:17 +0000 (+0200) Subject: StepTpkRecoverSignature X-Git-Tag: submit/tizen/20160829.010716^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4ded7180ec2c1aa996291d65794149a596d32bf5;p=platform%2Fcore%2Fappfw%2Ftpk-backend.git StepTpkRecoverSignature To verify, run test: app_fw$ /usr/bin/tpk-backend-ut/smoke-test --gtest_filter=SmokeTest.RecoveryMode_Tpk_Update Requires: - https://review.tizen.org/gerrit/84596 Change-Id: Ia6190c712fd89ef63d89d6d32f4b67b8f83813d2 --- diff --git a/src/tpk/CMakeLists.txt b/src/tpk/CMakeLists.txt index 646a52f..b818d1b 100644 --- a/src/tpk/CMakeLists.txt +++ b/src/tpk/CMakeLists.txt @@ -14,6 +14,7 @@ SET(SRCS step/pkgmgr/step_manifest_adjustment.cc step/rds/step_tpk_rds_modify.cc step/security/step_check_tpk_background_category.cc + step/security/step_tpk_recover_signature.cc tpk_app_query_interface.cc tpk_mount_path.cc tpk_installer.cc diff --git a/src/tpk/step/security/step_tpk_recover_signature.cc b/src/tpk/step/security/step_tpk_recover_signature.cc new file mode 100644 index 0000000..6a8623e --- /dev/null +++ b/src/tpk/step/security/step_tpk_recover_signature.cc @@ -0,0 +1,17 @@ +// Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved +// Use of this source code is governed by an apache 2.0 license that can be +// found in the LICENSE file. + +#include "tpk/step/security/step_tpk_recover_signature.h" + +namespace bf = boost::filesystem; + +namespace tpk { +namespace security { + +bf::path StepTpkRecoverSignature::GetSignatureRoot() { + return context_->pkg_path.get(); +} + +} // namespace security +} // namespace tpk diff --git a/src/tpk/step/security/step_tpk_recover_signature.h b/src/tpk/step/security/step_tpk_recover_signature.h new file mode 100644 index 0000000..bf97c17 --- /dev/null +++ b/src/tpk/step/security/step_tpk_recover_signature.h @@ -0,0 +1,31 @@ +// Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved +// Use of this source code is governed by an apache 2.0 license that can be +// found in the LICENSE file. + +#ifndef TPK_STEP_SECURITY_STEP_TPK_RECOVER_SIGNATURE_H_ +#define TPK_STEP_SECURITY_STEP_TPK_RECOVER_SIGNATURE_H_ + +#ifndef TPK_BACKEND_EXPORT_API +#define TPK_BACKEND_EXPORT_API +#endif + +#include + +#include + +namespace tpk { +namespace security { + +class TPK_BACKEND_EXPORT_API StepTpkRecoverSignature + : public common_installer::security::StepRecoverSignature { + public: + using StepRecoverSignature::StepRecoverSignature; + + private: + boost::filesystem::path GetSignatureRoot() override; +}; + +} // namespace security +} // namespace tpk + +#endif // TPK_STEP_SECURITY_STEP_TPK_RECOVER_SIGNATURE_H_ diff --git a/src/tpk/tpk_installer.cc b/src/tpk/tpk_installer.cc index d86a752..13da9db 100644 --- a/src/tpk/tpk_installer.cc +++ b/src/tpk/tpk_installer.cc @@ -78,6 +78,7 @@ #include "tpk/step/pkgmgr/step_manifest_adjustment.h" #include "tpk/step/rds/step_tpk_rds_modify.h" #include "tpk/step/security/step_check_tpk_background_category.h" +#include "tpk/step/security/step_tpk_recover_signature.h" namespace ci = common_installer; @@ -341,13 +342,14 @@ void TpkInstaller::RecoverySteps() { AddStep( ci::configuration::StepParseManifest::ManifestLocation::RECOVERY, ci::configuration::StepParseManifest::StoreLocation::NORMAL); - AddStep(); AddStep(); AddStep(); AddStep(); AddStep(); AddStep(); AddStep(); + AddStep(); + AddStep(); AddStep(); }