From 904464c313483984f241adc8146cd8ae237c52e2 Mon Sep 17 00:00:00 2001 From: David Escalona Date: Thu, 14 Sep 2023 14:21:55 +0200 Subject: [PATCH] trustfence: fix function that copies public key Bitbake was always copying the public key 1 to the rootfs, no matter what the value specified in the 'TRUSTFENCE_KEY_INDEX' variable was. This commit fixes the issue by enclosing the variable between curly braces so that bitbake is able to expand it and calculate the correct key index. Signed-off-by: David Escalona --- meta-digi-dey/classes/trustfence.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-digi-dey/classes/trustfence.bbclass b/meta-digi-dey/classes/trustfence.bbclass index 35597ecd8..ad405042b 100644 --- a/meta-digi-dey/classes/trustfence.bbclass +++ b/meta-digi-dey/classes/trustfence.bbclass @@ -71,7 +71,7 @@ check_gen_pki_tree() { copy_public_key() { if [ "${DEY_SOC_VENDOR}" = "NXP" ]; then - KEY_INDEX="$(expr $TRUSTFENCE_KEY_INDEX + 1)" + KEY_INDEX="$(expr ${TRUSTFENCE_KEY_INDEX} + 1)" PUBLIC_KEY="${TRUSTFENCE_SIGN_KEYS_PATH}/crts/key${KEY_INDEX}.pub" # The new hab/ahab_pki_tree.sh script extracts the public keys after the PKI # generation and leaves them in the crts/ folder. However, the PKI tree may