blob: 59a1cd9c7d5a58577f24d886a2f3b3d1a555e47c [file] [log] [blame]
Juan Castillo11abdcd2014-10-21 11:30:42 +01001/*
2 * Copyright (c) 2015, ARM Limited and Contributors. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are met:
6 *
7 * Redistributions of source code must retain the above copyright notice, this
8 * list of conditions and the following disclaimer.
9 *
10 * Redistributions in binary form must reproduce the above copyright notice,
11 * this list of conditions and the following disclaimer in the documentation
12 * and/or other materials provided with the distribution.
13 *
14 * Neither the name of ARM nor the names of its contributors may be used
15 * to endorse or promote products derived from this software without specific
16 * prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
22 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 * POSSIBILITY OF SUCH DAMAGE.
29 */
30
Juan Castilloe6d30e92015-06-12 11:27:59 +010031#include "tbbr/tbb_cert.h"
32#include "tbbr/tbb_ext.h"
33#include "tbbr/tbb_key.h"
Juan Castillo11abdcd2014-10-21 11:30:42 +010034
35/*
36 * Certificates used in the chain of trust
37 *
38 * The order of the certificates must follow the enumeration specified in
Juan Castilloe6d30e92015-06-12 11:27:59 +010039 * tbb_cert.h. All certificates are self-signed, so the issuer certificate
40 * field points to itself.
Juan Castillo11abdcd2014-10-21 11:30:42 +010041 */
Juan Castilloe6d30e92015-06-12 11:27:59 +010042static cert_t tbb_certs[] = {
43 [BL2_CERT] = {
Juan Castillo11abdcd2014-10-21 11:30:42 +010044 .id = BL2_CERT,
Juan Castillo1218dd52015-07-03 16:23:16 +010045 .opt = "bl2-cert",
Juan Castillo11abdcd2014-10-21 11:30:42 +010046 .fn = NULL,
47 .cn = "BL2 Certificate",
Juan Castilloe6d30e92015-06-12 11:27:59 +010048 .key = ROT_KEY,
49 .issuer = BL2_CERT,
50 .ext = {
51 BL2_HASH_EXT
52 },
53 .num_ext = 1
Juan Castillo11abdcd2014-10-21 11:30:42 +010054 },
Juan Castilloe6d30e92015-06-12 11:27:59 +010055 [TRUSTED_KEY_CERT] = {
Juan Castillo11abdcd2014-10-21 11:30:42 +010056 .id = TRUSTED_KEY_CERT,
Juan Castillo1218dd52015-07-03 16:23:16 +010057 .opt = "trusted-key-cert",
Juan Castillo11abdcd2014-10-21 11:30:42 +010058 .fn = NULL,
59 .cn = "Trusted Key Certificate",
Juan Castilloe6d30e92015-06-12 11:27:59 +010060 .key = ROT_KEY,
61 .issuer = TRUSTED_KEY_CERT,
62 .ext = {
63 TZ_WORLD_PK_EXT,
64 NTZ_WORLD_PK_EXT
65 },
66 .num_ext = 2
Juan Castillo11abdcd2014-10-21 11:30:42 +010067 },
Juan Castilloe6d30e92015-06-12 11:27:59 +010068 [BL30_KEY_CERT] = {
Juan Castillo11abdcd2014-10-21 11:30:42 +010069 .id = BL30_KEY_CERT,
Juan Castillo1218dd52015-07-03 16:23:16 +010070 .opt = "bl30-key-cert",
Juan Castillo11abdcd2014-10-21 11:30:42 +010071 .fn = NULL,
72 .cn = "BL3-0 Key Certificate",
Juan Castilloe6d30e92015-06-12 11:27:59 +010073 .key = TRUSTED_WORLD_KEY,
74 .issuer = BL30_KEY_CERT,
75 .ext = {
76 BL30_CONTENT_CERT_PK_EXT
77 },
78 .num_ext = 1
Juan Castillo11abdcd2014-10-21 11:30:42 +010079 },
Juan Castilloe6d30e92015-06-12 11:27:59 +010080 [BL30_CERT] = {
Juan Castillo11abdcd2014-10-21 11:30:42 +010081 .id = BL30_CERT,
Juan Castillo1218dd52015-07-03 16:23:16 +010082 .opt = "bl30-cert",
Juan Castillo11abdcd2014-10-21 11:30:42 +010083 .fn = NULL,
84 .cn = "BL3-0 Content Certificate",
Juan Castilloe6d30e92015-06-12 11:27:59 +010085 .key = BL30_KEY,
86 .issuer = BL30_CERT,
87 .ext = {
88 BL30_HASH_EXT
89 },
90 .num_ext = 1
Juan Castillo11abdcd2014-10-21 11:30:42 +010091 },
Juan Castilloe6d30e92015-06-12 11:27:59 +010092 [BL31_KEY_CERT] = {
Juan Castillo11abdcd2014-10-21 11:30:42 +010093 .id = BL31_KEY_CERT,
Juan Castillo1218dd52015-07-03 16:23:16 +010094 .opt = "bl31-key-cert",
Juan Castillo11abdcd2014-10-21 11:30:42 +010095 .fn = NULL,
96 .cn = "BL3-1 Key Certificate",
Juan Castilloe6d30e92015-06-12 11:27:59 +010097 .key = TRUSTED_WORLD_KEY,
98 .issuer = BL31_KEY_CERT,
99 .ext = {
100 BL31_CONTENT_CERT_PK_EXT
101 },
102 .num_ext = 1
Juan Castillo11abdcd2014-10-21 11:30:42 +0100103 },
Juan Castilloe6d30e92015-06-12 11:27:59 +0100104 [BL31_CERT] = {
Juan Castillo11abdcd2014-10-21 11:30:42 +0100105 .id = BL31_CERT,
Juan Castillo1218dd52015-07-03 16:23:16 +0100106 .opt = "bl31-cert",
Juan Castillo11abdcd2014-10-21 11:30:42 +0100107 .fn = NULL,
108 .cn = "BL3-1 Content Certificate",
Juan Castilloe6d30e92015-06-12 11:27:59 +0100109 .key = BL31_KEY,
110 .issuer = BL31_CERT,
111 .ext = {
112 BL31_HASH_EXT
113 },
114 .num_ext = 1
Juan Castillo11abdcd2014-10-21 11:30:42 +0100115 },
Juan Castilloe6d30e92015-06-12 11:27:59 +0100116 [BL32_KEY_CERT] = {
Juan Castillo11abdcd2014-10-21 11:30:42 +0100117 .id = BL32_KEY_CERT,
Juan Castillo1218dd52015-07-03 16:23:16 +0100118 .opt = "bl32-key-cert",
Juan Castillo11abdcd2014-10-21 11:30:42 +0100119 .fn = NULL,
120 .cn = "BL3-2 Key Certificate",
Juan Castilloe6d30e92015-06-12 11:27:59 +0100121 .key = TRUSTED_WORLD_KEY,
122 .issuer = BL32_KEY_CERT,
123 .ext = {
124 BL32_CONTENT_CERT_PK_EXT
125 },
126 .num_ext = 1
Juan Castillo11abdcd2014-10-21 11:30:42 +0100127 },
Juan Castilloe6d30e92015-06-12 11:27:59 +0100128 [BL32_CERT] = {
Juan Castillo11abdcd2014-10-21 11:30:42 +0100129 .id = BL32_CERT,
Juan Castillo1218dd52015-07-03 16:23:16 +0100130 .opt = "bl32-cert",
Juan Castillo11abdcd2014-10-21 11:30:42 +0100131 .fn = NULL,
132 .cn = "BL3-2 Content Certificate",
Juan Castilloe6d30e92015-06-12 11:27:59 +0100133 .key = BL32_KEY,
134 .issuer = BL32_CERT,
135 .ext = {
136 BL32_HASH_EXT
137 },
138 .num_ext = 1
Juan Castillo11abdcd2014-10-21 11:30:42 +0100139 },
Juan Castilloe6d30e92015-06-12 11:27:59 +0100140 [BL33_KEY_CERT] = {
Juan Castillo11abdcd2014-10-21 11:30:42 +0100141 .id = BL33_KEY_CERT,
Juan Castillo1218dd52015-07-03 16:23:16 +0100142 .opt = "bl33-key-cert",
Juan Castillo11abdcd2014-10-21 11:30:42 +0100143 .fn = NULL,
144 .cn = "BL3-3 Key Certificate",
Juan Castilloe6d30e92015-06-12 11:27:59 +0100145 .key = NON_TRUSTED_WORLD_KEY,
146 .issuer = BL33_KEY_CERT,
147 .ext = {
148 BL33_CONTENT_CERT_PK_EXT
149 },
150 .num_ext = 1
Juan Castillo11abdcd2014-10-21 11:30:42 +0100151 },
Juan Castilloe6d30e92015-06-12 11:27:59 +0100152 [BL33_CERT] = {
Juan Castillo11abdcd2014-10-21 11:30:42 +0100153 .id = BL33_CERT,
Juan Castillo1218dd52015-07-03 16:23:16 +0100154 .opt = "bl33-cert",
Juan Castillo11abdcd2014-10-21 11:30:42 +0100155 .fn = NULL,
156 .cn = "BL3-3 Content Certificate",
Juan Castilloe6d30e92015-06-12 11:27:59 +0100157 .key = BL33_KEY,
158 .issuer = BL33_CERT,
159 .ext = {
160 BL33_HASH_EXT
161 },
162 .num_ext = 1
Yatharth Kochar5752b592015-08-21 15:30:55 +0100163 },
164 [FWU_CERT] = {
165 .id = FWU_CERT,
166 .opt = "fwu-cert",
167 .fn = NULL,
168 .cn = "FWU Certificate",
169 .key = ROT_KEY,
170 .issuer = FWU_CERT,
171 .ext = {
172 SCP_BL2U_HASH_EXT,
173 BL2U_HASH_EXT,
174 NS_BL2U_HASH_EXT
175 },
176 .num_ext = 3
Juan Castillo11abdcd2014-10-21 11:30:42 +0100177 }
178};
Juan Castilloe6d30e92015-06-12 11:27:59 +0100179
180REGISTER_COT(tbb_certs);