]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
openssl-util: Query engine/provider pin via ask-password (#34948)
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Sun, 3 Nov 2024 11:54:20 +0000 (12:54 +0100)
committerGitHub <noreply@github.com>
Sun, 3 Nov 2024 11:54:20 +0000 (12:54 +0100)
In mkosi, we want to support signing via a hardware token. We already
support this in systemd-repart and systemd-measure. However, if the
hardware token is protected by a pin, the pin is asked as many as 20
times when building an image as the pin is not cached and thus requested
again for every operation.

Let's introduce a custom openssl ui when we use engines and providers
and plug systemd-ask-password into the process. With
systemd-ask-password, the pin can be cached in the kernel keyring,
allowing us to reuse it without querying the user again every time to
enter the pin.

We use the private key URI as the keyring identifier so that the cached
pin can be shared across multiple tools.


Trivial merge