From a8809e68c736c1e37afea41217e2170d57916778 Mon Sep 17 00:00:00 2001 From: Arturo Buzarra Date: Tue, 29 Aug 2023 08:47:02 +0200 Subject: [PATCH] trustfence: stm: fix PKI generation for CCMP13 platform The KeyGen tool to generate 8 key pairs requires 8 consecutive passwords, however, when the shell expands the passwords variable, it interprets it as a single string instead of 8 different strings and fails. Signed-off-by: Arturo Buzarra --- .../trustfence-sign-tools/trustfence-gen-pki-stm.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools/trustfence-gen-pki-stm.sh b/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools/trustfence-gen-pki-stm.sh index fed978035..34fe237d0 100755 --- a/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools/trustfence-gen-pki-stm.sh +++ b/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools/trustfence-gen-pki-stm.sh @@ -64,7 +64,7 @@ if [ "${PLATFORM}" = "ccmp15" ]; then # Random password password="$(openssl rand -base64 32)" echo "Generating random key" - STM32MP_KeyGen_CLI -abs "${CONFIG_SIGN_KEYS_PATH}/keys/" -pwd "${password}" -n 1 + STM32MP_KeyGen_CLI -abs "${CONFIG_SIGN_KEYS_PATH}/keys/" -pwd ${password} -n 1 echo "${password}" > "${KEY_PASS_FILE}" fi elif [ "${PLATFORM}" = "ccmp13" ]; then @@ -76,7 +76,7 @@ elif [ "${PLATFORM}" = "ccmp13" ]; then passwords="${passwords} $(openssl rand -base64 32)" done echo "Generating random keys" - STM32MP_KeyGen_CLI -abs "${CONFIG_SIGN_KEYS_PATH}/keys/" -pwd "${passwords}" -n 8 + STM32MP_KeyGen_CLI -abs "${CONFIG_SIGN_KEYS_PATH}/keys/" -pwd ${passwords} -n 8 echo "${passwords}" > "${KEY_PASS_FILE}" fi else