From 8feac76a73736fcfa69fe5267f7ffb88cbd97195 Mon Sep 17 00:00:00 2001 From: Pol Henarejos Date: Tue, 20 Sep 2022 11:50:45 +0200 Subject: [PATCH] If user has introduced PIN, it is verified. Signed-off-by: Pol Henarejos --- src/fido/cbor_make_credential.c | 2 ++ src/fido/fido.h | 1 + 2 files changed, 3 insertions(+) diff --git a/src/fido/cbor_make_credential.c b/src/fido/cbor_make_credential.c index 8b774ed..2abb967 100644 --- a/src/fido/cbor_make_credential.c +++ b/src/fido/cbor_make_credential.c @@ -313,6 +313,8 @@ int cbor_make_credential(const uint8_t *data, size_t len) { } uint8_t flags = FIDO2_AUT_FLAG_UP | FIDO2_AUT_FLAG_AT; + if (getUserVerifiedFlagValue()) + flags |= FIDO2_AUT_FLAG_UV; size_t ext_len = 0; uint8_t ext [512]; if (hmac_secret != NULL || credProtect != 0) { diff --git a/src/fido/fido.h b/src/fido/fido.h index 1a9ba83..8f524c3 100644 --- a/src/fido/fido.h +++ b/src/fido/fido.h @@ -62,6 +62,7 @@ extern CTAPHID_FRAME *ctap_req, *ctap_resp; #define FIDO2_PERMISSION_ACFG 0x20 #define MAX_PIN_RETRIES 3 +extern bool getUserVerifiedFlagValue(); typedef struct known_app { const uint8_t *rp_id_hash;