From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: keyrings@vger.kernel.org
Subject: Re: [PATCH] support other engines for module signing
Date: Wed, 17 Oct 2018 16:41:58 +0000 [thread overview]
Message-ID: <1539794518.3769.47.camel@HansenPartnership.com> (raw)
In-Reply-To: <alpine.LFD.2.21.1810171142300.20697@hatman>
[-- Attachment #1: Type: text/plain, Size: 1783 bytes --]
On Wed, 2018-10-17 at 08:48 -0700, David Woodhouse wrote:
> On Wed, 2018-10-17 at 08:28 -0700, James Bottomley wrote:
> > On Wed, 2018-10-17 at 08:18 -0700, David Woodhouse wrote:
> > > It looks just like yours. It uses the UI callbacks, but you can
> > > bypass those by providing the password in advance with an
> > > ENGINE_ctrl
> > > if you want.
> >
> > Are we talking about the same thing? This is the current RH code:
>
> Why are you calling this "RH code"? What does Red Hat have to do with
> it? This is code in the upstream kernel, that I added (IIRC).
At the time it was added, RH was the only company doing pkcs11 based
module signing, so I assumed it was a RH token.
> > ENGINE *e;
> >
> > e = ENGINE_by_id("pkcs11");
> > ERR(!e, "Load PKCS#11 ENGINE");
> > if (ENGINE_init(e))
> > ERR_clear_error();
> > else
> > ERR(1, "ENGINE_init");
> > if (key_pass)
> > ERR(!ENGINE_ctrl_cmd_string(e, "PIN", key_pass,
> > 0),
> > "Set PKCS#11 PIN");
> > private_key = ENGINE_load_private_key(e,
> > private_key_name,
> > NULL, NULL);
> > ERR(!private_key, "%s", private_key_name);
> >
> > It uses an engine control command to load the key password not a
> > UI.
>
> James, that "PIN" ENGINE_ctrl is basically identical to what we need
> to do with your TPM2 engine to provide a parent key password (which
> your engine currently can't use a UI for ☹). It's hardly a strange
> and unusual concept.
OK, but this isn't the parent it's the key password, so what I think
you're saying is that all pkcs11 tokens can take either engine ctrl PIN
or a UI method to provide the password, so I can proceed with folding
the pkcs11 case into the UI engine path. That's what I'll do.
James
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2018-10-17 16:41 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-17 10:43 [PATCH] support other engines for module signing Mark J Cox
2018-10-17 13:26 ` David Woodhouse
2018-10-17 14:34 ` James Bottomley
2018-10-17 14:40 ` David Howells
2018-10-17 14:43 ` James Bottomley
2018-10-17 15:05 ` David Woodhouse
2018-10-17 15:10 ` James Bottomley
2018-10-17 15:18 ` David Woodhouse
2018-10-17 15:28 ` James Bottomley
2018-10-17 15:48 ` David Woodhouse
2018-10-17 16:03 ` David Woodhouse
2018-10-17 16:41 ` James Bottomley [this message]
2018-10-17 17:04 ` David Woodhouse
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=1539794518.3769.47.camel@HansenPartnership.com \
--to=james.bottomley@hansenpartnership.com \
--cc=keyrings@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.