libfido2-util: Perform pre-flight check for credentials in token
authorMkfsSion <mkfssion@mkfssion.com>
Sat, 29 Oct 2022 18:29:02 +0000 (14:29 -0400)
committerPeter Cai <peter@typeblog.net>
Fri, 11 Nov 2022 23:51:07 +0000 (18:51 -0500)
commit32f57b098636412028ff302d3166bc3713e20e8e
tree9798e4df39ac31d1017a5e32b038a92badc7a1ac
parent15203f77a91bccd89b309bde48bf9cc456246df3
libfido2-util: Perform pre-flight check for credentials in token

Do not attempt to decrypt using a key slot unless its corresponding
credential is found on an available FIDO2 token. Avoids multiple touches
/ confirmations when unlocking a LUKS2 device with multiple FIDO2 tokens
enrolled.

Partially fixes #19208 (when the libcryptsetup plugin is in use).
src/shared/libfido2-util.c