2 * Copyright (c) 2016 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 * @author Bartlomiej Grzelewski (b.grzelewski@samsung.com)
18 * @file CertStoreType.h
20 * @brief Identification of certificate domain. Certificate domains
21 * were defined in WAC 1.0 documentation. This is a part
22 * should be implemented in wrt-installer.
24 #ifndef _VALIDATION_CORE_CERTSTORETYPE_H_
25 #define _VALIDATION_CORE_CERTSTORETYPE_H_
29 #include <cert-svc/ccert.h>
31 namespace ValidationCore {
32 namespace CertStoreId {
33 typedef unsigned int Type;
35 // RootCA certificates for developer mode.
36 const Type TIZEN_DEVELOPER = CERTSVC_VISIBILITY_DEVELOPER;
37 // RootCA certificates for author signatures.
38 const Type TIZEN_TEST = 1 << 1;
39 const Type TIZEN_VERIFY = 1 << 2;
40 const Type TIZEN_STORE = 1 << 3;
41 const Type TIZEN_REVOKED = 1 << 4;
42 // RootCA's visibility level : public
43 const Type VIS_PUBLIC = CERTSVC_VISIBILITY_PUBLIC;
44 // RootCA's visibility level : partner
45 const Type VIS_PARTNER = CERTSVC_VISIBILITY_PARTNER;
46 // RootCA's visibility level : platform
47 const Type VIS_PLATFORM = CERTSVC_VISIBILITY_PLATFORM;
54 void add(Type second);
55 bool contains(Type second) const;
56 bool isContainsVis() const;
59 std::string typeToString() const;
62 Type m_certificateStorage;
65 } // namespace CertStoreId
66 } // namespace ValidationCore
68 #endif // _VALIDATION_CORE_CERTSTORETYPE_H_