fb8845e8daea42e01f970253e7f238f995ebce96
[platform/core/appfw/app-installers.git] / src / common / step / security / step_recover_trust_anchor.h
1 // Copyright (c) 2018 Samsung Electronics Co., Ltd All Rights Reserved
2 // Use of this source code is governed by an apache 2.0 license that can be
3 // found in the LICENSE file.
4
5 #ifndef COMMON_STEP_SECURITY_STEP_RECOVER_TRUST_ANCHOR_H_
6 #define COMMON_STEP_SECURITY_STEP_RECOVER_TRUST_ANCHOR_H_
7
8 #include <boost/filesystem/path.hpp>
9 #include <manifest_parser/utils/logging.h>
10
11 #include "common/installer_context.h"
12 #include "common/step/recovery/step_recovery.h"
13
14 namespace common_installer {
15 namespace security {
16
17 /**
18  * @brief responsible for restoring trust anchor values
19  *
20  *
21  * Part of Recovery Mode. In case of partial
22  * installation trust anchor values get unregistered
23  * In case of unsuccessful partial update
24  * trust anchor values for the app before update
25  * gets restored
26  */
27 class StepRecoverTrustAnchor : public recovery::StepRecovery {
28  public:
29   using StepRecovery::StepRecovery;
30
31   Status RecoveryNew() override;
32   Status RecoveryUpdate() override;
33
34   STEP_NAME(RecoverTrustAnchor)
35 };
36
37 }  // namespace security
38 }  // namespace common_installer
39
40 #endif  // COMMON_STEP_SECURITY_STEP_RECOVER_TRUST_ANCHOR_H_