Change StepUpdateTrustAnchor into StepRegisterTrustAnchor 32/155932/1
authorJunghyun Yeon <jungh.yeon@samsung.com>
Mon, 16 Oct 2017 11:59:23 +0000 (20:59 +0900)
committerJunghyun Yeon <jungh.yeon@samsung.com>
Mon, 16 Oct 2017 11:59:23 +0000 (20:59 +0900)
- Register and updating trust anchor has integrated into one step.

Related changes:
[app-installers] : https://review.tizen.org/gerrit/149836

Change-Id: Ib4c5fcf37a3a740ccadb30733d84f4a927119254
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
src/tpk/tpk_installer.cc

index b14a9f2..007298e 100644 (file)
@@ -78,7 +78,6 @@
 #include <common/step/security/step_update_security.h>
 #include <common/step/security/step_register_trust_anchor.h>
 #include <common/step/security/step_unregister_trust_anchor.h>
-#include <common/step/security/step_update_trust_anchor.h>
 
 #include "tpk/step/configuration/step_adjust_install_location.h"
 #include "tpk/step/configuration/step_check_reinstall_manifest.h"
@@ -207,7 +206,8 @@ void TpkInstaller::InstallSteps() {
   AddStep<tpk::pkgmgr::StepConvertXml>();
   AddStep<tpk::pkgmgr::StepManifestAdjustment>();
   AddStep<ci::pkgmgr::StepRegisterApplication>();
-  AddStep<ci::security::StepRegisterTrustAnchor>();
+  AddStep<ci::security::StepRegisterTrustAnchor>(
+      ci::security::StepRegisterTrustAnchor::RegisterType::INSTALL);
   AddStep<ci::security::StepPrivacyPrivilege>(
       ci::security::StepPrivacyPrivilege::ActionType::Install);
   AddStep<ci::security::StepRegisterSecurity>();
@@ -253,7 +253,8 @@ void TpkInstaller::UpdateSteps() {
   AddStep<tpk::pkgmgr::StepConvertXml>();
   AddStep<tpk::pkgmgr::StepManifestAdjustment>();
   AddStep<ci::pkgmgr::StepUpdateApplication>();
-  AddStep<ci::security::StepUpdateTrustAnchor>();
+  AddStep<ci::security::StepRegisterTrustAnchor>(
+      ci::security::StepRegisterTrustAnchor::RegisterType::UPDATE);
   AddStep<ci::security::StepPrivacyPrivilege>(
       ci::security::StepPrivacyPrivilege::ActionType::Update);
   AddStep<ci::security::StepUpdateSecurity>();
@@ -326,7 +327,8 @@ void TpkInstaller::ReinstallSteps() {
   AddStep<tpk::pkgmgr::StepConvertXml>();
   AddStep<tpk::pkgmgr::StepManifestAdjustment>();
   AddStep<ci::pkgmgr::StepUpdateApplication>();
-  AddStep<ci::security::StepUpdateTrustAnchor>();
+  AddStep<ci::security::StepRegisterTrustAnchor>(
+      ci::security::StepRegisterTrustAnchor::RegisterType::UPDATE);
   AddStep<ci::security::StepPrivacyPrivilege>(
       ci::security::StepPrivacyPrivilege::ActionType::Update);
   AddStep<ci::security::StepUpdateSecurity>();
@@ -373,7 +375,8 @@ void TpkInstaller::DeltaSteps() {
   AddStep<tpk::pkgmgr::StepConvertXml>();
   AddStep<tpk::pkgmgr::StepManifestAdjustment>();
   AddStep<ci::pkgmgr::StepUpdateApplication>();
-  AddStep<ci::security::StepUpdateTrustAnchor>();
+  AddStep<ci::security::StepRegisterTrustAnchor>(
+      ci::security::StepRegisterTrustAnchor::RegisterType::UPDATE);
   AddStep<ci::security::StepPrivacyPrivilege>(
       ci::security::StepPrivacyPrivilege::ActionType::Update);
   AddStep<ci::security::StepUpdateSecurity>();
@@ -444,7 +447,8 @@ void TpkInstaller::MountInstallSteps() {
   AddStep<tpk::pkgmgr::StepConvertXml>();
   AddStep<tpk::pkgmgr::StepManifestAdjustment>();
   AddStep<ci::pkgmgr::StepRegisterApplication>();
-  AddStep<ci::security::StepRegisterTrustAnchor>();
+  AddStep<ci::security::StepRegisterTrustAnchor>(
+      ci::security::StepRegisterTrustAnchor::RegisterType::INSTALL);
   AddStep<ci::security::StepPrivacyPrivilege>(
       ci::security::StepPrivacyPrivilege::ActionType::Install);
   AddStep<ci::security::StepRegisterSecurity>();
@@ -489,7 +493,8 @@ void TpkInstaller::MountUpdateSteps() {
   AddStep<tpk::pkgmgr::StepConvertXml>();
   AddStep<tpk::pkgmgr::StepManifestAdjustment>();
   AddStep<ci::pkgmgr::StepUpdateApplication>();
-  AddStep<ci::security::StepUpdateTrustAnchor>();
+  AddStep<ci::security::StepRegisterTrustAnchor>(
+      ci::security::StepRegisterTrustAnchor::RegisterType::UPDATE);
   AddStep<ci::security::StepPrivacyPrivilege>(
       ci::security::StepPrivacyPrivilege::ActionType::Update);
   AddStep<ci::security::StepUpdateSecurity>();
@@ -520,7 +525,8 @@ void TpkInstaller::ManifestDirectInstallSteps() {
   AddStep<tpk::filesystem::StepTpkPatchIcons>();
   AddStep<ci::security::StepRollbackInstallationSecurity>();
   AddStep<ci::pkgmgr::StepRegisterApplication>();
-  AddStep<ci::security::StepUpdateTrustAnchor>();
+  AddStep<ci::security::StepRegisterTrustAnchor>(
+      ci::security::StepRegisterTrustAnchor::RegisterType::UPDATE);
   AddStep<ci::security::StepPrivacyPrivilege>(
       ci::security::StepPrivacyPrivilege::ActionType::Install);
   AddStep<ci::security::StepRegisterSecurity>();
@@ -550,7 +556,8 @@ void TpkInstaller::ManifestDirectUpdateSteps() {
   AddStep<ci::pkgmgr::StepKillApps>();
   AddStep<ci::security::StepRollbackInstallationSecurity>();
   AddStep<ci::pkgmgr::StepUpdateApplication>();
-  AddStep<ci::security::StepUpdateTrustAnchor>();
+  AddStep<ci::security::StepRegisterTrustAnchor>(
+      ci::security::StepRegisterTrustAnchor::RegisterType::UPDATE);
   AddStep<ci::security::StepPrivacyPrivilege>(
       ci::security::StepPrivacyPrivilege::ActionType::Update);
   AddStep<ci::security::StepRegisterSecurity>();
@@ -572,7 +579,8 @@ void TpkInstaller::ManifestPartialInstallSteps() {
       ci::security::StepPrivilegeCompatibility::InternalPrivType::TPK);
   AddStep<tpk::security::StepCheckTpkBackgroundCategory>();
   AddStep<ci::pkgmgr::StepRegisterApplication>();
-  AddStep<ci::security::StepUpdateTrustAnchor>();
+  AddStep<ci::security::StepRegisterTrustAnchor>(
+      ci::security::StepRegisterTrustAnchor::RegisterType::UPDATE);
   AddStep<ci::security::StepPrivacyPrivilege>(
       ci::security::StepPrivacyPrivilege::ActionType::Install);
   AddStep<ci::security::StepRegisterSecurity>();
@@ -594,7 +602,8 @@ void TpkInstaller::ManifestPartialUpdateSteps() {
   AddStep<tpk::security::StepCheckTpkBackgroundCategory>();
   AddStep<ci::pkgmgr::StepKillApps>();
   AddStep<ci::pkgmgr::StepUpdateApplication>();
-  AddStep<ci::security::StepUpdateTrustAnchor>();
+  AddStep<ci::security::StepRegisterTrustAnchor>(
+      ci::security::StepRegisterTrustAnchor::RegisterType::UPDATE);
   AddStep<ci::security::StepPrivacyPrivilege>(
       ci::security::StepPrivacyPrivilege::ActionType::Update);
   AddStep<ci::security::StepRegisterSecurity>();
@@ -653,7 +662,8 @@ void TpkInstaller::ReadonlyUpdateInstallSteps() {
   AddStep<tpk::pkgmgr::StepConvertXml>();
   AddStep<tpk::pkgmgr::StepManifestAdjustment>();
   AddStep<ci::pkgmgr::StepUpdateApplication>();
-  AddStep<ci::security::StepUpdateTrustAnchor>();
+  AddStep<ci::security::StepRegisterTrustAnchor>(
+      ci::security::StepRegisterTrustAnchor::RegisterType::UPDATE);
   AddStep<ci::security::StepPrivacyPrivilege>(
       ci::security::StepPrivacyPrivilege::ActionType::Update);
   AddStep<ci::security::StepUpdateSecurity>();
@@ -682,7 +692,8 @@ void TpkInstaller::ReadonlyUpdateUninstallSteps() {
   AddStep<ci::pkgmgr::StepUpdateApplication>();
   AddStep<ci::security::StepRollbackDeinstallationSecurity>();
   AddStep<ci::filesystem::StepRemoveTep>();
-  AddStep<ci::security::StepUpdateTrustAnchor>();
+  AddStep<ci::security::StepRegisterTrustAnchor>(
+      ci::security::StepRegisterTrustAnchor::RegisterType::UPDATE);
   AddStep<ci::security::StepPrivacyPrivilege>(
       ci::security::StepPrivacyPrivilege::ActionType::Update);
   AddStep<ci::filesystem::StepRemoveFiles>();