From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: From: Bastian Krause Date: Fri, 15 May 2020 16:26:28 +0200 Message-Id: <20200515142641.812-3-bst@pengutronix.de> In-Reply-To: <20200515142641.812-1-bst@pengutronix.de> References: <20200515142641.812-1-bst@pengutronix.de> MIME-Version: 1.0 Subject: [ptxdist] [PATCH v2 02/15] ptxd_lib_code_signing: return error string in cs_get_uri for make error case List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.de Cc: Bastian Krause Signed-off-by: Bastian Krause --- scripts/lib/ptxd_lib_code_signing.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- 2.26.2 _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de