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 DeveloperModeValidator.h
18 * @author Bartosz Janiak (b.janiak@samsung.com)
20 * @brief DeveloperModeValidatorValidator - implementing WAC 2.0 spec, including TargetRestriction
24 WRT_ENGINE_SRC_INSTALLER_CORE_VALIDATION_CORE_DEVELOPER_MODE_VALIDATOR_H
26 WRT_ENGINE_SRC_INSTALLER_CORE_VALIDATION_CORE_DEVELOPER_MODE_VALIDATOR_H
29 #include <dpl/exception.h>
30 #include "SignatureData.h"
32 namespace ValidationCore {
34 class DeveloperModeValidator
37 explicit DeveloperModeValidator(bool complianceMode = false,
38 const std::string &fakeIMEI = "",
39 const std::string &fakeMEID = "");
44 DECLARE_EXCEPTION_TYPE(DPL::Exception, Base)
45 DECLARE_EXCEPTION_TYPE(Base, UnableToLoadTestCertificate)
46 DECLARE_EXCEPTION_TYPE(Base, NoTargetRestrictionSatisfied)
49 void check(const SignatureData &data);
51 bool m_complianceModeEnabled;
52 std::string m_fakeIMEI;
53 std::string m_fakeMEID;
57 #endif /* WRT_ENGINE_SRC_INSTALLER_CORE_VALIDATION_CORE_DEVELOPER_MODE_VALIDATOR_H */