summaryrefslogtreecommitdiffstats
path: root/src/cryptenroll/cryptenroll-fido2.c
diff options
context:
space:
mode:
authorMkfsSion <mkfssion@mkfssion.com>2022-04-17 09:42:49 +0200
committerLennart Poettering <lennart@poettering.net>2022-04-22 20:22:40 +0200
commit70e723c000e46e2304e54f8063572d7fa0cdad46 (patch)
tree462cd67a414dc0bce495d01f405ddbe60c0731fa /src/cryptenroll/cryptenroll-fido2.c
parenthwdb: Fix rotation for HP Pro Tablet 408 G1 (diff)
downloadsystemd-70e723c000e46e2304e54f8063572d7fa0cdad46.tar.xz
systemd-70e723c000e46e2304e54f8063572d7fa0cdad46.zip
cryptenroll,homectl: Introduce --fido2-credential-algorithm option
* Some authenticators(like Yubikey) support credential algorithm other than ES256 * Introduce a new option so users can make use of it
Diffstat (limited to 'src/cryptenroll/cryptenroll-fido2.c')
-rw-r--r--src/cryptenroll/cryptenroll-fido2.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cryptenroll/cryptenroll-fido2.c b/src/cryptenroll/cryptenroll-fido2.c
index b519b8651b..80adaefa17 100644
--- a/src/cryptenroll/cryptenroll-fido2.c
+++ b/src/cryptenroll/cryptenroll-fido2.c
@@ -12,7 +12,8 @@ int enroll_fido2(
const void *volume_key,
size_t volume_key_size,
const char *device,
- Fido2EnrollFlags lock_with) {
+ Fido2EnrollFlags lock_with,
+ int cred_alg) {
_cleanup_(erase_and_freep) void *salt = NULL, *secret = NULL;
_cleanup_(erase_and_freep) char *base64_encoded = NULL;
@@ -42,6 +43,7 @@ int enroll_fido2(
/* user_icon_name= */ NULL,
/* askpw_icon_name= */ "drive-harddisk",
lock_with,
+ cred_alg,
&cid, &cid_size,
&salt, &salt_size,
&secret, &secret_size,