From 5b23f09622619b243a697b91370ea9dc420f3269 Mon Sep 17 00:00:00 2001 From: Gonzalo Ruiz Date: Thu, 28 May 2020 09:51:16 +0200 Subject: [PATCH] trustfence-sign-artifact: verify CONFIG_SIGN_MODE argument is set If CONFIG_SIGN_MODE is unset, we were assuming the sign mode to be AHAB whereas it is preferable to abort the signing process and notify with an error message. https://jira.digi.com/browse/DEL-7024 Signed-off-by: Gonzalo Ruiz --- .../trustfence-sign-tools/trustfence-sign-artifact.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools/trustfence-sign-artifact.sh b/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools/trustfence-sign-artifact.sh index 98b8db448..1c9822bbe 100755 --- a/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools/trustfence-sign-artifact.sh +++ b/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools/trustfence-sign-artifact.sh @@ -83,6 +83,10 @@ if [ -z "${CONFIG_SIGN_KEYS_PATH}" ]; then exit 1 fi [ -d "${CONFIG_SIGN_KEYS_PATH}" ] || mkdir "${CONFIG_SIGN_KEYS_PATH}" +if [ -z "${CONFIG_SIGN_MODE}" ]; then + echo "Undefined CONFIG_SIGN_MODE"; + exit 1 +fi if [ "${CONFIG_SIGN_MODE}" = "HAB" ]; then if [ -n "${CONFIG_DEK_PATH}" ]; then