From: Sascha Hauer <s.hauer@pengutronix.de>
To: BAREBOX <barebox@lists.infradead.org>
Subject: [PATCH 4/6] k3img: handle PKCS#11 uris
Date: Thu, 14 Aug 2025 12:46:52 +0200 [thread overview]
Message-ID: <20250814-k3-am62l-updates-v1-4-9934277d8757@pengutronix.de> (raw)
In-Reply-To: <20250814-k3-am62l-updates-v1-0-9934277d8757@pengutronix.de>
In case the keys passed to k3img are PKCS#11 uris we have to set the
keyform/engine options for openssl.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
scripts/k3img | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/scripts/k3img b/scripts/k3img
index 4242c505d07513d915797a9b68faae9310506a0c..bd86a437898de7c3980b61bceffbd973d6b9f3d8 100755
--- a/scripts/k3img
+++ b/scripts/k3img
@@ -143,6 +143,10 @@ EndOfHereDocument
cat $ext_boot_info $components >> $certcfg
-openssl req -new -x509 -key $key -nodes -outform DER -out $cert -config $certcfg -sha512
+case $key in pkcs11:*)
+ PKCS11OPTS="-engine pkcs11 -keyform engine"
+esac
+
+openssl req ${PKCS11OPTS} -new -x509 -key "${key}" -nodes -outform DER -out "${cert}" -config "${certcfg}" -sha512
cat $cert $data > $out
--
2.39.5
next prev parent reply other threads:[~2025-08-14 13:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-14 10:46 [PATCH 0/6] ARM: k3: updates Sascha Hauer
2025-08-14 10:46 ` [PATCH 1/6] ARM: k3: AM62l3-EVM: add usb0 Sascha Hauer
2025-08-14 10:46 ` [PATCH 2/6] ARM: k3: quote PEM files Sascha Hauer
2025-08-14 10:46 ` [PATCH 3/6] ARM: k3: allow to pass custom signing keys Sascha Hauer
2025-08-14 10:46 ` Sascha Hauer [this message]
2025-08-14 10:46 ` [PATCH 5/6] ARM: K3: Update yaml files for AM62L Sascha Hauer
2025-08-14 10:46 ` [PATCH 6/6] ARM: k3: use newer ti-linux-firmware Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250814-k3-am62l-updates-v1-4-9934277d8757@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox