diff mbox series

[2/2] fitimage: strip pkcs11: prefix in FITIMAGE_SIGN_KEYDIR example

Message ID 20260908112243.1085856-2-f.pflug@pengutronix.de
State New
Headers show
Series [1/2] fitimage: add support for specifying FITIMAGE_CONFIG_FDTO_PREFIX | expand

Commit Message

Fabian Pflug Sept. 8, 2026, 11:22 a.m. UTC
From: Ahmad Fatoum <a.fatoum@pengutronix.de>

Following the example in the comment as-is will lead to an error at
do_fitimage time:

  The key ID is not a valid PKCS#11 URI
  The PKCS#11 URI format is defined by RFC7512
  The key ID is not a valid PKCS#11 URI
  The PKCS#11 URI format is defined by RFC7512
  PKCS11_get_private_key returned NULL
  Failure loading private key from engine: error:40000064:pkcs11 engine::invalid id
  uboot-mkimage Can't add hashes to FIT blob: -1

Strip the pkcs11: prefix to resolve this and save future users the
hassle.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Fabian Pflug <f.pflug@pengutronix.de>
---
 meta-oe/classes/fitimage.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta-oe/classes/fitimage.bbclass b/meta-oe/classes/fitimage.bbclass
index adcfec0f0e..109b3b421b 100644
--- a/meta-oe/classes/fitimage.bbclass
+++ b/meta-oe/classes/fitimage.bbclass
@@ -62,7 +62,7 @@ 
 #
 #    FITIMAGE_SIGN = "1"
 #    FITIMAGE_MKIMAGE_EXTRA_ARGS = "--engine pkcs11"
-#    FITIMAGE_SIGN_KEYDIR = "${PKCS11_URI}"
+#    FITIMAGE_SIGN_KEYDIR = "${PKCS11_URI#pkcs11:}"
 
 
 LICENSE ?= "MIT"