mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jan Luebbe <jlu@pengutronix.de>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: Jan Luebbe <jlu@pengutronix.de>,
	David Howells <dhowells@redhat.com>,
	David Woodhouse <dwmw2@infradead.org>,
	keyrings@vger.kernel.org, linux-kbuild@vger.kernel.org,
	linux-kernel@vger.kernel.org, kernel@pengutronix.de
Subject: [PATCH 1/2] certs: Fix build error when PKCS#11 URI contains semicolon
Date: Mon, 30 Jan 2023 15:15:52 +0100	[thread overview]
Message-ID: <20230130141553.3825449-2-jlu@pengutronix.de> (raw)
In-Reply-To: <20230130141553.3825449-1-jlu@pengutronix.de>

When CONFIG_MODULE_SIG_KEY is PKCS#11 URI (pkcs11:*) and contains a
semicolon, signing_key.x509 fails to build:

  certs/extract-cert pkcs11:token=foo;object=bar;pin-value=1111 certs/signing_key.x509
  Usage: extract-cert <source> <dest>

Add quotes to the PKCS11_URI variable to avoid splitting by the shell.

Fixes: 129ab0d2d9f3 ("kbuild: do not quote string values in include/config/auto.conf")
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
---
 certs/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/certs/Makefile b/certs/Makefile
index 9486ed924731..cda21811ed88 100644
--- a/certs/Makefile
+++ b/certs/Makefile
@@ -67,7 +67,7 @@ $(obj)/system_certificates.o: $(obj)/signing_key.x509
 
 PKCS11_URI := $(filter pkcs11:%, $(CONFIG_MODULE_SIG_KEY))
 ifdef PKCS11_URI
-$(obj)/signing_key.x509: extract-cert-in := $(PKCS11_URI)
+$(obj)/signing_key.x509: extract-cert-in := "$(PKCS11_URI)"
 endif
 
 $(obj)/signing_key.x509: $(filter-out $(PKCS11_URI),$(CONFIG_MODULE_SIG_KEY)) $(obj)/extract-cert FORCE
-- 
2.30.2


  reply	other threads:[~2023-01-30 14:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-30 14:15 [PATCH 0/2] Fix module signing with PKCS#11 URIs Jan Luebbe
2023-01-30 14:15 ` Jan Luebbe [this message]
2023-01-30 15:18   ` [PATCH 1/2] certs: Fix build error when PKCS#11 URI contains semicolon Masahiro Yamada
2023-01-30 16:43     ` Jan Lübbe
2023-01-30 17:21       ` Masahiro Yamada
2023-01-30 14:15 ` [PATCH 2/2] kbuild: modinst: Fix build error when CONFIG_MODULE_SIG_KEY is a PKCS#11 URI Jan Luebbe

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=20230130141553.3825449-2-jlu@pengutronix.de \
    --to=jlu@pengutronix.de \
    --cc=dhowells@redhat.com \
    --cc=dwmw2@infradead.org \
    --cc=kernel@pengutronix.de \
    --cc=keyrings@vger.kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.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

all inboxes | Powered by JetHome®