From 1835afe54ab23b8d64d64c561d4f8e217e76d0f7 Mon Sep 17 00:00:00 2001 From: Pol Henarejos Date: Tue, 27 Sep 2022 22:10:11 +0200 Subject: [PATCH] Fix making new credential when up is absent. Signed-off-by: Pol Henarejos --- src/fido/cbor_make_credential.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/fido/cbor_make_credential.c b/src/fido/cbor_make_credential.c index 59ddb66..a7fa691 100644 --- a/src/fido/cbor_make_credential.c +++ b/src/fido/cbor_make_credential.c @@ -44,9 +44,9 @@ int cbor_make_credential(const uint8_t *data, size_t len) { size_t resp_size = 0; CredExtensions extensions = {0}; //options.present = true; - options.up = ptrue; - options.uv = pfalse; - options.rk = pfalse; + //options.up = ptrue; + //options.uv = pfalse; + //options.rk = pfalse; CBOR_CHECK(cbor_parser_init(data, len, 0, &parser, &map)); uint64_t val_c = 1; @@ -230,7 +230,7 @@ int cbor_make_credential(const uint8_t *data, size_t len) { CBOR_ERROR(CTAP2_ERR_CREDENTIAL_EXCLUDED); } - if (options.up == ptrue) { //14.1 + if (options.up == ptrue || options.up == NULL) { //14.1 if (pinUvAuthParam.present == true) { if (getUserPresentFlagValue() == false) { if (check_user_presence() == false)