summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBastian Krause <bst@pengutronix.de>2020-05-15 16:26:28 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2020-05-15 17:22:06 +0200
commit6c024da4d92217c468983d4a8bd8c3e252d36af8 (patch)
treefce91dbc7dee62a35e897addd5b1abd4b9ca0304
parent943766bfdd12fefa509613f7055c6340cc26afa1 (diff)
downloadptxdist-6c024da4d92217c468983d4a8bd8c3e252d36af8.tar.gz
ptxdist-6c024da4d92217c468983d4a8bd8c3e252d36af8.tar.xz
ptxd_lib_code_signing: return error string in cs_get_uri for make error case
Signed-off-by: Bastian Krause <bst@pengutronix.de> Message-Id: <20200515142641.812-3-bst@pengutronix.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--scripts/lib/ptxd_lib_code_signing.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/lib/ptxd_lib_code_signing.sh b/scripts/lib/ptxd_lib_code_signing.sh
index 588a4b1b4..f93f183df 100644
--- a/scripts/lib/ptxd_lib_code_signing.sh
+++ b/scripts/lib/ptxd_lib_code_signing.sh
@@ -154,7 +154,11 @@ cs_get_uri() {
if [ ${#FUNCNAME[*]} -gt 1 ]; then
ptxd_bailout "No PKCS#11 URI for role ${role}"
else
- # ignore the error if cs_get_uri is called directly from make
+ # cs_get_uri was called directly from make prior to cs_set_uri,
+ # which may not be an error if it is evaluated early *and* later
+ # again - return a unique error string in case it is not expected
+ # and a user stumbles upon this
+ echo "ERROR_URI_NOT_YET_SET"
return
fi
fi