Commit 9b3ca9b1 authored by Manish V Badarkhe's avatar Manish V Badarkhe
Browse files

cert_tool: Update cert_tool for fw_config image support



Updated cert_tool to add hash information of fw_config image into
the existing "trusted boot fw" certificate.
Signed-off-by: default avatarManish V Badarkhe <Manish.Badarkhe@arm.com>
Change-Id: I720319225925806a2a9f50a1ac9c8a464be975f0
parent ce10f9f4
/* /*
* Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved. * Copyright (c) 2015-2020, ARM Limited and Contributors. All rights reserved.
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
#define TRUSTED_BOOT_FW_HASH_OID "1.3.6.1.4.1.4128.2100.201" #define TRUSTED_BOOT_FW_HASH_OID "1.3.6.1.4.1.4128.2100.201"
#define TRUSTED_BOOT_FW_CONFIG_HASH_OID "1.3.6.1.4.1.4128.2100.202" #define TRUSTED_BOOT_FW_CONFIG_HASH_OID "1.3.6.1.4.1.4128.2100.202"
#define HW_CONFIG_HASH_OID "1.3.6.1.4.1.4128.2100.203" #define HW_CONFIG_HASH_OID "1.3.6.1.4.1.4128.2100.203"
#define FW_CONFIG_HASH_OID "1.3.6.1.4.1.4128.2100.204"
/* /*
* Trusted Key Certificate * Trusted Key Certificate
......
...@@ -32,6 +32,7 @@ enum { ...@@ -32,6 +32,7 @@ enum {
TRUSTED_BOOT_FW_HASH_EXT, TRUSTED_BOOT_FW_HASH_EXT,
TRUSTED_BOOT_FW_CONFIG_HASH_EXT, TRUSTED_BOOT_FW_CONFIG_HASH_EXT,
HW_CONFIG_HASH_EXT, HW_CONFIG_HASH_EXT,
FW_CONFIG_HASH_EXT,
TRUSTED_WORLD_PK_EXT, TRUSTED_WORLD_PK_EXT,
SCP_FW_CONTENT_CERT_PK_EXT, SCP_FW_CONTENT_CERT_PK_EXT,
SCP_FW_HASH_EXT, SCP_FW_HASH_EXT,
......
/* /*
* Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved. * Copyright (c) 2015-2020, ARM Limited and Contributors. All rights reserved.
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
...@@ -15,6 +15,7 @@ enum { ...@@ -15,6 +15,7 @@ enum {
TRUSTED_BOOT_FW_HASH_EXT, TRUSTED_BOOT_FW_HASH_EXT,
TRUSTED_BOOT_FW_CONFIG_HASH_EXT, TRUSTED_BOOT_FW_CONFIG_HASH_EXT,
HW_CONFIG_HASH_EXT, HW_CONFIG_HASH_EXT,
FW_CONFIG_HASH_EXT,
TRUSTED_WORLD_PK_EXT, TRUSTED_WORLD_PK_EXT,
NON_TRUSTED_WORLD_PK_EXT, NON_TRUSTED_WORLD_PK_EXT,
SCP_FW_CONTENT_CERT_PK_EXT, SCP_FW_CONTENT_CERT_PK_EXT,
......
...@@ -30,9 +30,10 @@ static cert_t cot_certs[] = { ...@@ -30,9 +30,10 @@ static cert_t cot_certs[] = {
TRUSTED_FW_NVCOUNTER_EXT, TRUSTED_FW_NVCOUNTER_EXT,
TRUSTED_BOOT_FW_HASH_EXT, TRUSTED_BOOT_FW_HASH_EXT,
TRUSTED_BOOT_FW_CONFIG_HASH_EXT, TRUSTED_BOOT_FW_CONFIG_HASH_EXT,
HW_CONFIG_HASH_EXT HW_CONFIG_HASH_EXT,
FW_CONFIG_HASH_EXT
}, },
.num_ext = 4 .num_ext = 5
}, },
[TRUSTED_KEY_CERT] = { [TRUSTED_KEY_CERT] = {
...@@ -239,6 +240,17 @@ static ext_t cot_ext[] = { ...@@ -239,6 +240,17 @@ static ext_t cot_ext[] = {
.optional = 1 .optional = 1
}, },
[FW_CONFIG_HASH_EXT] = {
.oid = FW_CONFIG_HASH_OID,
.opt = "fw-config",
.help_msg = "Firmware Config file",
.sn = "FirmwareConfigHash",
.ln = "Firmware Config hash",
.asn1_type = V_ASN1_OCTET_STRING,
.type = EXT_TYPE_HASH,
.optional = 1
},
[TRUSTED_WORLD_PK_EXT] = { [TRUSTED_WORLD_PK_EXT] = {
.oid = TRUSTED_WORLD_PK_OID, .oid = TRUSTED_WORLD_PK_OID,
.sn = "TrustedWorldPublicKey", .sn = "TrustedWorldPublicKey",
......
/* /*
* Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved. * Copyright (c) 2015-2020, ARM Limited and Contributors. All rights reserved.
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
...@@ -28,9 +28,10 @@ static cert_t tbb_certs[] = { ...@@ -28,9 +28,10 @@ static cert_t tbb_certs[] = {
TRUSTED_FW_NVCOUNTER_EXT, TRUSTED_FW_NVCOUNTER_EXT,
TRUSTED_BOOT_FW_HASH_EXT, TRUSTED_BOOT_FW_HASH_EXT,
TRUSTED_BOOT_FW_CONFIG_HASH_EXT, TRUSTED_BOOT_FW_CONFIG_HASH_EXT,
HW_CONFIG_HASH_EXT HW_CONFIG_HASH_EXT,
FW_CONFIG_HASH_EXT
}, },
.num_ext = 4 .num_ext = 5
}, },
[TRUSTED_KEY_CERT] = { [TRUSTED_KEY_CERT] = {
.id = TRUSTED_KEY_CERT, .id = TRUSTED_KEY_CERT,
......
/* /*
* Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved. * Copyright (c) 2015-2020, ARM Limited and Contributors. All rights reserved.
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
...@@ -69,6 +69,16 @@ static ext_t tbb_ext[] = { ...@@ -69,6 +69,16 @@ static ext_t tbb_ext[] = {
.type = EXT_TYPE_HASH, .type = EXT_TYPE_HASH,
.optional = 1 .optional = 1
}, },
[FW_CONFIG_HASH_EXT] = {
.oid = FW_CONFIG_HASH_OID,
.opt = "fw-config",
.help_msg = "Firmware Config file",
.sn = "FirmwareConfigHash",
.ln = "Firmware Config hash",
.asn1_type = V_ASN1_OCTET_STRING,
.type = EXT_TYPE_HASH,
.optional = 1
},
[TRUSTED_WORLD_PK_EXT] = { [TRUSTED_WORLD_PK_EXT] = {
.oid = TRUSTED_WORLD_PK_OID, .oid = TRUSTED_WORLD_PK_OID,
.sn = "TrustedWorldPublicKey", .sn = "TrustedWorldPublicKey",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment