Juan Castillo | 11abdcd | 2014-10-21 11:30:42 +0100 | [diff] [blame] | 1 | /* |
Manish V Badarkhe | a1ffcf7 | 2020-06-11 21:08:45 +0100 | [diff] [blame] | 2 | * Copyright (c) 2015-2020, ARM Limited and Contributors. All rights reserved. |
Juan Castillo | 11abdcd | 2014-10-21 11:30:42 +0100 | [diff] [blame] | 3 | * |
dp-arm | fa3cf0b | 2017-05-03 09:38:09 +0100 | [diff] [blame] | 4 | * SPDX-License-Identifier: BSD-3-Clause |
Juan Castillo | 11abdcd | 2014-10-21 11:30:42 +0100 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #include <stdio.h> |
| 8 | #include <string.h> |
| 9 | #include <openssl/err.h> |
| 10 | #include <openssl/x509v3.h> |
Masahiro Yamada | a27c166 | 2017-05-22 12:11:24 +0900 | [diff] [blame] | 11 | |
| 12 | #if USE_TBBR_DEFS |
| 13 | #include <tbbr_oid.h> |
| 14 | #else |
| 15 | #include <platform_oid.h> |
| 16 | #endif |
| 17 | |
Juan Castillo | 11abdcd | 2014-10-21 11:30:42 +0100 | [diff] [blame] | 18 | #include "ext.h" |
Juan Castillo | e6d30e9 | 2015-06-12 11:27:59 +0100 | [diff] [blame] | 19 | #include "tbbr/tbb_ext.h" |
| 20 | #include "tbbr/tbb_key.h" |
Juan Castillo | 11abdcd | 2014-10-21 11:30:42 +0100 | [diff] [blame] | 21 | |
Juan Castillo | e6d30e9 | 2015-06-12 11:27:59 +0100 | [diff] [blame] | 22 | static ext_t tbb_ext[] = { |
Juan Castillo | be80120 | 2015-12-03 10:19:21 +0000 | [diff] [blame] | 23 | [TRUSTED_FW_NVCOUNTER_EXT] = { |
| 24 | .oid = TRUSTED_FW_NVCOUNTER_OID, |
Juan Castillo | 4352998 | 2016-01-22 11:05:24 +0000 | [diff] [blame] | 25 | .opt = "tfw-nvctr", |
| 26 | .help_msg = "Trusted Firmware Non-Volatile counter value", |
Juan Castillo | e6d30e9 | 2015-06-12 11:27:59 +0100 | [diff] [blame] | 27 | .sn = "TrustedWorldNVCounter", |
| 28 | .ln = "Trusted World Non-Volatile counter", |
| 29 | .asn1_type = V_ASN1_INTEGER, |
| 30 | .type = EXT_TYPE_NVCOUNTER, |
Juan Castillo | 4352998 | 2016-01-22 11:05:24 +0000 | [diff] [blame] | 31 | .attr.nvctr_type = NVCTR_TYPE_TFW |
Juan Castillo | 11abdcd | 2014-10-21 11:30:42 +0100 | [diff] [blame] | 32 | }, |
Juan Castillo | be80120 | 2015-12-03 10:19:21 +0000 | [diff] [blame] | 33 | [NON_TRUSTED_FW_NVCOUNTER_EXT] = { |
| 34 | .oid = NON_TRUSTED_FW_NVCOUNTER_OID, |
Juan Castillo | 4352998 | 2016-01-22 11:05:24 +0000 | [diff] [blame] | 35 | .opt = "ntfw-nvctr", |
| 36 | .help_msg = "Non-Trusted Firmware Non-Volatile counter value", |
Juan Castillo | e6d30e9 | 2015-06-12 11:27:59 +0100 | [diff] [blame] | 37 | .sn = "NormalWorldNVCounter", |
Juan Castillo | 4352998 | 2016-01-22 11:05:24 +0000 | [diff] [blame] | 38 | .ln = "Non-Trusted Firmware Non-Volatile counter", |
Juan Castillo | e6d30e9 | 2015-06-12 11:27:59 +0100 | [diff] [blame] | 39 | .asn1_type = V_ASN1_INTEGER, |
| 40 | .type = EXT_TYPE_NVCOUNTER, |
Juan Castillo | 4352998 | 2016-01-22 11:05:24 +0000 | [diff] [blame] | 41 | .attr.nvctr_type = NVCTR_TYPE_NTFW |
Juan Castillo | 11abdcd | 2014-10-21 11:30:42 +0100 | [diff] [blame] | 42 | }, |
Juan Castillo | be80120 | 2015-12-03 10:19:21 +0000 | [diff] [blame] | 43 | [TRUSTED_BOOT_FW_HASH_EXT] = { |
| 44 | .oid = TRUSTED_BOOT_FW_HASH_OID, |
| 45 | .opt = "tb-fw", |
Juan Castillo | 212f738 | 2015-12-15 16:37:57 +0000 | [diff] [blame] | 46 | .help_msg = "Trusted Boot Firmware image file", |
Juan Castillo | 11abdcd | 2014-10-21 11:30:42 +0100 | [diff] [blame] | 47 | .sn = "TrustedBootFirmwareHash", |
Juan Castillo | be80120 | 2015-12-03 10:19:21 +0000 | [diff] [blame] | 48 | .ln = "Trusted Boot Firmware hash (SHA256)", |
Juan Castillo | e6d30e9 | 2015-06-12 11:27:59 +0100 | [diff] [blame] | 49 | .asn1_type = V_ASN1_OCTET_STRING, |
| 50 | .type = EXT_TYPE_HASH |
Juan Castillo | 11abdcd | 2014-10-21 11:30:42 +0100 | [diff] [blame] | 51 | }, |
Soby Mathew | 2ffb473 | 2017-11-07 16:50:31 +0000 | [diff] [blame] | 52 | [TRUSTED_BOOT_FW_CONFIG_HASH_EXT] = { |
| 53 | .oid = TRUSTED_BOOT_FW_CONFIG_HASH_OID, |
| 54 | .opt = "tb-fw-config", |
| 55 | .help_msg = "Trusted Boot Firmware Config file", |
| 56 | .sn = "TrustedBootFirmwareConfigHash", |
| 57 | .ln = "Trusted Boot Firmware Config hash", |
| 58 | .asn1_type = V_ASN1_OCTET_STRING, |
| 59 | .type = EXT_TYPE_HASH, |
| 60 | .optional = 1 |
| 61 | }, |
| 62 | [HW_CONFIG_HASH_EXT] = { |
| 63 | .oid = HW_CONFIG_HASH_OID, |
| 64 | .opt = "hw-config", |
| 65 | .help_msg = "HW Config file", |
| 66 | .sn = "HWConfigHash", |
| 67 | .ln = "HW Config hash", |
| 68 | .asn1_type = V_ASN1_OCTET_STRING, |
| 69 | .type = EXT_TYPE_HASH, |
| 70 | .optional = 1 |
| 71 | }, |
Manish V Badarkhe | a1ffcf7 | 2020-06-11 21:08:45 +0100 | [diff] [blame] | 72 | [FW_CONFIG_HASH_EXT] = { |
| 73 | .oid = FW_CONFIG_HASH_OID, |
| 74 | .opt = "fw-config", |
| 75 | .help_msg = "Firmware Config file", |
| 76 | .sn = "FirmwareConfigHash", |
| 77 | .ln = "Firmware Config hash", |
| 78 | .asn1_type = V_ASN1_OCTET_STRING, |
| 79 | .type = EXT_TYPE_HASH, |
| 80 | .optional = 1 |
| 81 | }, |
Juan Castillo | be80120 | 2015-12-03 10:19:21 +0000 | [diff] [blame] | 82 | [TRUSTED_WORLD_PK_EXT] = { |
| 83 | .oid = TRUSTED_WORLD_PK_OID, |
Juan Castillo | 11abdcd | 2014-10-21 11:30:42 +0100 | [diff] [blame] | 84 | .sn = "TrustedWorldPublicKey", |
| 85 | .ln = "Trusted World Public Key", |
Juan Castillo | e6d30e9 | 2015-06-12 11:27:59 +0100 | [diff] [blame] | 86 | .asn1_type = V_ASN1_OCTET_STRING, |
| 87 | .type = EXT_TYPE_PKEY, |
Juan Castillo | 4352998 | 2016-01-22 11:05:24 +0000 | [diff] [blame] | 88 | .attr.key = TRUSTED_WORLD_KEY |
Juan Castillo | 11abdcd | 2014-10-21 11:30:42 +0100 | [diff] [blame] | 89 | }, |
Juan Castillo | be80120 | 2015-12-03 10:19:21 +0000 | [diff] [blame] | 90 | [NON_TRUSTED_WORLD_PK_EXT] = { |
| 91 | .oid = NON_TRUSTED_WORLD_PK_OID, |
Juan Castillo | 11abdcd | 2014-10-21 11:30:42 +0100 | [diff] [blame] | 92 | .sn = "NonTrustedWorldPublicKey", |
| 93 | .ln = "Non-Trusted World Public Key", |
Juan Castillo | e6d30e9 | 2015-06-12 11:27:59 +0100 | [diff] [blame] | 94 | .asn1_type = V_ASN1_OCTET_STRING, |
| 95 | .type = EXT_TYPE_PKEY, |
Juan Castillo | 4352998 | 2016-01-22 11:05:24 +0000 | [diff] [blame] | 96 | .attr.key = NON_TRUSTED_WORLD_KEY |
Juan Castillo | 11abdcd | 2014-10-21 11:30:42 +0100 | [diff] [blame] | 97 | }, |
Juan Castillo | be80120 | 2015-12-03 10:19:21 +0000 | [diff] [blame] | 98 | [SCP_FW_CONTENT_CERT_PK_EXT] = { |
| 99 | .oid = SCP_FW_CONTENT_CERT_PK_OID, |
Juan Castillo | 11abdcd | 2014-10-21 11:30:42 +0100 | [diff] [blame] | 100 | .sn = "SCPFirmwareContentCertPK", |
| 101 | .ln = "SCP Firmware content certificate public key", |
Juan Castillo | e6d30e9 | 2015-06-12 11:27:59 +0100 | [diff] [blame] | 102 | .asn1_type = V_ASN1_OCTET_STRING, |
| 103 | .type = EXT_TYPE_PKEY, |
Juan Castillo | 4352998 | 2016-01-22 11:05:24 +0000 | [diff] [blame] | 104 | .attr.key = SCP_FW_CONTENT_CERT_KEY |
Juan Castillo | 11abdcd | 2014-10-21 11:30:42 +0100 | [diff] [blame] | 105 | }, |
Juan Castillo | be80120 | 2015-12-03 10:19:21 +0000 | [diff] [blame] | 106 | [SCP_FW_HASH_EXT] = { |
| 107 | .oid = SCP_FW_HASH_OID, |
| 108 | .opt = "scp-fw", |
Juan Castillo | 212f738 | 2015-12-15 16:37:57 +0000 | [diff] [blame] | 109 | .help_msg = "SCP Firmware image file", |
Juan Castillo | 11abdcd | 2014-10-21 11:30:42 +0100 | [diff] [blame] | 110 | .sn = "SCPFirmwareHash", |
Juan Castillo | be80120 | 2015-12-03 10:19:21 +0000 | [diff] [blame] | 111 | .ln = "SCP Firmware hash (SHA256)", |
Juan Castillo | e6d30e9 | 2015-06-12 11:27:59 +0100 | [diff] [blame] | 112 | .asn1_type = V_ASN1_OCTET_STRING, |
| 113 | .type = EXT_TYPE_HASH |
Juan Castillo | 11abdcd | 2014-10-21 11:30:42 +0100 | [diff] [blame] | 114 | }, |
Juan Castillo | be80120 | 2015-12-03 10:19:21 +0000 | [diff] [blame] | 115 | [SOC_FW_CONTENT_CERT_PK_EXT] = { |
| 116 | .oid = SOC_FW_CONTENT_CERT_PK_OID, |
Juan Castillo | e6d30e9 | 2015-06-12 11:27:59 +0100 | [diff] [blame] | 117 | .sn = "SoCFirmwareContentCertPK", |
| 118 | .ln = "SoC Firmware content certificate public key", |
| 119 | .asn1_type = V_ASN1_OCTET_STRING, |
| 120 | .type = EXT_TYPE_PKEY, |
Juan Castillo | 4352998 | 2016-01-22 11:05:24 +0000 | [diff] [blame] | 121 | .attr.key = SOC_FW_CONTENT_CERT_KEY |
Juan Castillo | e6d30e9 | 2015-06-12 11:27:59 +0100 | [diff] [blame] | 122 | }, |
Juan Castillo | be80120 | 2015-12-03 10:19:21 +0000 | [diff] [blame] | 123 | [SOC_AP_FW_HASH_EXT] = { |
| 124 | .oid = SOC_AP_FW_HASH_OID, |
| 125 | .opt = "soc-fw", |
Juan Castillo | 212f738 | 2015-12-15 16:37:57 +0000 | [diff] [blame] | 126 | .help_msg = "SoC AP Firmware image file", |
Juan Castillo | e6d30e9 | 2015-06-12 11:27:59 +0100 | [diff] [blame] | 127 | .sn = "SoCAPFirmwareHash", |
Juan Castillo | be80120 | 2015-12-03 10:19:21 +0000 | [diff] [blame] | 128 | .ln = "SoC AP Firmware hash (SHA256)", |
Juan Castillo | e6d30e9 | 2015-06-12 11:27:59 +0100 | [diff] [blame] | 129 | .asn1_type = V_ASN1_OCTET_STRING, |
| 130 | .type = EXT_TYPE_HASH |
| 131 | }, |
Soby Mathew | 2bb78d3 | 2018-03-29 14:29:55 +0100 | [diff] [blame] | 132 | [SOC_FW_CONFIG_HASH_EXT] = { |
| 133 | .oid = SOC_FW_CONFIG_HASH_OID, |
| 134 | .opt = "soc-fw-config", |
| 135 | .help_msg = "SoC Firmware Config file", |
| 136 | .sn = "SocFirmwareConfigHash", |
| 137 | .ln = "SoC Firmware Config hash", |
| 138 | .asn1_type = V_ASN1_OCTET_STRING, |
| 139 | .type = EXT_TYPE_HASH, |
| 140 | .optional = 1 |
| 141 | }, |
Juan Castillo | be80120 | 2015-12-03 10:19:21 +0000 | [diff] [blame] | 142 | [TRUSTED_OS_FW_CONTENT_CERT_PK_EXT] = { |
| 143 | .oid = TRUSTED_OS_FW_CONTENT_CERT_PK_OID, |
Juan Castillo | 11abdcd | 2014-10-21 11:30:42 +0100 | [diff] [blame] | 144 | .sn = "TrustedOSFirmwareContentCertPK", |
| 145 | .ln = "Trusted OS Firmware content certificate public key", |
Juan Castillo | e6d30e9 | 2015-06-12 11:27:59 +0100 | [diff] [blame] | 146 | .asn1_type = V_ASN1_OCTET_STRING, |
| 147 | .type = EXT_TYPE_PKEY, |
Juan Castillo | 4352998 | 2016-01-22 11:05:24 +0000 | [diff] [blame] | 148 | .attr.key = TRUSTED_OS_FW_CONTENT_CERT_KEY |
Juan Castillo | 11abdcd | 2014-10-21 11:30:42 +0100 | [diff] [blame] | 149 | }, |
Juan Castillo | be80120 | 2015-12-03 10:19:21 +0000 | [diff] [blame] | 150 | [TRUSTED_OS_FW_HASH_EXT] = { |
| 151 | .oid = TRUSTED_OS_FW_HASH_OID, |
| 152 | .opt = "tos-fw", |
Juan Castillo | 212f738 | 2015-12-15 16:37:57 +0000 | [diff] [blame] | 153 | .help_msg = "Trusted OS image file", |
Juan Castillo | 11abdcd | 2014-10-21 11:30:42 +0100 | [diff] [blame] | 154 | .sn = "TrustedOSHash", |
Juan Castillo | be80120 | 2015-12-03 10:19:21 +0000 | [diff] [blame] | 155 | .ln = "Trusted OS hash (SHA256)", |
Juan Castillo | e6d30e9 | 2015-06-12 11:27:59 +0100 | [diff] [blame] | 156 | .asn1_type = V_ASN1_OCTET_STRING, |
| 157 | .type = EXT_TYPE_HASH |
Juan Castillo | 11abdcd | 2014-10-21 11:30:42 +0100 | [diff] [blame] | 158 | }, |
Summer Qin | 8072678 | 2017-04-20 16:28:39 +0100 | [diff] [blame] | 159 | [TRUSTED_OS_FW_EXTRA1_HASH_EXT] = { |
| 160 | .oid = TRUSTED_OS_FW_EXTRA1_HASH_OID, |
| 161 | .opt = "tos-fw-extra1", |
| 162 | .help_msg = "Trusted OS Extra1 image file", |
| 163 | .sn = "TrustedOSExtra1Hash", |
| 164 | .ln = "Trusted OS Extra1 hash (SHA256)", |
| 165 | .asn1_type = V_ASN1_OCTET_STRING, |
| 166 | .type = EXT_TYPE_HASH, |
| 167 | .optional = 1 |
| 168 | }, |
| 169 | [TRUSTED_OS_FW_EXTRA2_HASH_EXT] = { |
| 170 | .oid = TRUSTED_OS_FW_EXTRA2_HASH_OID, |
| 171 | .opt = "tos-fw-extra2", |
| 172 | .help_msg = "Trusted OS Extra2 image file", |
| 173 | .sn = "TrustedOSExtra2Hash", |
| 174 | .ln = "Trusted OS Extra2 hash (SHA256)", |
| 175 | .asn1_type = V_ASN1_OCTET_STRING, |
| 176 | .type = EXT_TYPE_HASH, |
| 177 | .optional = 1 |
| 178 | }, |
Soby Mathew | 2bb78d3 | 2018-03-29 14:29:55 +0100 | [diff] [blame] | 179 | [TRUSTED_OS_FW_CONFIG_HASH_EXT] = { |
| 180 | .oid = TRUSTED_OS_FW_CONFIG_HASH_OID, |
| 181 | .opt = "tos-fw-config", |
| 182 | .help_msg = "Trusted OS Firmware Config file", |
| 183 | .sn = "TrustedOSFirmwareConfigHash", |
| 184 | .ln = "Trusted OS Firmware Config hash", |
| 185 | .asn1_type = V_ASN1_OCTET_STRING, |
| 186 | .type = EXT_TYPE_HASH, |
| 187 | .optional = 1 |
| 188 | }, |
Juan Castillo | be80120 | 2015-12-03 10:19:21 +0000 | [diff] [blame] | 189 | [NON_TRUSTED_FW_CONTENT_CERT_PK_EXT] = { |
| 190 | .oid = NON_TRUSTED_FW_CONTENT_CERT_PK_OID, |
Juan Castillo | 11abdcd | 2014-10-21 11:30:42 +0100 | [diff] [blame] | 191 | .sn = "NonTrustedFirmwareContentCertPK", |
| 192 | .ln = "Non-Trusted Firmware content certificate public key", |
Juan Castillo | e6d30e9 | 2015-06-12 11:27:59 +0100 | [diff] [blame] | 193 | .asn1_type = V_ASN1_OCTET_STRING, |
| 194 | .type = EXT_TYPE_PKEY, |
Juan Castillo | 4352998 | 2016-01-22 11:05:24 +0000 | [diff] [blame] | 195 | .attr.key = NON_TRUSTED_FW_CONTENT_CERT_KEY |
Juan Castillo | 11abdcd | 2014-10-21 11:30:42 +0100 | [diff] [blame] | 196 | }, |
Juan Castillo | be80120 | 2015-12-03 10:19:21 +0000 | [diff] [blame] | 197 | [NON_TRUSTED_WORLD_BOOTLOADER_HASH_EXT] = { |
| 198 | .oid = NON_TRUSTED_WORLD_BOOTLOADER_HASH_OID, |
| 199 | .opt = "nt-fw", |
Juan Castillo | 212f738 | 2015-12-15 16:37:57 +0000 | [diff] [blame] | 200 | .help_msg = "Non-Trusted World Bootloader image file", |
Juan Castillo | 11abdcd | 2014-10-21 11:30:42 +0100 | [diff] [blame] | 201 | .sn = "NonTrustedWorldBootloaderHash", |
Juan Castillo | be80120 | 2015-12-03 10:19:21 +0000 | [diff] [blame] | 202 | .ln = "Non-Trusted World hash (SHA256)", |
Juan Castillo | e6d30e9 | 2015-06-12 11:27:59 +0100 | [diff] [blame] | 203 | .asn1_type = V_ASN1_OCTET_STRING, |
| 204 | .type = EXT_TYPE_HASH |
Yatharth Kochar | 5752b59 | 2015-08-21 15:30:55 +0100 | [diff] [blame] | 205 | }, |
Soby Mathew | 2bb78d3 | 2018-03-29 14:29:55 +0100 | [diff] [blame] | 206 | [NON_TRUSTED_FW_CONFIG_HASH_EXT] = { |
| 207 | .oid = NON_TRUSTED_FW_CONFIG_HASH_OID, |
| 208 | .opt = "nt-fw-config", |
| 209 | .help_msg = "Non Trusted OS Firmware Config file", |
| 210 | .sn = "NonTrustedOSFirmwareConfigHash", |
| 211 | .ln = "Non-Trusted OS Firmware Config hash", |
| 212 | .asn1_type = V_ASN1_OCTET_STRING, |
| 213 | .type = EXT_TYPE_HASH, |
| 214 | .optional = 1 |
| 215 | }, |
Manish Pandey | c70b4b4 | 2020-06-10 15:50:36 +0100 | [diff] [blame] | 216 | [SP_PKG1_HASH_EXT] = { |
| 217 | .oid = SP_PKG1_HASH_OID, |
| 218 | .opt = "sp-pkg1", |
| 219 | .help_msg = "Secure Partition Package1 file", |
| 220 | .sn = "SPPkg1Hash", |
| 221 | .ln = "SP Pkg1 hash (SHA256)", |
| 222 | .asn1_type = V_ASN1_OCTET_STRING, |
| 223 | .type = EXT_TYPE_HASH, |
| 224 | .optional = 1 |
| 225 | }, |
| 226 | [SP_PKG2_HASH_EXT] = { |
| 227 | .oid = SP_PKG2_HASH_OID, |
| 228 | .opt = "sp-pkg2", |
| 229 | .help_msg = "Secure Partition Package2 file", |
| 230 | .sn = "SPPkg2Hash", |
| 231 | .ln = "SP Pkg2 hash (SHA256)", |
| 232 | .asn1_type = V_ASN1_OCTET_STRING, |
| 233 | .type = EXT_TYPE_HASH, |
| 234 | .optional = 1 |
| 235 | }, |
| 236 | [SP_PKG3_HASH_EXT] = { |
| 237 | .oid = SP_PKG3_HASH_OID, |
| 238 | .opt = "sp-pkg3", |
| 239 | .help_msg = "Secure Partition Package3 file", |
| 240 | .sn = "SPPkg3Hash", |
| 241 | .ln = "SP Pkg3 hash (SHA256)", |
| 242 | .asn1_type = V_ASN1_OCTET_STRING, |
| 243 | .type = EXT_TYPE_HASH, |
| 244 | .optional = 1 |
| 245 | }, |
| 246 | [SP_PKG4_HASH_EXT] = { |
| 247 | .oid = SP_PKG4_HASH_OID, |
| 248 | .opt = "sp-pkg4", |
| 249 | .help_msg = "Secure Partition Package4 file", |
| 250 | .sn = "SPPkg4Hash", |
| 251 | .ln = "SP Pkg4 hash (SHA256)", |
| 252 | .asn1_type = V_ASN1_OCTET_STRING, |
| 253 | .type = EXT_TYPE_HASH, |
| 254 | .optional = 1 |
| 255 | }, |
| 256 | [SP_PKG5_HASH_EXT] = { |
| 257 | .oid = SP_PKG5_HASH_OID, |
| 258 | .opt = "sp-pkg5", |
| 259 | .help_msg = "Secure Partition Package5 file", |
| 260 | .sn = "SPPkg5Hash", |
| 261 | .ln = "SP Pkg5 hash (SHA256)", |
| 262 | .asn1_type = V_ASN1_OCTET_STRING, |
| 263 | .type = EXT_TYPE_HASH, |
| 264 | .optional = 1 |
| 265 | }, |
| 266 | [SP_PKG6_HASH_EXT] = { |
| 267 | .oid = SP_PKG6_HASH_OID, |
| 268 | .opt = "sp-pkg6", |
| 269 | .help_msg = "Secure Partition Package6 file", |
| 270 | .sn = "SPPkg6Hash", |
| 271 | .ln = "SP Pkg6 hash (SHA256)", |
| 272 | .asn1_type = V_ASN1_OCTET_STRING, |
| 273 | .type = EXT_TYPE_HASH, |
| 274 | .optional = 1 |
| 275 | }, |
| 276 | [SP_PKG7_HASH_EXT] = { |
| 277 | .oid = SP_PKG7_HASH_OID, |
| 278 | .opt = "sp-pkg7", |
| 279 | .help_msg = "Secure Partition Package7 file", |
| 280 | .sn = "SPPkg7Hash", |
| 281 | .ln = "SP Pkg7 hash (SHA256)", |
| 282 | .asn1_type = V_ASN1_OCTET_STRING, |
| 283 | .type = EXT_TYPE_HASH, |
| 284 | .optional = 1 |
| 285 | }, |
| 286 | [SP_PKG8_HASH_EXT] = { |
| 287 | .oid = SP_PKG8_HASH_OID, |
| 288 | .opt = "sp-pkg8", |
| 289 | .help_msg = "Secure Partition Package8 file", |
| 290 | .sn = "SPPkg8Hash", |
| 291 | .ln = "SP Pkg8 hash (SHA256)", |
| 292 | .asn1_type = V_ASN1_OCTET_STRING, |
| 293 | .type = EXT_TYPE_HASH, |
| 294 | .optional = 1 |
| 295 | }, |
Juan Castillo | be80120 | 2015-12-03 10:19:21 +0000 | [diff] [blame] | 296 | [SCP_FWU_CFG_HASH_EXT] = { |
| 297 | .oid = SCP_FWU_CFG_HASH_OID, |
| 298 | .opt = "scp-fwu-cfg", |
Juan Castillo | 212f738 | 2015-12-15 16:37:57 +0000 | [diff] [blame] | 299 | .help_msg = "SCP Firmware Update Config image file", |
Yatharth Kochar | 5752b59 | 2015-08-21 15:30:55 +0100 | [diff] [blame] | 300 | .sn = "SCPFWUpdateConfig", |
Juan Castillo | be80120 | 2015-12-03 10:19:21 +0000 | [diff] [blame] | 301 | .ln = "SCP Firmware Update Config hash (SHA256)", |
Yatharth Kochar | 5752b59 | 2015-08-21 15:30:55 +0100 | [diff] [blame] | 302 | .asn1_type = V_ASN1_OCTET_STRING, |
| 303 | .type = EXT_TYPE_HASH, |
| 304 | .optional = 1 |
| 305 | }, |
Juan Castillo | be80120 | 2015-12-03 10:19:21 +0000 | [diff] [blame] | 306 | [AP_FWU_CFG_HASH_EXT] = { |
| 307 | .oid = AP_FWU_CFG_HASH_OID, |
| 308 | .opt = "ap-fwu-cfg", |
Juan Castillo | 212f738 | 2015-12-15 16:37:57 +0000 | [diff] [blame] | 309 | .help_msg = "AP Firmware Update Config image file", |
Yatharth Kochar | 5752b59 | 2015-08-21 15:30:55 +0100 | [diff] [blame] | 310 | .sn = "APFWUpdateConfig", |
Juan Castillo | be80120 | 2015-12-03 10:19:21 +0000 | [diff] [blame] | 311 | .ln = "AP Firmware Update Config hash (SHA256)", |
Yatharth Kochar | 5752b59 | 2015-08-21 15:30:55 +0100 | [diff] [blame] | 312 | .asn1_type = V_ASN1_OCTET_STRING, |
| 313 | .type = EXT_TYPE_HASH, |
| 314 | .optional = 1 |
| 315 | }, |
Juan Castillo | be80120 | 2015-12-03 10:19:21 +0000 | [diff] [blame] | 316 | [FWU_HASH_EXT] = { |
| 317 | .oid = FWU_HASH_OID, |
| 318 | .opt = "fwu", |
Juan Castillo | 212f738 | 2015-12-15 16:37:57 +0000 | [diff] [blame] | 319 | .help_msg = "Firmware Updater image file", |
Yatharth Kochar | 5752b59 | 2015-08-21 15:30:55 +0100 | [diff] [blame] | 320 | .sn = "FWUpdaterHash", |
Juan Castillo | be80120 | 2015-12-03 10:19:21 +0000 | [diff] [blame] | 321 | .ln = "Firmware Updater hash (SHA256)", |
Yatharth Kochar | 5752b59 | 2015-08-21 15:30:55 +0100 | [diff] [blame] | 322 | .asn1_type = V_ASN1_OCTET_STRING, |
| 323 | .type = EXT_TYPE_HASH, |
| 324 | .optional = 1 |
Juan Castillo | e6d30e9 | 2015-06-12 11:27:59 +0100 | [diff] [blame] | 325 | } |
Juan Castillo | 11abdcd | 2014-10-21 11:30:42 +0100 | [diff] [blame] | 326 | }; |
Juan Castillo | e6d30e9 | 2015-06-12 11:27:59 +0100 | [diff] [blame] | 327 | |
| 328 | REGISTER_EXTENSIONS(tbb_ext); |