2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 * @file task_certify.h
18 * @author Pawel Sikorski (p.sikorski@samgsung.com)
22 #ifndef INSTALLER_CORE_JOS_WIDGET_INSTALL_TASK_CERTIFY_H
23 #define INSTALLER_CORE_JOS_WIDGET_INSTALL_TASK_CERTIFY_H
28 #include <libxml/c14n.h>
32 #include <vcore/CertStoreType.h>
33 #include <vcore/SignatureFinder.h>
34 #include <widget_install/job_widget_install.h>
36 class InstallerContext;
38 namespace ValidationCore {
43 namespace WidgetInstall {
45 public DPL::TaskDecl<TaskCertify>
48 TaskCertify(JobWidgetInstall * const &jobContext);
58 JobWidgetInstall *m_jobContext;
60 typedef std::map<std::string, Level> secureSettingMap;
61 typedef std::map<std::string, Level>::iterator secureSettingIter;
65 void stepVerifyUpdate();
66 void stepCertifyLevel();
72 void processDistributorSignature(const ValidationCore::SignatureData &data);
73 void processAuthorSignature(const ValidationCore::SignatureData &data);
74 void getSignatureFiles(std::string path,
75 ValidationCore::SignatureFileInfoSet& file);
77 bool isTizenWebApp() const;
79 Level getCertifyLevel();
80 bool checkConfigurationLevel(Level level);
81 bool checkSettingLevel(Level level);
82 bool checkNPRuntime(Level level);
83 bool checkServiceLevel(Level level);
84 bool checkBackgroundCategoryLevel(Level level);
85 std::string enumToString(Level level);
86 Level certTypeToLevel(ValidationCore::CertStoreId::Type type);
88 } //namespace WidgetInstall
91 #endif // INSTALLER_CORE_JOS_WIDGET_INSTALL_TASK_CERTIFY_H