From 31acb164b1ffc24a287b1fe97eea5e4beeaf5f5a Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 19 Jun 2024 11:20:30 +0200 Subject: Adding upstream version 1.15.0. Signed-off-by: Daniel Baumann --- src/dev.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/dev.c') diff --git a/src/dev.c b/src/dev.c index 2d662a6..e9e26e7 100644 --- a/src/dev.c +++ b/src/dev.c @@ -46,16 +46,21 @@ fido_dev_set_option_flags(fido_dev_t *dev, const fido_cbor_info_t *info) if (strcmp(ptr[i], "clientPin") == 0) { dev->flags |= val[i] ? FIDO_DEV_PIN_SET : FIDO_DEV_PIN_UNSET; - } else if (strcmp(ptr[i], "credMgmt") == 0 || - strcmp(ptr[i], "credentialMgmtPreview") == 0) { + } else if (strcmp(ptr[i], "credMgmt") == 0) { if (val[i]) dev->flags |= FIDO_DEV_CREDMAN; + } else if (strcmp(ptr[i], "credentialMgmtPreview") == 0) { + if (val[i]) + dev->flags |= FIDO_DEV_CREDMAN_PRE; } else if (strcmp(ptr[i], "uv") == 0) { dev->flags |= val[i] ? FIDO_DEV_UV_SET : FIDO_DEV_UV_UNSET; } else if (strcmp(ptr[i], "pinUvAuthToken") == 0) { if (val[i]) dev->flags |= FIDO_DEV_TOKEN_PERMS; + } else if (strcmp(ptr[i], "bioEnroll") == 0) { + dev->flags |= val[i] ? + FIDO_DEV_BIO_SET : FIDO_DEV_BIO_UNSET; } } @@ -538,7 +543,7 @@ fido_dev_supports_cred_prot(const fido_dev_t *dev) bool fido_dev_supports_credman(const fido_dev_t *dev) { - return (dev->flags & FIDO_DEV_CREDMAN); + return (dev->flags & (FIDO_DEV_CREDMAN|FIDO_DEV_CREDMAN_PRE)); } bool -- cgit v1.2.3