blob: d0ae836796dbf490d957eaefa510732cd8403ab7 [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,
45 .fn = NULL,
46 .cn = "BL2 Certificate",
Juan Castilloe6d30e92015-06-12 11:27:59 +010047 .key = ROT_KEY,
48 .issuer = BL2_CERT,
49 .ext = {
50 BL2_HASH_EXT
51 },
52 .num_ext = 1
Juan Castillo11abdcd2014-10-21 11:30:42 +010053 },
Juan Castilloe6d30e92015-06-12 11:27:59 +010054 [TRUSTED_KEY_CERT] = {
Juan Castillo11abdcd2014-10-21 11:30:42 +010055 .id = TRUSTED_KEY_CERT,
56 .fn = NULL,
57 .cn = "Trusted Key Certificate",
Juan Castilloe6d30e92015-06-12 11:27:59 +010058 .key = ROT_KEY,
59 .issuer = TRUSTED_KEY_CERT,
60 .ext = {
61 TZ_WORLD_PK_EXT,
62 NTZ_WORLD_PK_EXT
63 },
64 .num_ext = 2
Juan Castillo11abdcd2014-10-21 11:30:42 +010065 },
Juan Castilloe6d30e92015-06-12 11:27:59 +010066 [BL30_KEY_CERT] = {
Juan Castillo11abdcd2014-10-21 11:30:42 +010067 .id = BL30_KEY_CERT,
68 .fn = NULL,
69 .cn = "BL3-0 Key Certificate",
Juan Castilloe6d30e92015-06-12 11:27:59 +010070 .key = TRUSTED_WORLD_KEY,
71 .issuer = BL30_KEY_CERT,
72 .ext = {
73 BL30_CONTENT_CERT_PK_EXT
74 },
75 .num_ext = 1
Juan Castillo11abdcd2014-10-21 11:30:42 +010076 },
Juan Castilloe6d30e92015-06-12 11:27:59 +010077 [BL30_CERT] = {
Juan Castillo11abdcd2014-10-21 11:30:42 +010078 .id = BL30_CERT,
79 .fn = NULL,
80 .cn = "BL3-0 Content Certificate",
Juan Castilloe6d30e92015-06-12 11:27:59 +010081 .key = BL30_KEY,
82 .issuer = BL30_CERT,
83 .ext = {
84 BL30_HASH_EXT
85 },
86 .num_ext = 1
Juan Castillo11abdcd2014-10-21 11:30:42 +010087 },
Juan Castilloe6d30e92015-06-12 11:27:59 +010088 [BL31_KEY_CERT] = {
Juan Castillo11abdcd2014-10-21 11:30:42 +010089 .id = BL31_KEY_CERT,
90 .fn = NULL,
91 .cn = "BL3-1 Key Certificate",
Juan Castilloe6d30e92015-06-12 11:27:59 +010092 .key = TRUSTED_WORLD_KEY,
93 .issuer = BL31_KEY_CERT,
94 .ext = {
95 BL31_CONTENT_CERT_PK_EXT
96 },
97 .num_ext = 1
Juan Castillo11abdcd2014-10-21 11:30:42 +010098 },
Juan Castilloe6d30e92015-06-12 11:27:59 +010099 [BL31_CERT] = {
Juan Castillo11abdcd2014-10-21 11:30:42 +0100100 .id = BL31_CERT,
101 .fn = NULL,
102 .cn = "BL3-1 Content Certificate",
Juan Castilloe6d30e92015-06-12 11:27:59 +0100103 .key = BL31_KEY,
104 .issuer = BL31_CERT,
105 .ext = {
106 BL31_HASH_EXT
107 },
108 .num_ext = 1
Juan Castillo11abdcd2014-10-21 11:30:42 +0100109 },
Juan Castilloe6d30e92015-06-12 11:27:59 +0100110 [BL32_KEY_CERT] = {
Juan Castillo11abdcd2014-10-21 11:30:42 +0100111 .id = BL32_KEY_CERT,
112 .fn = NULL,
113 .cn = "BL3-2 Key Certificate",
Juan Castilloe6d30e92015-06-12 11:27:59 +0100114 .key = TRUSTED_WORLD_KEY,
115 .issuer = BL32_KEY_CERT,
116 .ext = {
117 BL32_CONTENT_CERT_PK_EXT
118 },
119 .num_ext = 1
Juan Castillo11abdcd2014-10-21 11:30:42 +0100120 },
Juan Castilloe6d30e92015-06-12 11:27:59 +0100121 [BL32_CERT] = {
Juan Castillo11abdcd2014-10-21 11:30:42 +0100122 .id = BL32_CERT,
123 .fn = NULL,
124 .cn = "BL3-2 Content Certificate",
Juan Castilloe6d30e92015-06-12 11:27:59 +0100125 .key = BL32_KEY,
126 .issuer = BL32_CERT,
127 .ext = {
128 BL32_HASH_EXT
129 },
130 .num_ext = 1
Juan Castillo11abdcd2014-10-21 11:30:42 +0100131 },
Juan Castilloe6d30e92015-06-12 11:27:59 +0100132 [BL33_KEY_CERT] = {
Juan Castillo11abdcd2014-10-21 11:30:42 +0100133 .id = BL33_KEY_CERT,
134 .fn = NULL,
135 .cn = "BL3-3 Key Certificate",
Juan Castilloe6d30e92015-06-12 11:27:59 +0100136 .key = NON_TRUSTED_WORLD_KEY,
137 .issuer = BL33_KEY_CERT,
138 .ext = {
139 BL33_CONTENT_CERT_PK_EXT
140 },
141 .num_ext = 1
Juan Castillo11abdcd2014-10-21 11:30:42 +0100142 },
Juan Castilloe6d30e92015-06-12 11:27:59 +0100143 [BL33_CERT] = {
Juan Castillo11abdcd2014-10-21 11:30:42 +0100144 .id = BL33_CERT,
145 .fn = NULL,
146 .cn = "BL3-3 Content Certificate",
Juan Castilloe6d30e92015-06-12 11:27:59 +0100147 .key = BL33_KEY,
148 .issuer = BL33_CERT,
149 .ext = {
150 BL33_HASH_EXT
151 },
152 .num_ext = 1
Juan Castillo11abdcd2014-10-21 11:30:42 +0100153 }
154};
Juan Castilloe6d30e92015-06-12 11:27:59 +0100155
156REGISTER_COT(tbb_certs);