mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Michael Grzeschik <m.grzeschik@pengutronix.de>
To: Sascha Hauer <s.hauer@pengutronix.de>,
	 BAREBOX <barebox@lists.infradead.org>
Subject: [PATCH] crypto: keytoc: fix env parsing after keyring support
Date: Fri, 28 Nov 2025 09:22:01 +0100	[thread overview]
Message-ID: <20251128-keytoc-v1-1-5540f8543f32@pengutronix.de> (raw)

Since the support for keyrings was added for keytoc the parsing of
pkcs11 keydescriptions that are set from environment variables is
broken. Fix this by adding the necessary try_resolve_env call before
working with the key description.

Fixes: 9b6abf4928 ("crypto: Add support for keyrings")
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
---
 scripts/keytoc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/keytoc.c b/scripts/keytoc.c
index ade924298a3169c6ac52b781deac94f706a14203..77ada3af451983722f40e5bb40f8e2789884a898 100644
--- a/scripts/keytoc.c
+++ b/scripts/keytoc.c
@@ -856,7 +856,7 @@ int main(int argc, char *argv[])
 	keylist = calloc(sizeof(struct keyinfo), keycount);
 
 	for (i = 0; i < keycount; i++) {
-		const char *keyspec = argv[optind + i];
+		const char *keyspec = try_resolve_env(argv[optind + i]);
 		struct keyinfo *info = &keylist[i];
 
 		if (!keyspec)

---
base-commit: 5d89bec4985d850d59813e34c6b5213d8e8f48f0
change-id: 20251128-keytoc-aaade89fe842

Best regards,
-- 
Michael Grzeschik <m.grzeschik@pengutronix.de>




             reply	other threads:[~2025-11-28  8:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-28  8:22 Michael Grzeschik [this message]
2025-11-28 13:41 ` Jonas Rebmann
2025-12-01 10:14 ` 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=20251128-keytoc-v1-1-5540f8543f32@pengutronix.de \
    --to=m.grzeschik@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /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