1 // Copyright (c) 2019 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.
5 #ifndef COMMON_STEP_SECURITY_STEP_SIGNATURE_H_
6 #define COMMON_STEP_SECURITY_STEP_SIGNATURE_H_
8 #include <boost/filesystem/path.hpp>
10 #include <manifest_parser/utils/logging.h>
14 #include "common/installer_context.h"
15 #include "common/step/step.h"
16 #include "common/signature.h"
18 namespace common_installer {
22 * \brief Step responsible for checking signature of given package and
23 * saving certificates into individual files to restore certificate database.
24 * Used by WGT and TPK backend
26 class StepSignature : public Step {
30 StepSignature(InstallerContext* context, bool save_signature)
31 : Step(context), save_signature_(save_signature) {}
33 Status process() override;
34 Status undo() override;
35 Status clean() override;
36 Status precheck() override;
39 virtual boost::filesystem::path GetSignatureRoot() const;
40 virtual Status CheckPrivilegeLevel(PrivilegeLevel level);
44 boost::filesystem::path backup_path_;
45 std::unique_ptr<Signature> signature_;
50 } // namespace security
51 } // namespace common_installer
53 #endif // COMMON_STEP_SECURITY_STEP_SIGNATURE_H_