• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
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 
31 #include "tbb_cert.h"
32 #include "tbb_key.h"
33 
34 /*
35  * Certificates used in the chain of trust
36  *
37  * The order of the certificates must follow the enumeration specified in
38  * tbb_cert.h. All certificates are self-signed.
39  */
40 cert_t certs[NUM_CERTIFICATES] = {
41 	{
42 		.id = BL2_CERT,
43 		.fn = NULL,
44 		.cn = "BL2 Certificate",
45 		.key = &keys[ROT_KEY],
46 		.issuer = &certs[BL2_CERT],
47 	},
48 	{
49 		.id = TRUSTED_KEY_CERT,
50 		.fn = NULL,
51 		.cn = "Trusted Key Certificate",
52 		.key = &keys[ROT_KEY],
53 		.issuer = &certs[TRUSTED_KEY_CERT],
54 	},
55 	{
56 		.id = BL30_KEY_CERT,
57 		.fn = NULL,
58 		.cn = "BL3-0 Key Certificate",
59 		.key = &keys[TRUSTED_WORLD_KEY],
60 		.issuer = &certs[BL30_KEY_CERT],
61 	},
62 	{
63 		.id = BL30_CERT,
64 		.fn = NULL,
65 		.cn = "BL3-0 Content Certificate",
66 		.key = &keys[BL30_KEY],
67 		.issuer = &certs[BL30_CERT],
68 	},
69 	{
70 		.id = BL31_KEY_CERT,
71 		.fn = NULL,
72 		.cn = "BL3-1 Key Certificate",
73 		.key = &keys[TRUSTED_WORLD_KEY],
74 		.issuer = &certs[BL31_KEY_CERT],
75 	},
76 	{
77 		.id = BL31_CERT,
78 		.fn = NULL,
79 		.cn = "BL3-1 Content Certificate",
80 		.key = &keys[BL31_KEY],
81 		.issuer = &certs[BL31_CERT],
82 	},
83 	{
84 		.id = BL32_KEY_CERT,
85 		.fn = NULL,
86 		.cn = "BL3-2 Key Certificate",
87 		.key = &keys[TRUSTED_WORLD_KEY],
88 		.issuer = &certs[BL32_KEY_CERT],
89 	},
90 	{
91 		.id = BL32_CERT,
92 		.fn = NULL,
93 		.cn = "BL3-2 Content Certificate",
94 		.key = &keys[BL32_KEY],
95 		.issuer = &certs[BL32_CERT],
96 	},
97 	{
98 		.id = BL33_KEY_CERT,
99 		.fn = NULL,
100 		.cn = "BL3-3 Key Certificate",
101 		.key = &keys[NON_TRUSTED_WORLD_KEY],
102 		.issuer = &certs[BL33_KEY_CERT],
103 	},
104 	{
105 		.id = BL33_CERT,
106 		.fn = NULL,
107 		.cn = "BL3-3 Content Certificate",
108 		.key = &keys[BL33_KEY],
109 		.issuer = &certs[BL33_CERT],
110 	}
111 };
112