Add StepSaveSignature step 07/175407/1
authorJunghyun Yeon <jungh.yeon@samsung.com>
Thu, 8 Mar 2018 08:01:56 +0000 (17:01 +0900)
committerJunghyun Yeon <jungh.yeon@samsung.com>
Tue, 10 Apr 2018 05:57:53 +0000 (14:57 +0900)
- Add new step to store distributor signatures into separate files.
- Existing distributor signature files will be removed to prevent
  extract package and re-packaging it.

Related changes:
[app-installers] : https://review.tizen.org/gerrit/#/c/171653/

Change-Id: I01b3c9882db400203470595bc3c0950544312e69
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
src/wgt/wgt_installer.cc

index c7edfe5..d7f2a8d 100755 (executable)
@@ -82,6 +82,7 @@
 #include <common/step/security/step_rollback_installation_security.h>
 #include <common/step/security/step_update_security.h>
 #include <common/step/security/step_register_trust_anchor.h>
+#include <common/step/security/step_save_signature.h>
 #include <common/step/security/step_unregister_trust_anchor.h>
 
 #include <wgt_manifest_handlers/widget_config_parser.h>
@@ -213,6 +214,7 @@ WgtInstaller::WgtInstaller(ci::PkgMgrPtr pkgrmgr)
       AddStep<ci::pkgmgr::StepCheckRestriction>();
       AddStep<ci::configuration::StepCheckTizenVersion>();
       AddStep<ci::security::StepCheckSignature>();
+      AddStep<ci::security::StepSaveSignature>();
       AddStep<ci::security::StepPrivilegeCompatibility>(
           ci::security::StepPrivilegeCompatibility::InternalPrivType::WGT);
       AddStep<wgt::security::StepCheckSettingsLevel>();
@@ -257,6 +259,7 @@ WgtInstaller::WgtInstaller(ci::PkgMgrPtr pkgrmgr)
       AddStep<ci::configuration::StepParsePreload>();
       AddStep<ci::configuration::StepCheckTizenVersion>();
       AddStep<ci::security::StepCheckSignature>();
+      AddStep<ci::security::StepSaveSignature>();
       AddStep<ci::security::StepPrivilegeCompatibility>(
           ci::security::StepPrivilegeCompatibility::InternalPrivType::WGT);
       AddStep<wgt::security::StepCheckSettingsLevel>();
@@ -373,6 +376,7 @@ WgtInstaller::WgtInstaller(ci::PkgMgrPtr pkgrmgr)
       AddStep<ci::filesystem::StepDisableExternalMount>();
       AddStep<wgt::configuration::StepCheckStartFiles>();
       AddStep<ci::security::StepCheckSignature>();
+      AddStep<ci::security::StepSaveSignature>();
       AddStep<ci::security::StepPrivilegeCompatibility>(
           ci::security::StepPrivilegeCompatibility::InternalPrivType::WGT);
       AddStep<wgt::security::StepCheckSettingsLevel>();
@@ -536,6 +540,7 @@ WgtInstaller::WgtInstaller(ci::PkgMgrPtr pkgrmgr)
       AddStep<ci::configuration::StepParsePreload>();
       AddStep<ci::configuration::StepCheckTizenVersion>();
       AddStep<wgt::security::StepDirectManifestCheckSignature>();
+      AddStep<ci::security::StepSaveSignature>();
       AddStep<ci::security::StepPrivilegeCompatibility>(
           ci::security::StepPrivilegeCompatibility::InternalPrivType::WGT);
       AddStep<wgt::security::StepCheckWgtNotificationCategory>();
@@ -566,6 +571,7 @@ WgtInstaller::WgtInstaller(ci::PkgMgrPtr pkgrmgr)
       AddStep<ci::configuration::StepParsePreload>();
       AddStep<ci::configuration::StepCheckTizenVersion>();
       AddStep<wgt::security::StepDirectManifestCheckSignature>();
+      AddStep<ci::security::StepSaveSignature>();
       AddStep<ci::security::StepPrivilegeCompatibility>(
           ci::security::StepPrivilegeCompatibility::InternalPrivType::WGT);
       AddStep<wgt::security::StepCheckWgtNotificationCategory>();
@@ -652,6 +658,7 @@ WgtInstaller::WgtInstaller(ci::PkgMgrPtr pkgrmgr)
       AddStep<ci::configuration::StepParsePreload>();
       AddStep<wgt::configuration::StepSetOldSignatureFilesLocation>();
       AddStep<ci::security::StepCheckSignature>();
+      AddStep<ci::security::StepSaveSignature>();
       AddStep<ci::security::StepPrivilegeCompatibility>(
           ci::security::StepPrivilegeCompatibility::InternalPrivType::WGT);
       AddStep<ci::configuration::StepSwitchReadonlyMode>();
@@ -677,6 +684,7 @@ WgtInstaller::WgtInstaller(ci::PkgMgrPtr pkgrmgr)
           wgt::configuration::StepParse::ConfigLocation::INSTALLED, true);
       AddStep<ci::configuration::StepParsePreload>();
       AddStep<ci::security::StepCheckSignature>();
+      AddStep<ci::security::StepSaveSignature>();
       AddStep<ci::security::StepPrivilegeCompatibility>(
           ci::security::StepPrivilegeCompatibility::InternalPrivType::WGT);
       AddStep<wgt::security::StepCheckWgtBackgroundCategory>();
@@ -702,6 +710,7 @@ WgtInstaller::WgtInstaller(ci::PkgMgrPtr pkgrmgr)
           ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
           ci::configuration::StepParseManifest::StoreLocation::BACKUP);
       AddStep<ci::security::StepCheckSignature>();
+      AddStep<ci::security::StepSaveSignature>();
       AddStep<ci::security::StepPrivilegeCompatibility>(
           ci::security::StepPrivilegeCompatibility::InternalPrivType::WGT);
       AddStep<wgt::security::StepCheckWgtBackgroundCategory>();