Skip to content

Commit f0e6ca7

Browse files
committed
Add getinfo config options.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
1 parent 580c26f commit f0e6ca7

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

pico-keys-sdk

src/fido/cbor_get_info.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ int cbor_get_info(void) {
2828
CborEncoder encoder, mapEncoder, arrayEncoder, mapEncoder2;
2929
CborError error = CborNoError;
3030
cbor_encoder_init(&encoder, ctap_resp->init.data + 1, CTAP_MAX_CBOR_PAYLOAD, 0);
31-
uint8_t lfields = 15;
31+
uint8_t lfields = 16;
3232
file_t *ef_ee_ea = file_search_by_fid(EF_EE_DEV_EA, NULL, SPECIFY_EF);
3333
bool enterprise_profile = ((get_opts() & FIDO2_OPT_EA) && file_has_data(ef_ee_ea));
3434
#ifndef ENABLE_EMULATION
@@ -202,6 +202,13 @@ int cbor_get_info(void) {
202202
CBOR_CHECK(cbor_encode_byte_string(&mapEncoder, file_get_data(ef_pin_policy) + 2, file_get_size(ef_pin_policy) - 2));
203203
}
204204

205+
CBOR_CHECK(cbor_encode_uint(&mapEncoder, 0x1F));
206+
CBOR_CHECK(cbor_encoder_create_array(&mapEncoder, &arrayEncoder, 3));
207+
CBOR_CHECK(cbor_encode_uint(&arrayEncoder, 0x01));
208+
CBOR_CHECK(cbor_encode_uint(&arrayEncoder, 0x03));
209+
CBOR_CHECK(cbor_encode_uint(&arrayEncoder, 0xFF));
210+
CBOR_CHECK(cbor_encoder_close_container(&mapEncoder, &arrayEncoder));
211+
205212
#endif
206213
CBOR_CHECK(cbor_encoder_close_container(&encoder, &mapEncoder));
207214
err:

0 commit comments

Comments
 (0)