Skip to content

Commit 8c25629

Browse files
committed
default up to enabled
1 parent 01b928c commit 8c25629

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

fido2/ctap.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,7 @@ uint8_t ctap_make_credential(CborEncoder * encoder, uint8_t * request, int lengt
755755
}
756756
}
757757

758-
if (MC.up)
758+
if (MC.up == 1 || MC.up == 0)
759759
{
760760
return CTAP2_ERR_INVALID_OPTION;
761761
}
@@ -1248,7 +1248,7 @@ uint8_t ctap_get_assertion(CborEncoder * encoder, uint8_t * request, int length)
12481248
else
12491249
#endif
12501250
{
1251-
device_disable_up(!GA.up);
1251+
device_disable_up(GA.up == 0);
12521252
ret = ctap_make_auth_data(&GA.rp, &map, auth_data_buf, &auth_data_buf_sz, NULL);
12531253
device_disable_up(false);
12541254
check_retr(ret);

fido2/ctap_parse.c

+2
Original file line numberDiff line numberDiff line change
@@ -715,6 +715,7 @@ uint8_t ctap_parse_make_credential(CTAP_makeCredential * MC, CborEncoder * encod
715715
CborValue it,map;
716716

717717
memset(MC, 0, sizeof(CTAP_makeCredential));
718+
MC->up = 0xff;
718719
ret = cbor_parser_init(request, length, CborValidateCanonicalFormat, &parser, &it);
719720
check_retr(ret);
720721

@@ -1010,6 +1011,7 @@ uint8_t ctap_parse_get_assertion(CTAP_getAssertion * GA, uint8_t * request, int
10101011

10111012
memset(GA, 0, sizeof(CTAP_getAssertion));
10121013
GA->creds = getAssertionState.creds; // Save stack memory
1014+
GA->up = 0xff;
10131015

10141016
ret = cbor_parser_init(request, length, CborValidateCanonicalFormat, &parser, &it);
10151017
check_ret(ret);

0 commit comments

Comments
 (0)