cryptenroll: Implement support for unlocking via FIDO2 tokens
authorPeter Cai <peter@typeblog.net>
Sun, 18 Dec 2022 01:33:05 +0000 (20:33 -0500)
committerPeter Cai <peter@typeblog.net>
Thu, 22 Dec 2022 22:33:25 +0000 (17:33 -0500)
commit48765191d295aefe902205f4a9eb0f6dd12fe99d
tree2ee58588271825de87f0d77037876d6819beedc5
parent52105bb4870e9b0728a185275fe001d69ff6b92c
cryptenroll: Implement support for unlocking via FIDO2 tokens

This allows FIDO2 users to wipe out password slots and still be able to
enroll new key slots via systemd-cryptenroll. Note that when the user
wants to both unlock with a FIDO2 token and enroll a new FIDO2 token,
they cannot be set to automatic discovery. This is to safeguard against
confusion, because there will be multiple tokens connected to the system
when doing so -- and we require users to explicitly confirm which one to
use for unlocking and which one to use for enrollment.

Addresses #20230 for the FIDO2 case.
src/cryptenroll/cryptenroll-fido2.c
src/cryptenroll/cryptenroll-fido2.h
src/cryptenroll/cryptenroll-password.c
src/cryptenroll/cryptenroll-password.h
src/cryptenroll/cryptenroll.c
src/cryptenroll/cryptenroll.h