xref: /rk3399_ARM-atf/tools/cert_create/src/tbbr/tbb_ext.c (revision 9b3ca9b120b2bd4ea15114872aba06229422770e)
155e291a4SJuan Castillo /*
2*9b3ca9b1SManish V Badarkhe  * Copyright (c) 2015-2020, ARM Limited and Contributors. All rights reserved.
355e291a4SJuan Castillo  *
482cb2c1aSdp-arm  * SPDX-License-Identifier: BSD-3-Clause
555e291a4SJuan Castillo  */
655e291a4SJuan Castillo 
755e291a4SJuan Castillo #include <stdio.h>
855e291a4SJuan Castillo #include <string.h>
955e291a4SJuan Castillo #include <openssl/err.h>
1055e291a4SJuan Castillo #include <openssl/x509v3.h>
11bb41eb7aSMasahiro Yamada 
12bb41eb7aSMasahiro Yamada #if USE_TBBR_DEFS
13bb41eb7aSMasahiro Yamada #include <tbbr_oid.h>
14bb41eb7aSMasahiro Yamada #else
15bb41eb7aSMasahiro Yamada #include <platform_oid.h>
16bb41eb7aSMasahiro Yamada #endif
17bb41eb7aSMasahiro Yamada 
1855e291a4SJuan Castillo #include "ext.h"
1955e291a4SJuan Castillo #include "tbbr/tbb_ext.h"
2055e291a4SJuan Castillo #include "tbbr/tbb_key.h"
2155e291a4SJuan Castillo 
2255e291a4SJuan Castillo static ext_t tbb_ext[] = {
23516beb58SJuan Castillo 	[TRUSTED_FW_NVCOUNTER_EXT] = {
24516beb58SJuan Castillo 		.oid = TRUSTED_FW_NVCOUNTER_OID,
2596103d5aSJuan Castillo 		.opt = "tfw-nvctr",
2696103d5aSJuan Castillo 		.help_msg = "Trusted Firmware Non-Volatile counter value",
2755e291a4SJuan Castillo 		.sn = "TrustedWorldNVCounter",
2855e291a4SJuan Castillo 		.ln = "Trusted World Non-Volatile counter",
2955e291a4SJuan Castillo 		.asn1_type = V_ASN1_INTEGER,
3055e291a4SJuan Castillo 		.type = EXT_TYPE_NVCOUNTER,
3196103d5aSJuan Castillo 		.attr.nvctr_type = NVCTR_TYPE_TFW
3255e291a4SJuan Castillo 	},
33516beb58SJuan Castillo 	[NON_TRUSTED_FW_NVCOUNTER_EXT] = {
34516beb58SJuan Castillo 		.oid = NON_TRUSTED_FW_NVCOUNTER_OID,
3596103d5aSJuan Castillo 		.opt = "ntfw-nvctr",
3696103d5aSJuan Castillo 		.help_msg = "Non-Trusted Firmware Non-Volatile counter value",
3755e291a4SJuan Castillo 		.sn = "NormalWorldNVCounter",
3896103d5aSJuan Castillo 		.ln = "Non-Trusted Firmware Non-Volatile counter",
3955e291a4SJuan Castillo 		.asn1_type = V_ASN1_INTEGER,
4055e291a4SJuan Castillo 		.type = EXT_TYPE_NVCOUNTER,
4196103d5aSJuan Castillo 		.attr.nvctr_type = NVCTR_TYPE_NTFW
4255e291a4SJuan Castillo 	},
43516beb58SJuan Castillo 	[TRUSTED_BOOT_FW_HASH_EXT] = {
44516beb58SJuan Castillo 		.oid = TRUSTED_BOOT_FW_HASH_OID,
45516beb58SJuan Castillo 		.opt = "tb-fw",
46159807e2SJuan Castillo 		.help_msg = "Trusted Boot Firmware image file",
4755e291a4SJuan Castillo 		.sn = "TrustedBootFirmwareHash",
48516beb58SJuan Castillo 		.ln = "Trusted Boot Firmware hash (SHA256)",
4955e291a4SJuan Castillo 		.asn1_type = V_ASN1_OCTET_STRING,
5055e291a4SJuan Castillo 		.type = EXT_TYPE_HASH
5155e291a4SJuan Castillo 	},
52e24659dfSSoby Mathew 	[TRUSTED_BOOT_FW_CONFIG_HASH_EXT] = {
53e24659dfSSoby Mathew 		.oid = TRUSTED_BOOT_FW_CONFIG_HASH_OID,
54e24659dfSSoby Mathew 		.opt = "tb-fw-config",
55e24659dfSSoby Mathew 		.help_msg = "Trusted Boot Firmware Config file",
56e24659dfSSoby Mathew 		.sn = "TrustedBootFirmwareConfigHash",
57e24659dfSSoby Mathew 		.ln = "Trusted Boot Firmware Config hash",
58e24659dfSSoby Mathew 		.asn1_type = V_ASN1_OCTET_STRING,
59e24659dfSSoby Mathew 		.type = EXT_TYPE_HASH,
60e24659dfSSoby Mathew 		.optional = 1
61e24659dfSSoby Mathew 	},
62e24659dfSSoby Mathew 	[HW_CONFIG_HASH_EXT] = {
63e24659dfSSoby Mathew 		.oid = HW_CONFIG_HASH_OID,
64e24659dfSSoby Mathew 		.opt = "hw-config",
65e24659dfSSoby Mathew 		.help_msg = "HW Config file",
66e24659dfSSoby Mathew 		.sn = "HWConfigHash",
67e24659dfSSoby Mathew 		.ln = "HW Config hash",
68e24659dfSSoby Mathew 		.asn1_type = V_ASN1_OCTET_STRING,
69e24659dfSSoby Mathew 		.type = EXT_TYPE_HASH,
70e24659dfSSoby Mathew 		.optional = 1
71e24659dfSSoby Mathew 	},
72*9b3ca9b1SManish V Badarkhe 	[FW_CONFIG_HASH_EXT] = {
73*9b3ca9b1SManish V Badarkhe 		.oid = FW_CONFIG_HASH_OID,
74*9b3ca9b1SManish V Badarkhe 		.opt = "fw-config",
75*9b3ca9b1SManish V Badarkhe 		.help_msg = "Firmware Config file",
76*9b3ca9b1SManish V Badarkhe 		.sn = "FirmwareConfigHash",
77*9b3ca9b1SManish V Badarkhe 		.ln = "Firmware Config hash",
78*9b3ca9b1SManish V Badarkhe 		.asn1_type = V_ASN1_OCTET_STRING,
79*9b3ca9b1SManish V Badarkhe 		.type = EXT_TYPE_HASH,
80*9b3ca9b1SManish V Badarkhe 		.optional = 1
81*9b3ca9b1SManish V Badarkhe 	},
82516beb58SJuan Castillo 	[TRUSTED_WORLD_PK_EXT] = {
83516beb58SJuan Castillo 		.oid = TRUSTED_WORLD_PK_OID,
8455e291a4SJuan Castillo 		.sn = "TrustedWorldPublicKey",
8555e291a4SJuan Castillo 		.ln = "Trusted World Public Key",
8655e291a4SJuan Castillo 		.asn1_type = V_ASN1_OCTET_STRING,
8755e291a4SJuan Castillo 		.type = EXT_TYPE_PKEY,
8896103d5aSJuan Castillo 		.attr.key = TRUSTED_WORLD_KEY
8955e291a4SJuan Castillo 	},
90516beb58SJuan Castillo 	[NON_TRUSTED_WORLD_PK_EXT] = {
91516beb58SJuan Castillo 		.oid = NON_TRUSTED_WORLD_PK_OID,
9255e291a4SJuan Castillo 		.sn = "NonTrustedWorldPublicKey",
9355e291a4SJuan Castillo 		.ln = "Non-Trusted World Public Key",
9455e291a4SJuan Castillo 		.asn1_type = V_ASN1_OCTET_STRING,
9555e291a4SJuan Castillo 		.type = EXT_TYPE_PKEY,
9696103d5aSJuan Castillo 		.attr.key = NON_TRUSTED_WORLD_KEY
9755e291a4SJuan Castillo 	},
98516beb58SJuan Castillo 	[SCP_FW_CONTENT_CERT_PK_EXT] = {
99516beb58SJuan Castillo 		.oid = SCP_FW_CONTENT_CERT_PK_OID,
10055e291a4SJuan Castillo 		.sn = "SCPFirmwareContentCertPK",
10155e291a4SJuan Castillo 		.ln = "SCP Firmware content certificate public key",
10255e291a4SJuan Castillo 		.asn1_type = V_ASN1_OCTET_STRING,
10355e291a4SJuan Castillo 		.type = EXT_TYPE_PKEY,
10496103d5aSJuan Castillo 		.attr.key = SCP_FW_CONTENT_CERT_KEY
10555e291a4SJuan Castillo 	},
106516beb58SJuan Castillo 	[SCP_FW_HASH_EXT] = {
107516beb58SJuan Castillo 		.oid = SCP_FW_HASH_OID,
108516beb58SJuan Castillo 		.opt = "scp-fw",
109159807e2SJuan Castillo 		.help_msg = "SCP Firmware image file",
11055e291a4SJuan Castillo 		.sn = "SCPFirmwareHash",
111516beb58SJuan Castillo 		.ln = "SCP Firmware hash (SHA256)",
11255e291a4SJuan Castillo 		.asn1_type = V_ASN1_OCTET_STRING,
11355e291a4SJuan Castillo 		.type = EXT_TYPE_HASH
11455e291a4SJuan Castillo 	},
115516beb58SJuan Castillo 	[SOC_FW_CONTENT_CERT_PK_EXT] = {
116516beb58SJuan Castillo 		.oid = SOC_FW_CONTENT_CERT_PK_OID,
11755e291a4SJuan Castillo 		.sn = "SoCFirmwareContentCertPK",
11855e291a4SJuan Castillo 		.ln = "SoC Firmware content certificate public key",
11955e291a4SJuan Castillo 		.asn1_type = V_ASN1_OCTET_STRING,
12055e291a4SJuan Castillo 		.type = EXT_TYPE_PKEY,
12196103d5aSJuan Castillo 		.attr.key = SOC_FW_CONTENT_CERT_KEY
12255e291a4SJuan Castillo 	},
123516beb58SJuan Castillo 	[SOC_AP_FW_HASH_EXT] = {
124516beb58SJuan Castillo 		.oid = SOC_AP_FW_HASH_OID,
125516beb58SJuan Castillo 		.opt = "soc-fw",
126159807e2SJuan Castillo 		.help_msg = "SoC AP Firmware image file",
12755e291a4SJuan Castillo 		.sn = "SoCAPFirmwareHash",
128516beb58SJuan Castillo 		.ln = "SoC AP Firmware hash (SHA256)",
12955e291a4SJuan Castillo 		.asn1_type = V_ASN1_OCTET_STRING,
13055e291a4SJuan Castillo 		.type = EXT_TYPE_HASH
13155e291a4SJuan Castillo 	},
13217bc617eSSoby Mathew 	[SOC_FW_CONFIG_HASH_EXT] = {
13317bc617eSSoby Mathew 		.oid = SOC_FW_CONFIG_HASH_OID,
13417bc617eSSoby Mathew 		.opt = "soc-fw-config",
13517bc617eSSoby Mathew 		.help_msg = "SoC Firmware Config file",
13617bc617eSSoby Mathew 		.sn = "SocFirmwareConfigHash",
13717bc617eSSoby Mathew 		.ln = "SoC Firmware Config hash",
13817bc617eSSoby Mathew 		.asn1_type = V_ASN1_OCTET_STRING,
13917bc617eSSoby Mathew 		.type = EXT_TYPE_HASH,
14017bc617eSSoby Mathew 		.optional = 1
14117bc617eSSoby Mathew 	},
142516beb58SJuan Castillo 	[TRUSTED_OS_FW_CONTENT_CERT_PK_EXT] = {
143516beb58SJuan Castillo 		.oid = TRUSTED_OS_FW_CONTENT_CERT_PK_OID,
14455e291a4SJuan Castillo 		.sn = "TrustedOSFirmwareContentCertPK",
14555e291a4SJuan Castillo 		.ln = "Trusted OS Firmware content certificate public key",
14655e291a4SJuan Castillo 		.asn1_type = V_ASN1_OCTET_STRING,
14755e291a4SJuan Castillo 		.type = EXT_TYPE_PKEY,
14896103d5aSJuan Castillo 		.attr.key = TRUSTED_OS_FW_CONTENT_CERT_KEY
14955e291a4SJuan Castillo 	},
150516beb58SJuan Castillo 	[TRUSTED_OS_FW_HASH_EXT] = {
151516beb58SJuan Castillo 		.oid = TRUSTED_OS_FW_HASH_OID,
152516beb58SJuan Castillo 		.opt = "tos-fw",
153159807e2SJuan Castillo 		.help_msg = "Trusted OS image file",
15455e291a4SJuan Castillo 		.sn = "TrustedOSHash",
155516beb58SJuan Castillo 		.ln = "Trusted OS hash (SHA256)",
15655e291a4SJuan Castillo 		.asn1_type = V_ASN1_OCTET_STRING,
15755e291a4SJuan Castillo 		.type = EXT_TYPE_HASH
15855e291a4SJuan Castillo 	},
15971fb3964SSummer Qin 	[TRUSTED_OS_FW_EXTRA1_HASH_EXT] = {
16071fb3964SSummer Qin 		.oid = TRUSTED_OS_FW_EXTRA1_HASH_OID,
16171fb3964SSummer Qin 		.opt = "tos-fw-extra1",
16271fb3964SSummer Qin 		.help_msg = "Trusted OS Extra1 image file",
16371fb3964SSummer Qin 		.sn = "TrustedOSExtra1Hash",
16471fb3964SSummer Qin 		.ln = "Trusted OS Extra1 hash (SHA256)",
16571fb3964SSummer Qin 		.asn1_type = V_ASN1_OCTET_STRING,
16671fb3964SSummer Qin 		.type = EXT_TYPE_HASH,
16771fb3964SSummer Qin 		.optional = 1
16871fb3964SSummer Qin 	},
16971fb3964SSummer Qin 	[TRUSTED_OS_FW_EXTRA2_HASH_EXT] = {
17071fb3964SSummer Qin 		.oid = TRUSTED_OS_FW_EXTRA2_HASH_OID,
17171fb3964SSummer Qin 		.opt = "tos-fw-extra2",
17271fb3964SSummer Qin 		.help_msg = "Trusted OS Extra2 image file",
17371fb3964SSummer Qin 		.sn = "TrustedOSExtra2Hash",
17471fb3964SSummer Qin 		.ln = "Trusted OS Extra2 hash (SHA256)",
17571fb3964SSummer Qin 		.asn1_type = V_ASN1_OCTET_STRING,
17671fb3964SSummer Qin 		.type = EXT_TYPE_HASH,
17771fb3964SSummer Qin 		.optional = 1
17871fb3964SSummer Qin 	},
17917bc617eSSoby Mathew 	[TRUSTED_OS_FW_CONFIG_HASH_EXT] = {
18017bc617eSSoby Mathew 		.oid = TRUSTED_OS_FW_CONFIG_HASH_OID,
18117bc617eSSoby Mathew 		.opt = "tos-fw-config",
18217bc617eSSoby Mathew 		.help_msg = "Trusted OS Firmware Config file",
18317bc617eSSoby Mathew 		.sn = "TrustedOSFirmwareConfigHash",
18417bc617eSSoby Mathew 		.ln = "Trusted OS Firmware Config hash",
18517bc617eSSoby Mathew 		.asn1_type = V_ASN1_OCTET_STRING,
18617bc617eSSoby Mathew 		.type = EXT_TYPE_HASH,
18717bc617eSSoby Mathew 		.optional = 1
18817bc617eSSoby Mathew 	},
189516beb58SJuan Castillo 	[NON_TRUSTED_FW_CONTENT_CERT_PK_EXT] = {
190516beb58SJuan Castillo 		.oid = NON_TRUSTED_FW_CONTENT_CERT_PK_OID,
19155e291a4SJuan Castillo 		.sn = "NonTrustedFirmwareContentCertPK",
19255e291a4SJuan Castillo 		.ln = "Non-Trusted Firmware content certificate public key",
19355e291a4SJuan Castillo 		.asn1_type = V_ASN1_OCTET_STRING,
19455e291a4SJuan Castillo 		.type = EXT_TYPE_PKEY,
19596103d5aSJuan Castillo 		.attr.key = NON_TRUSTED_FW_CONTENT_CERT_KEY
19655e291a4SJuan Castillo 	},
197516beb58SJuan Castillo 	[NON_TRUSTED_WORLD_BOOTLOADER_HASH_EXT] = {
198516beb58SJuan Castillo 		.oid = NON_TRUSTED_WORLD_BOOTLOADER_HASH_OID,
199516beb58SJuan Castillo 		.opt = "nt-fw",
200159807e2SJuan Castillo 		.help_msg = "Non-Trusted World Bootloader image file",
20155e291a4SJuan Castillo 		.sn = "NonTrustedWorldBootloaderHash",
202516beb58SJuan Castillo 		.ln = "Non-Trusted World hash (SHA256)",
20355e291a4SJuan Castillo 		.asn1_type = V_ASN1_OCTET_STRING,
20455e291a4SJuan Castillo 		.type = EXT_TYPE_HASH
205cebe1f23SYatharth Kochar 	},
20617bc617eSSoby Mathew 	[NON_TRUSTED_FW_CONFIG_HASH_EXT] = {
20717bc617eSSoby Mathew 		.oid = NON_TRUSTED_FW_CONFIG_HASH_OID,
20817bc617eSSoby Mathew 		.opt = "nt-fw-config",
20917bc617eSSoby Mathew 		.help_msg = "Non Trusted OS Firmware Config file",
21017bc617eSSoby Mathew 		.sn = "NonTrustedOSFirmwareConfigHash",
21117bc617eSSoby Mathew 		.ln = "Non-Trusted OS Firmware Config hash",
21217bc617eSSoby Mathew 		.asn1_type = V_ASN1_OCTET_STRING,
21317bc617eSSoby Mathew 		.type = EXT_TYPE_HASH,
21417bc617eSSoby Mathew 		.optional = 1
21517bc617eSSoby Mathew 	},
216a8818bbfSManish Pandey 	[SP_PKG1_HASH_EXT] = {
217a8818bbfSManish Pandey 		.oid = SP_PKG1_HASH_OID,
218a8818bbfSManish Pandey 		.opt = "sp-pkg1",
219a8818bbfSManish Pandey 		.help_msg = "Secure Partition Package1 file",
220a8818bbfSManish Pandey 		.sn = "SPPkg1Hash",
221a8818bbfSManish Pandey 		.ln = "SP Pkg1 hash (SHA256)",
222a8818bbfSManish Pandey 		.asn1_type = V_ASN1_OCTET_STRING,
223a8818bbfSManish Pandey 		.type = EXT_TYPE_HASH,
224a8818bbfSManish Pandey 		.optional = 1
225a8818bbfSManish Pandey 	},
226a8818bbfSManish Pandey 	[SP_PKG2_HASH_EXT] = {
227a8818bbfSManish Pandey 		.oid = SP_PKG2_HASH_OID,
228a8818bbfSManish Pandey 		.opt = "sp-pkg2",
229a8818bbfSManish Pandey 		.help_msg = "Secure Partition Package2 file",
230a8818bbfSManish Pandey 		.sn = "SPPkg2Hash",
231a8818bbfSManish Pandey 		.ln = "SP Pkg2 hash (SHA256)",
232a8818bbfSManish Pandey 		.asn1_type = V_ASN1_OCTET_STRING,
233a8818bbfSManish Pandey 		.type = EXT_TYPE_HASH,
234a8818bbfSManish Pandey 		.optional = 1
235a8818bbfSManish Pandey 	},
236a8818bbfSManish Pandey 	[SP_PKG3_HASH_EXT] = {
237a8818bbfSManish Pandey 		.oid = SP_PKG3_HASH_OID,
238a8818bbfSManish Pandey 		.opt = "sp-pkg3",
239a8818bbfSManish Pandey 		.help_msg = "Secure Partition Package3 file",
240a8818bbfSManish Pandey 		.sn = "SPPkg3Hash",
241a8818bbfSManish Pandey 		.ln = "SP Pkg3 hash (SHA256)",
242a8818bbfSManish Pandey 		.asn1_type = V_ASN1_OCTET_STRING,
243a8818bbfSManish Pandey 		.type = EXT_TYPE_HASH,
244a8818bbfSManish Pandey 		.optional = 1
245a8818bbfSManish Pandey 	},
246a8818bbfSManish Pandey 	[SP_PKG4_HASH_EXT] = {
247a8818bbfSManish Pandey 		.oid = SP_PKG4_HASH_OID,
248a8818bbfSManish Pandey 		.opt = "sp-pkg4",
249a8818bbfSManish Pandey 		.help_msg = "Secure Partition Package4 file",
250a8818bbfSManish Pandey 		.sn = "SPPkg4Hash",
251a8818bbfSManish Pandey 		.ln = "SP Pkg4 hash (SHA256)",
252a8818bbfSManish Pandey 		.asn1_type = V_ASN1_OCTET_STRING,
253a8818bbfSManish Pandey 		.type = EXT_TYPE_HASH,
254a8818bbfSManish Pandey 		.optional = 1
255a8818bbfSManish Pandey 	},
256a8818bbfSManish Pandey 	[SP_PKG5_HASH_EXT] = {
257a8818bbfSManish Pandey 		.oid = SP_PKG5_HASH_OID,
258a8818bbfSManish Pandey 		.opt = "sp-pkg5",
259a8818bbfSManish Pandey 		.help_msg = "Secure Partition Package5 file",
260a8818bbfSManish Pandey 		.sn = "SPPkg5Hash",
261a8818bbfSManish Pandey 		.ln = "SP Pkg5 hash (SHA256)",
262a8818bbfSManish Pandey 		.asn1_type = V_ASN1_OCTET_STRING,
263a8818bbfSManish Pandey 		.type = EXT_TYPE_HASH,
264a8818bbfSManish Pandey 		.optional = 1
265a8818bbfSManish Pandey 	},
266a8818bbfSManish Pandey 	[SP_PKG6_HASH_EXT] = {
267a8818bbfSManish Pandey 		.oid = SP_PKG6_HASH_OID,
268a8818bbfSManish Pandey 		.opt = "sp-pkg6",
269a8818bbfSManish Pandey 		.help_msg = "Secure Partition Package6 file",
270a8818bbfSManish Pandey 		.sn = "SPPkg6Hash",
271a8818bbfSManish Pandey 		.ln = "SP Pkg6 hash (SHA256)",
272a8818bbfSManish Pandey 		.asn1_type = V_ASN1_OCTET_STRING,
273a8818bbfSManish Pandey 		.type = EXT_TYPE_HASH,
274a8818bbfSManish Pandey 		.optional = 1
275a8818bbfSManish Pandey 	},
276a8818bbfSManish Pandey 	[SP_PKG7_HASH_EXT] = {
277a8818bbfSManish Pandey 		.oid = SP_PKG7_HASH_OID,
278a8818bbfSManish Pandey 		.opt = "sp-pkg7",
279a8818bbfSManish Pandey 		.help_msg = "Secure Partition Package7 file",
280a8818bbfSManish Pandey 		.sn = "SPPkg7Hash",
281a8818bbfSManish Pandey 		.ln = "SP Pkg7 hash (SHA256)",
282a8818bbfSManish Pandey 		.asn1_type = V_ASN1_OCTET_STRING,
283a8818bbfSManish Pandey 		.type = EXT_TYPE_HASH,
284a8818bbfSManish Pandey 		.optional = 1
285a8818bbfSManish Pandey 	},
286a8818bbfSManish Pandey 	[SP_PKG8_HASH_EXT] = {
287a8818bbfSManish Pandey 		.oid = SP_PKG8_HASH_OID,
288a8818bbfSManish Pandey 		.opt = "sp-pkg8",
289a8818bbfSManish Pandey 		.help_msg = "Secure Partition Package8 file",
290a8818bbfSManish Pandey 		.sn = "SPPkg8Hash",
291a8818bbfSManish Pandey 		.ln = "SP Pkg8 hash (SHA256)",
292a8818bbfSManish Pandey 		.asn1_type = V_ASN1_OCTET_STRING,
293a8818bbfSManish Pandey 		.type = EXT_TYPE_HASH,
294a8818bbfSManish Pandey 		.optional = 1
295a8818bbfSManish Pandey 	},
296516beb58SJuan Castillo 	[SCP_FWU_CFG_HASH_EXT] = {
297516beb58SJuan Castillo 		.oid = SCP_FWU_CFG_HASH_OID,
298516beb58SJuan Castillo 		.opt = "scp-fwu-cfg",
299159807e2SJuan Castillo 		.help_msg = "SCP Firmware Update Config image file",
300cebe1f23SYatharth Kochar 		.sn = "SCPFWUpdateConfig",
301516beb58SJuan Castillo 		.ln = "SCP Firmware Update Config hash (SHA256)",
302cebe1f23SYatharth Kochar 		.asn1_type = V_ASN1_OCTET_STRING,
303cebe1f23SYatharth Kochar 		.type = EXT_TYPE_HASH,
304cebe1f23SYatharth Kochar 		.optional = 1
305cebe1f23SYatharth Kochar 	},
306516beb58SJuan Castillo 	[AP_FWU_CFG_HASH_EXT] = {
307516beb58SJuan Castillo 		.oid = AP_FWU_CFG_HASH_OID,
308516beb58SJuan Castillo 		.opt = "ap-fwu-cfg",
309159807e2SJuan Castillo 		.help_msg = "AP Firmware Update Config image file",
310cebe1f23SYatharth Kochar 		.sn = "APFWUpdateConfig",
311516beb58SJuan Castillo 		.ln = "AP Firmware Update Config hash (SHA256)",
312cebe1f23SYatharth Kochar 		.asn1_type = V_ASN1_OCTET_STRING,
313cebe1f23SYatharth Kochar 		.type = EXT_TYPE_HASH,
314cebe1f23SYatharth Kochar 		.optional = 1
315cebe1f23SYatharth Kochar 	},
316516beb58SJuan Castillo 	[FWU_HASH_EXT] = {
317516beb58SJuan Castillo 		.oid = FWU_HASH_OID,
318516beb58SJuan Castillo 		.opt = "fwu",
319159807e2SJuan Castillo 		.help_msg = "Firmware Updater image file",
320cebe1f23SYatharth Kochar 		.sn = "FWUpdaterHash",
321516beb58SJuan Castillo 		.ln = "Firmware Updater hash (SHA256)",
322cebe1f23SYatharth Kochar 		.asn1_type = V_ASN1_OCTET_STRING,
323cebe1f23SYatharth Kochar 		.type = EXT_TYPE_HASH,
324cebe1f23SYatharth Kochar 		.optional = 1
32555e291a4SJuan Castillo 	}
32655e291a4SJuan Castillo };
32755e291a4SJuan Castillo 
32855e291a4SJuan Castillo REGISTER_EXTENSIONS(tbb_ext);
329