mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Michael Olbrich <m.olbrich@pengutronix.de>
Cc: ptxdist@pengutronix.de, Roland Hieber <rhi@pengutronix.de>
Subject: Re: [ptxdist] [PATCH v3 1/5] ptxd_lib_code_signing: cs_get_ca(): improve error handling
Date: Mon, 12 Jul 2021 10:42:47 +0200	[thread overview]
Message-ID: <20210712084247.zvazdqqsffzjotwt@pengutronix.de> (raw)
In-Reply-To: <20210709133600.GB375046@pengutronix.de>


[-- Attachment #1.1: Type: text/plain, Size: 1348 bytes --]

On 09.07.2021 15:36:00, Michael Olbrich wrote:
> So this is not what we want here. Sorry, I didn't notice this in the last
> version. The idea is this:
> 
> If the keydir does not exist, then cs_get_ca)() was evaluated too early. So
> the check above should be added as it is here.
> What's now missing is what Marc originally intended and was part of the
> first version of the patch:
> If the keydir exists but no CA, then there will never be a CA and we want
> to match that. So this should be there as well:
> 
>     if [ -e "${ca}" ]; then
> 	echo "${ca}"
>     fi
> 
> instead of this:
> 
> > +    echo "${ca}"
> 
> Now we can do $(if $(shell cs_get_ca ...), ...) to do something only if the
> CA exists.
> 
> Marc, that was the use-case, right?

ACK, the use case is:

| KERNEL_SIGN_OPT = \
|         CONFIG_MODULE_SIG_KEY='"$(shell cs_get_uri evm)"' \
|         CONFIG_MODULE_SIG_ALL=y \
|         $(if $(shell cs_get_ca kernel-trusted), \
|                 CONFIG_SYSTEM_TRUSTED_KEYS=$(shell cs_get_ca kernel-trusted))

regards,
Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 181 bytes --]

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

  reply	other threads:[~2021-07-12  8:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-08 20:39 Roland Hieber
2021-07-08 20:39 ` [ptxdist] [PATCH v3 2/5] ptxd_lib_code_signing: introduce role groups Roland Hieber
2021-07-20 11:48   ` [ptxdist] [APPLIED] " Michael Olbrich
2021-07-08 20:39 ` [ptxdist] [PATCH v3 3/5] templates/code-signing-provider: set up the 'imx-habv4-srk' role group Roland Hieber
2021-07-20 11:48   ` [ptxdist] [APPLIED] " Michael Olbrich
2021-07-08 20:39 ` [ptxdist] [PATCH v3 4/5] templates/barebox-imx-habv4: use " Roland Hieber
2021-07-20 11:48   ` [ptxdist] [APPLIED] " Michael Olbrich
2021-07-08 20:39 ` [ptxdist] [PATCH v3 5/5] host-ptx-code-signing-dev: version bump 0.4 -> 0.5 Roland Hieber
2021-07-20 11:48   ` [ptxdist] [APPLIED] " Michael Olbrich
2021-07-09 13:36 ` [ptxdist] [PATCH v3 1/5] ptxd_lib_code_signing: cs_get_ca(): improve error handling Michael Olbrich
2021-07-12  8:42   ` Marc Kleine-Budde [this message]
2021-07-13 11:51     ` [ptxdist] [PATCH v4] " Roland Hieber
2021-07-14  6:21       ` Michael Olbrich
2021-07-15 13:42         ` [ptxdist] [PATCH v5] " Roland Hieber
2021-07-20 11:49           ` [ptxdist] [APPLIED] " Michael Olbrich

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=20210712084247.zvazdqqsffzjotwt@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=m.olbrich@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    --cc=rhi@pengutronix.de \
    --subject='Re: [ptxdist] [PATCH v3 1/5] ptxd_lib_code_signing: cs_get_ca(): improve error handling' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox