f920eafd0e3d402c67366f9932093505a57bcd94
[platform/core/test/security-tests.git] / tests / ckm / test-certs.h
1 /*
2  *  Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd All Rights Reserved
3  *
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
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
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
15  */
16 /*
17  * @file       test-certs.h
18  * @author     Maciej J. Karpiuk (m.karpiuk2@samsung.com)
19  * @version    1.0
20  */
21
22 #pragma once
23
24 #include <string>
25 #include <ckm/ckm-certificate.h>
26
27 namespace TestData
28 {
29
30 enum certificateID {
31     // test certificates
32     TEST_ROOT_CA = 0,               // TEST_ROOT_CA, expires 2035
33     TEST_IM_CA,                     // TEST_IM_CA, signed by TEST_ROOT_CA, expires 2035
34     TEST_LEAF,                      // TEST_LEAF, signed by TEST_IM_CA, expires 2035
35
36     // third party
37     GIAG2,                          // GIAG2, signed by GEOTRUST, expires 31 Dec 2016
38     MBANK,                          // MBANK, signed by SYMANTEC, expires 04 Feb 2016
39     SYMANTEC,                       // SYMANTEC, signed by VERISIGN, expires 30 Oct 2023
40     GEOTRUST,                       // GEOTRUST, GeoTrust Global CA - signed by EQUIFAX, expires 21 Aug 2018
41     EQUIFAX,                        // EQUIFAX (root CA), expires 22 Aug 2018
42     GOOGLE_COM,                     // GOOGLE_COM, *.google.com - signed by GIAG2, expires 12 May 2015
43
44     // footer - last element in the set
45     NO_CERT
46 };
47
48 std::string getTestCertificateBase64(certificateID id);
49 CKM::CertificateShPtr getTestCertificate(certificateID id);
50 }