TF-A: v2.6-stm32mp1-r1
Signed-off-by: Christophe Priouzeau <christophe.priouzeau@foss.st.com> Change-Id: I23dff9a9a33a1094bfcf01c2fa8e555f349d0782
This commit is contained in:
1 parent
10b737d31d
commit
4e63a23ff6
14 files changed
+55773
-46241
No files matched your search
+21
-49
@@ -1,4 +1,4 @@
|
||||
From a1a1376cd1cc5ef232258e3302596f6a2fb9b8e4 Mon Sep 17 00:00:00 2001
|
||||
From 63e10c11b0fb33e0343d6ffc81fd214e81903f36 Mon Sep 17 00:00:00 2001
|
||||
From: Lionel Debieve <lionel.debieve@st.com>
|
||||
Date: Tue, 19 Jan 2021 15:40:36 +0100
|
||||
Subject: [PATCH] tools: allow to use a root key password from command line
|
||||
@@ -9,24 +9,17 @@ root key password. Useful for build system management.
|
||||
Signed-off-by: Lionel Debieve <lionel.debieve@st.com>
|
||||
Change-Id: Ie692c5c6db5ddb093ca7659d80f6137a978aa7bf
|
||||
---
|
||||
make_helpers/tbbr/tbbr_tools.mk | 4 +++-
|
||||
tools/cert_create/include/key.h | 4 ++--
|
||||
tools/cert_create/src/key.c | 6 +++---
|
||||
tools/cert_create/src/main.c | 18 ++++++++++++++----
|
||||
4 files changed, 22 insertions(+), 10 deletions(-)
|
||||
make_helpers/tbbr/tbbr_tools.mk | 2 ++
|
||||
tools/cert_create/include/key.h | 2 +-
|
||||
tools/cert_create/src/key.c | 4 ++--
|
||||
tools/cert_create/src/main.c | 16 +++++++++++++---
|
||||
4 files changed, 18 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/make_helpers/tbbr/tbbr_tools.mk b/make_helpers/tbbr/tbbr_tools.mk
|
||||
index 853ad11bef..0aab592228 100644
|
||||
index 0a280b4ed..226d460f1 100644
|
||||
--- a/make_helpers/tbbr/tbbr_tools.mk
|
||||
+++ b/make_helpers/tbbr/tbbr_tools.mk
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
-# Copyright (c) 2015-2020, ARM Limited and Contributors. All rights reserved.
|
||||
+# Copyright (c) 2015-2021, ARM Limited and Contributors. All rights reserved.
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
@@ -24,6 +24,7 @@
|
||||
@@ -25,6 +25,7 @@
|
||||
# KEY_SIZE
|
||||
# ROT_KEY
|
||||
# PROT_KEY
|
||||
@@ -34,7 +27,7 @@ index 853ad11bef..0aab592228 100644
|
||||
# TRUSTED_WORLD_KEY
|
||||
# NON_TRUSTED_WORLD_KEY
|
||||
# SCP_BL2_KEY
|
||||
@@ -62,6 +63,7 @@ $(if ${HASH_ALG},$(eval $(call CERT_ADD_CMD_OPT,${HASH_ALG},--hash-alg,FWU_)))
|
||||
@@ -63,6 +64,7 @@ $(if ${HASH_ALG},$(eval $(call CERT_ADD_CMD_OPT,${HASH_ALG},--hash-alg,FWU_)))
|
||||
$(if ${ROT_KEY},$(eval $(call CERT_ADD_CMD_OPT,${ROT_KEY},--rot-key)))
|
||||
$(if ${ROT_KEY},$(eval $(call CERT_ADD_CMD_OPT,${ROT_KEY},--rot-key,FWU_)))
|
||||
$(if ${PROT_KEY},$(eval $(call CERT_ADD_CMD_OPT,${PROT_KEY},--prot-key)))
|
||||
@@ -43,17 +36,10 @@ index 853ad11bef..0aab592228 100644
|
||||
$(if ${NON_TRUSTED_WORLD_KEY},$(eval $(call CERT_ADD_CMD_OPT,${NON_TRUSTED_WORLD_KEY},--non-trusted-world-key)))
|
||||
|
||||
diff --git a/tools/cert_create/include/key.h b/tools/cert_create/include/key.h
|
||||
index 3409502d82..1a03201560 100644
|
||||
index 128e7f7b4..5860abb4e 100644
|
||||
--- a/tools/cert_create/include/key.h
|
||||
+++ b/tools/cert_create/include/key.h
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
- * Copyright (c) 2015-2019, ARM Limited and Contributors. All rights reserved.
|
||||
+ * Copyright (c) 2015-2021, ARM Limited and Contributors. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
@@ -70,7 +70,7 @@ int key_init(void);
|
||||
@@ -68,7 +68,7 @@ int key_init(void);
|
||||
key_t *key_get_by_opt(const char *opt);
|
||||
int key_new(key_t *key);
|
||||
int key_create(key_t *key, int type, int key_bits);
|
||||
@@ -63,17 +49,10 @@ index 3409502d82..1a03201560 100644
|
||||
|
||||
/* Macro to register the keys used in the CoT */
|
||||
diff --git a/tools/cert_create/src/key.c b/tools/cert_create/src/key.c
|
||||
index 25d7d4bd9b..9ba5028af7 100644
|
||||
index 64359756f..e2a1a4541 100644
|
||||
--- a/tools/cert_create/src/key.c
|
||||
+++ b/tools/cert_create/src/key.c
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
- * Copyright (c) 2015-2020, ARM Limited and Contributors. All rights reserved.
|
||||
+ * Copyright (c) 2015-2021, ARM Limited and Contributors. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
@@ -137,7 +137,7 @@ int key_create(key_t *key, int type, int key_bits)
|
||||
@@ -128,7 +128,7 @@ int key_create(key_t *key, int type, int key_bits)
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -82,7 +61,7 @@ index 25d7d4bd9b..9ba5028af7 100644
|
||||
{
|
||||
FILE *fp;
|
||||
EVP_PKEY *k;
|
||||
@@ -146,7 +146,7 @@ int key_load(key_t *key, unsigned int *err_code)
|
||||
@@ -137,7 +137,7 @@ int key_load(key_t *key, unsigned int *err_code)
|
||||
/* Load key from file */
|
||||
fp = fopen(key->fn, "r");
|
||||
if (fp) {
|
||||
@@ -92,17 +71,10 @@ index 25d7d4bd9b..9ba5028af7 100644
|
||||
if (k) {
|
||||
*err_code = KEY_ERR_NONE;
|
||||
diff --git a/tools/cert_create/src/main.c b/tools/cert_create/src/main.c
|
||||
index 8a1e02e62f..e79e72745b 100644
|
||||
index b39378ca9..71bf85722 100644
|
||||
--- a/tools/cert_create/src/main.c
|
||||
+++ b/tools/cert_create/src/main.c
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
- * Copyright (c) 2015-2020, ARM Limited and Contributors. All rights reserved.
|
||||
+ * Copyright (c) 2015-2021, ARM Limited and Contributors. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
@@ -289,7 +289,12 @@ static const cmd_opt_t common_cmd_opt[] = {
|
||||
@@ -288,7 +288,12 @@ static const cmd_opt_t common_cmd_opt[] = {
|
||||
{
|
||||
{ "print-cert", no_argument, NULL, 'p' },
|
||||
"Print the certificates in the standard output"
|
||||
@@ -116,7 +88,7 @@ index 8a1e02e62f..e79e72745b 100644
|
||||
};
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
@@ -308,6 +313,7 @@ int main(int argc, char *argv[])
|
||||
@@ -307,6 +312,7 @@ int main(int argc, char *argv[])
|
||||
unsigned char md[SHA512_DIGEST_LENGTH];
|
||||
unsigned int md_len;
|
||||
const EVP_MD *md_info;
|
||||
@@ -124,7 +96,7 @@ index 8a1e02e62f..e79e72745b 100644
|
||||
|
||||
NOTICE("CoT Generation Tool: %s\n", build_msg);
|
||||
NOTICE("Target platform: %s\n", platform_msg);
|
||||
@@ -345,7 +351,7 @@ int main(int argc, char *argv[])
|
||||
@@ -344,7 +350,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
while (1) {
|
||||
/* getopt_long stores the option index here. */
|
||||
@@ -133,7 +105,7 @@ index 8a1e02e62f..e79e72745b 100644
|
||||
|
||||
/* Detect the end of the options. */
|
||||
if (c == -1) {
|
||||
@@ -379,6 +385,10 @@ int main(int argc, char *argv[])
|
||||
@@ -378,6 +384,10 @@ int main(int argc, char *argv[])
|
||||
case 'p':
|
||||
print_cert = 1;
|
||||
break;
|
||||
@@ -144,7 +116,7 @@ index 8a1e02e62f..e79e72745b 100644
|
||||
case 's':
|
||||
hash_alg = get_hash_alg(optarg);
|
||||
if (hash_alg < 0) {
|
||||
@@ -437,7 +447,7 @@ int main(int argc, char *argv[])
|
||||
@@ -436,7 +446,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
/* First try to load the key from disk */
|
||||
@@ -154,5 +126,5 @@ index 8a1e02e62f..e79e72745b 100644
|
||||
continue;
|
||||
}
|
||||
--
|
||||
2.17.1
|
||||
2.25.1
|
||||
|
||||
Reference in new issue
Block a user