Coverage Report

Created: 2024-02-05 19:20

/libfido2/src/info.c
Line
Count
Source (jump to first uncovered line)
1
/*
2
 * Copyright (c) 2018-2022 Yubico AB. All rights reserved.
3
 * Use of this source code is governed by a BSD-style
4
 * license that can be found in the LICENSE file.
5
 * SPDX-License-Identifier: BSD-2-Clause
6
 */
7
8
#include "fido.h"
9
10
static int
11
decode_string(const cbor_item_t *item, void *arg)
12
973k
{
13
973k
        fido_str_array_t        *a = arg;
14
973k
        const size_t             i = a->len;
15
16
        /* keep ptr[x] and len consistent */
17
973k
        if (cbor_string_copy(item, &a->ptr[i]) < 0) {
18
3.74k
                fido_log_debug("%s: cbor_string_copy", __func__);
19
3.74k
                return (-1);
20
3.74k
        }
21
22
970k
        a->len++;
23
24
970k
        return (0);
25
973k
}
26
27
static int
28
decode_string_array(const cbor_item_t *item, fido_str_array_t *v)
29
366k
{
30
366k
        v->ptr = NULL;
31
366k
        v->len = 0;
32
33
366k
        if (cbor_isa_array(item) == false ||
34
366k
            cbor_array_is_definite(item) == false) {
35
266
                fido_log_debug("%s: cbor type", __func__);
36
266
                return (-1);
37
266
        }
38
39
365k
        v->ptr = calloc(cbor_array_size(item), sizeof(char *));
40
365k
        if (v->ptr == NULL)
41
20
                return (-1);
42
43
365k
        if (cbor_array_iter(item, v, decode_string) < 0) {
44
3.81k
                fido_log_debug("%s: decode_string", __func__);
45
3.81k
                return (-1);
46
3.81k
        }
47
48
362k
        return (0);
49
365k
}
50
51
static int
52
decode_aaguid(const cbor_item_t *item, unsigned char *aaguid, size_t aaguid_len)
53
158k
{
54
158k
        if (cbor_isa_bytestring(item) == false ||
55
158k
            cbor_bytestring_is_definite(item) == false ||
56
158k
            cbor_bytestring_length(item) != aaguid_len) {
57
1.82k
                fido_log_debug("%s: cbor type", __func__);
58
1.82k
                return (-1);
59
1.82k
        }
60
61
156k
        memcpy(aaguid, cbor_bytestring_handle(item), aaguid_len);
62
63
156k
        return (0);
64
158k
}
65
66
static int
67
decode_option(const cbor_item_t *key, const cbor_item_t *val, void *arg)
68
1.00M
{
69
1.00M
        fido_opt_array_t        *o = arg;
70
1.00M
        const size_t             i = o->len;
71
72
1.00M
        if (cbor_decode_bool(val, NULL) < 0) {
73
95.0k
                fido_log_debug("%s: cbor_decode_bool", __func__);
74
95.0k
                return (0); /* ignore */
75
95.0k
        }
76
77
914k
        if (cbor_string_copy(key, &o->name[i]) < 0) {
78
2.57k
                fido_log_debug("%s: cbor_string_copy", __func__);
79
2.57k
                return (0); /* ignore */
80
2.57k
        }
81
82
        /* keep name/value and len consistent */
83
911k
        o->value[i] = cbor_ctrl_value(val) == CBOR_CTRL_TRUE;
84
911k
        o->len++;
85
86
911k
        return (0);
87
914k
}
88
89
static int
90
decode_options(const cbor_item_t *item, fido_opt_array_t *o)
91
150k
{
92
150k
        o->name = NULL;
93
150k
        o->value = NULL;
94
150k
        o->len = 0;
95
96
150k
        if (cbor_isa_map(item) == false ||
97
150k
            cbor_map_is_definite(item) == false) {
98
273
                fido_log_debug("%s: cbor type", __func__);
99
273
                return (-1);
100
273
        }
101
102
149k
        o->name = calloc(cbor_map_size(item), sizeof(char *));
103
149k
        o->value = calloc(cbor_map_size(item), sizeof(bool));
104
149k
        if (o->name == NULL || o->value == NULL)
105
206
                return (-1);
106
107
149k
        return (cbor_map_iter(item, o, decode_option));
108
149k
}
109
110
static int
111
decode_protocol(const cbor_item_t *item, void *arg)
112
305k
{
113
305k
        fido_byte_array_t       *p = arg;
114
305k
        const size_t             i = p->len;
115
116
305k
        if (cbor_isa_uint(item) == false ||
117
305k
            cbor_int_get_width(item) != CBOR_INT_8) {
118
2.13k
                fido_log_debug("%s: cbor type", __func__);
119
2.13k
                return (-1);
120
2.13k
        }
121
122
        /* keep ptr[x] and len consistent */
123
303k
        p->ptr[i] = cbor_get_uint8(item);
124
303k
        p->len++;
125
126
303k
        return (0);
127
305k
}
128
129
static int
130
decode_protocols(const cbor_item_t *item, fido_byte_array_t *p)
131
154k
{
132
154k
        p->ptr = NULL;
133
154k
        p->len = 0;
134
135
154k
        if (cbor_isa_array(item) == false ||
136
154k
            cbor_array_is_definite(item) == false) {
137
240
                fido_log_debug("%s: cbor type", __func__);
138
240
                return (-1);
139
240
        }
140
141
154k
        p->ptr = calloc(cbor_array_size(item), sizeof(uint8_t));
142
154k
        if (p->ptr == NULL)
143
249
                return (-1);
144
145
154k
        if (cbor_array_iter(item, p, decode_protocol) < 0) {
146
2.34k
                fido_log_debug("%s: decode_protocol", __func__);
147
2.34k
                return (-1);
148
2.34k
        }
149
150
151k
        return (0);
151
154k
}
152
153
static int
154
decode_algorithm_entry(const cbor_item_t *key, const cbor_item_t *val,
155
    void *arg)
156
487k
{
157
487k
        fido_algo_t *alg = arg;
158
487k
        char *name = NULL;
159
487k
        int ok = -1;
160
161
487k
        if (cbor_string_copy(key, &name) < 0) {
162
8.90k
                fido_log_debug("%s: cbor type", __func__);
163
8.90k
                ok = 0; /* ignore */
164
8.90k
                goto out;
165
8.90k
        }
166
167
478k
        if (!strcmp(name, "alg")) {
168
202k
                if (cbor_isa_negint(val) == false ||
169
202k
                    cbor_get_int(val) > INT_MAX || alg->cose != 0) {
170
1.66k
                        fido_log_debug("%s: alg", __func__);
171
1.66k
                        goto out;
172
1.66k
                }
173
201k
                alg->cose = -(int)cbor_get_int(val) - 1;
174
275k
        } else if (!strcmp(name, "type")) {
175
167k
                if (cbor_string_copy(val, &alg->type) < 0) {
176
846
                        fido_log_debug("%s: type", __func__);
177
846
                        goto out;
178
846
                }
179
167k
        }
180
181
475k
        ok = 0;
182
487k
out:
183
487k
        free(name);
184
185
487k
        return (ok);
186
475k
}
187
188
static int
189
decode_algorithm(const cbor_item_t *item, void *arg)
190
281k
{
191
281k
        fido_algo_array_t *aa = arg;
192
281k
        const size_t i = aa->len;
193
194
281k
        if (cbor_isa_map(item) == false ||
195
281k
            cbor_map_is_definite(item) == false) {
196
2.33k
                fido_log_debug("%s: cbor type", __func__);
197
2.33k
                return (-1);
198
2.33k
        }
199
200
279k
        memset(&aa->ptr[i], 0, sizeof(aa->ptr[i]));
201
202
279k
        if (cbor_map_iter(item, &aa->ptr[i], decode_algorithm_entry) < 0) {
203
4.67k
                fido_log_debug("%s: decode_algorithm_entry", __func__);
204
4.67k
                fido_algo_free(&aa->ptr[i]);
205
4.67k
                return (-1);
206
4.67k
        }
207
208
        /* keep ptr[x] and len consistent */
209
274k
        aa->len++;
210
211
274k
        return (0);
212
279k
}
213
214
static int
215
decode_algorithms(const cbor_item_t *item, fido_algo_array_t *aa)
216
127k
{
217
127k
        aa->ptr = NULL;
218
127k
        aa->len = 0;
219
220
127k
        if (cbor_isa_array(item) == false ||
221
127k
            cbor_array_is_definite(item) == false) {
222
84
                fido_log_debug("%s: cbor type", __func__);
223
84
                return (-1);
224
84
        }
225
226
127k
        aa->ptr = calloc(cbor_array_size(item), sizeof(fido_algo_t));
227
127k
        if (aa->ptr == NULL)
228
426
                return (-1);
229
230
127k
        if (cbor_array_iter(item, aa, decode_algorithm) < 0) {
231
7.05k
                fido_log_debug("%s: decode_algorithm", __func__);
232
7.05k
                return (-1);
233
7.05k
        }
234
235
120k
        return (0);
236
127k
}
237
238
static int
239
decode_cert(const cbor_item_t *key, const cbor_item_t *val, void *arg)
240
79.4k
{
241
79.4k
        fido_cert_array_t       *c = arg;
242
79.4k
        const size_t             i = c->len;
243
244
79.4k
        if (cbor_is_int(val) == false) {
245
15.7k
                fido_log_debug("%s: cbor_is_int", __func__);
246
15.7k
                return (0); /* ignore */
247
15.7k
        }
248
249
63.7k
        if (cbor_string_copy(key, &c->name[i]) < 0) {
250
3.58k
                fido_log_debug("%s: cbor_string_copy", __func__);
251
3.58k
                return (0); /* ignore */
252
3.58k
        }
253
254
        /* keep name/value and len consistent */
255
60.1k
        c->value[i] = cbor_get_int(val);
256
60.1k
        c->len++;
257
258
60.1k
        return (0);
259
63.7k
}
260
261
static int
262
decode_certs(const cbor_item_t *item, fido_cert_array_t *c)
263
22.8k
{
264
22.8k
        c->name = NULL;
265
22.8k
        c->value = NULL;
266
22.8k
        c->len = 0;
267
268
22.8k
        if (cbor_isa_map(item) == false ||
269
22.8k
            cbor_map_is_definite(item) == false) {
270
324
                fido_log_debug("%s: cbor type", __func__);
271
324
                return (-1);
272
324
        }
273
274
22.4k
        c->name = calloc(cbor_map_size(item), sizeof(char *));
275
22.4k
        c->value = calloc(cbor_map_size(item), sizeof(uint64_t));
276
22.4k
        if (c->name == NULL || c->value == NULL)
277
125
                return (-1);
278
279
22.3k
        return (cbor_map_iter(item, c, decode_cert));
280
22.4k
}
281
282
static int
283
parse_reply_element(const cbor_item_t *key, const cbor_item_t *val, void *arg)
284
1.72M
{
285
1.72M
        fido_cbor_info_t *ci = arg;
286
1.72M
        uint64_t x;
287
288
1.72M
        if (cbor_isa_uint(key) == false ||
289
1.72M
            cbor_int_get_width(key) != CBOR_INT_8) {
290
38.5k
                fido_log_debug("%s: cbor type", __func__);
291
38.5k
                return (0); /* ignore */
292
38.5k
        }
293
294
1.68M
        switch (cbor_get_uint8(key)) {
295
157k
        case 1: /* versions */
296
157k
                return (decode_string_array(val, &ci->versions));
297
168k
        case 2: /* extensions */
298
168k
                return (decode_string_array(val, &ci->extensions));
299
158k
        case 3: /* aaguid */
300
158k
                return (decode_aaguid(val, ci->aaguid, sizeof(ci->aaguid)));
301
150k
        case 4: /* options */
302
150k
                return (decode_options(val, &ci->options));
303
150k
        case 5: /* maxMsgSize */
304
150k
                return (cbor_decode_uint64(val, &ci->maxmsgsiz));
305
154k
        case 6: /* pinProtocols */
306
154k
                return (decode_protocols(val, &ci->protocols));
307
142k
        case 7: /* maxCredentialCountInList */
308
142k
                return (cbor_decode_uint64(val, &ci->maxcredcntlst));
309
140k
        case 8: /* maxCredentialIdLength */
310
140k
                return (cbor_decode_uint64(val, &ci->maxcredidlen));
311
40.6k
        case 9: /* transports */
312
40.6k
                return (decode_string_array(val, &ci->transports));
313
127k
        case 10: /* algorithms */
314
127k
                return (decode_algorithms(val, &ci->algorithms));
315
23.6k
        case 11: /* maxSerializedLargeBlobArray */
316
23.6k
                return (cbor_decode_uint64(val, &ci->maxlargeblob));
317
24.0k
        case 12: /* forcePINChange */
318
24.0k
                return (cbor_decode_bool(val, &ci->new_pin_reqd));
319
38.2k
        case 13: /* minPINLength */
320
38.2k
                return (cbor_decode_uint64(val, &ci->minpinlen));
321
39.2k
        case 14: /* fwVersion */
322
39.2k
                return (cbor_decode_uint64(val, &ci->fwversion));
323
24.1k
        case 15: /* maxCredBlobLen */
324
24.1k
                return (cbor_decode_uint64(val, &ci->maxcredbloblen));
325
23.5k
        case 16: /* maxRPIDsForSetMinPINLength */
326
23.5k
                return (cbor_decode_uint64(val, &ci->maxrpid_minlen));
327
23.4k
        case 17: /* preferredPlatformUvAttempts */
328
23.4k
                return (cbor_decode_uint64(val, &ci->uv_attempts));
329
23.3k
        case 18: /* uvModality */
330
23.3k
                return (cbor_decode_uint64(val, &ci->uv_modality));
331
22.8k
        case 19: /* certifications */
332
22.8k
                return (decode_certs(val, &ci->certs));
333
25.2k
        case 20: /* remainingDiscoverableCredentials */
334
25.2k
                if (cbor_decode_uint64(val, &x) < 0 || x > INT64_MAX) {
335
489
                        fido_log_debug("%s: cbor_decode_uint64", __func__);
336
489
                        return (-1);
337
489
                }
338
24.7k
                ci->rk_remaining = (int64_t)x;
339
24.7k
                return (0);
340
24.2k
        default: /* ignore */
341
24.2k
                fido_log_debug("%s: cbor type: 0x%02x", __func__, cbor_get_uint8(key));
342
24.2k
                return (0);
343
1.68M
        }
344
1.68M
}
345
346
static int
347
fido_dev_get_cbor_info_tx(fido_dev_t *dev, int *ms)
348
441k
{
349
441k
        const unsigned char cbor[] = { CTAP_CBOR_GETINFO };
350
351
441k
        fido_log_debug("%s: dev=%p", __func__, (void *)dev);
352
353
441k
        if (fido_tx(dev, CTAP_CMD_CBOR, cbor, sizeof(cbor), ms) < 0) {
354
3.23k
                fido_log_debug("%s: fido_tx", __func__);
355
3.23k
                return (FIDO_ERR_TX);
356
3.23k
        }
357
358
438k
        return (FIDO_OK);
359
441k
}
360
361
static int
362
fido_dev_get_cbor_info_rx(fido_dev_t *dev, fido_cbor_info_t *ci, int *ms)
363
438k
{
364
438k
        unsigned char   *msg;
365
438k
        int              msglen;
366
438k
        int              r;
367
368
438k
        fido_log_debug("%s: dev=%p, ci=%p, ms=%d", __func__, (void *)dev,
369
438k
            (void *)ci, *ms);
370
371
438k
        fido_cbor_info_reset(ci);
372
373
438k
        if ((msg = malloc(FIDO_MAXMSG)) == NULL) {
374
724
                r = FIDO_ERR_INTERNAL;
375
724
                goto out;
376
724
        }
377
378
437k
        if ((msglen = fido_rx(dev, CTAP_CMD_CBOR, msg, FIDO_MAXMSG, ms)) < 0) {
379
106k
                fido_log_debug("%s: fido_rx", __func__);
380
106k
                r = FIDO_ERR_RX;
381
106k
                goto out;
382
106k
        }
383
384
331k
        r = cbor_parse_reply(msg, (size_t)msglen, ci, parse_reply_element);
385
438k
out:
386
438k
        freezero(msg, FIDO_MAXMSG);
387
388
438k
        return (r);
389
331k
}
390
391
int
392
fido_dev_get_cbor_info_wait(fido_dev_t *dev, fido_cbor_info_t *ci, int *ms)
393
441k
{
394
441k
        int r;
395
396
#ifdef USE_WINHELLO
397
        if (dev->flags & FIDO_DEV_WINHELLO)
398
                return (fido_winhello_get_cbor_info(dev, ci));
399
#endif
400
441k
        if ((r = fido_dev_get_cbor_info_tx(dev, ms)) != FIDO_OK ||
401
441k
            (r = fido_dev_get_cbor_info_rx(dev, ci, ms)) != FIDO_OK)
402
283k
                return (r);
403
404
157k
        return (FIDO_OK);
405
441k
}
406
407
int
408
fido_dev_get_cbor_info(fido_dev_t *dev, fido_cbor_info_t *ci)
409
17.1k
{
410
17.1k
        int ms = dev->timeout_ms;
411
412
17.1k
        return (fido_dev_get_cbor_info_wait(dev, ci, &ms));
413
17.1k
}
414
415
/*
416
 * get/set functions for fido_cbor_info_t; always at the end of the file
417
 */
418
419
fido_cbor_info_t *
420
fido_cbor_info_new(void)
421
445k
{
422
445k
        fido_cbor_info_t *ci;
423
424
445k
        if ((ci = calloc(1, sizeof(fido_cbor_info_t))) == NULL)
425
3.71k
                return (NULL);
426
427
441k
        fido_cbor_info_reset(ci);
428
429
441k
        return (ci);
430
445k
}
431
432
void
433
fido_cbor_info_reset(fido_cbor_info_t *ci)
434
1.32M
{
435
1.32M
        fido_str_array_free(&ci->versions);
436
1.32M
        fido_str_array_free(&ci->extensions);
437
1.32M
        fido_str_array_free(&ci->transports);
438
1.32M
        fido_opt_array_free(&ci->options);
439
1.32M
        fido_byte_array_free(&ci->protocols);
440
1.32M
        fido_algo_array_free(&ci->algorithms);
441
1.32M
        fido_cert_array_free(&ci->certs);
442
1.32M
        ci->rk_remaining = -1;
443
1.32M
}
444
445
void
446
fido_cbor_info_free(fido_cbor_info_t **ci_p)
447
1.51M
{
448
1.51M
        fido_cbor_info_t *ci;
449
450
1.51M
        if (ci_p == NULL || (ci = *ci_p) ==  NULL)
451
1.06M
                return;
452
441k
        fido_cbor_info_reset(ci);
453
441k
        free(ci);
454
441k
        *ci_p = NULL;
455
441k
}
456
457
char **
458
fido_cbor_info_versions_ptr(const fido_cbor_info_t *ci)
459
20.3k
{
460
20.3k
        return (ci->versions.ptr);
461
20.3k
}
462
463
size_t
464
fido_cbor_info_versions_len(const fido_cbor_info_t *ci)
465
37.5k
{
466
37.5k
        return (ci->versions.len);
467
37.5k
}
468
469
char **
470
fido_cbor_info_extensions_ptr(const fido_cbor_info_t *ci)
471
174k
{
472
174k
        return (ci->extensions.ptr);
473
174k
}
474
475
size_t
476
fido_cbor_info_extensions_len(const fido_cbor_info_t *ci)
477
191k
{
478
191k
        return (ci->extensions.len);
479
191k
}
480
481
char **
482
fido_cbor_info_transports_ptr(const fido_cbor_info_t *ci)
483
6.63k
{
484
6.63k
        return (ci->transports.ptr);
485
6.63k
}
486
487
size_t
488
fido_cbor_info_transports_len(const fido_cbor_info_t *ci)
489
23.8k
{
490
23.8k
        return (ci->transports.len);
491
23.8k
}
492
493
const unsigned char *
494
fido_cbor_info_aaguid_ptr(const fido_cbor_info_t *ci)
495
17.1k
{
496
17.1k
        return (ci->aaguid);
497
17.1k
}
498
499
size_t
500
fido_cbor_info_aaguid_len(const fido_cbor_info_t *ci)
501
17.1k
{
502
17.1k
        return (sizeof(ci->aaguid));
503
17.1k
}
504
505
char **
506
fido_cbor_info_options_name_ptr(const fido_cbor_info_t *ci)
507
167k
{
508
167k
        return (ci->options.name);
509
167k
}
510
511
const bool *
512
fido_cbor_info_options_value_ptr(const fido_cbor_info_t *ci)
513
167k
{
514
167k
        return (ci->options.value);
515
167k
}
516
517
size_t
518
fido_cbor_info_options_len(const fido_cbor_info_t *ci)
519
184k
{
520
184k
        return (ci->options.len);
521
184k
}
522
523
uint64_t
524
fido_cbor_info_maxcredbloblen(const fido_cbor_info_t *ci)
525
17.1k
{
526
17.1k
        return (ci->maxcredbloblen);
527
17.1k
}
528
529
uint64_t
530
fido_cbor_info_maxmsgsiz(const fido_cbor_info_t *ci)
531
173k
{
532
173k
        return (ci->maxmsgsiz);
533
173k
}
534
535
uint64_t
536
fido_cbor_info_maxcredcntlst(const fido_cbor_info_t *ci)
537
17.1k
{
538
17.1k
        return (ci->maxcredcntlst);
539
17.1k
}
540
541
uint64_t
542
fido_cbor_info_maxcredidlen(const fido_cbor_info_t *ci)
543
17.1k
{
544
17.1k
        return (ci->maxcredidlen);
545
17.1k
}
546
547
uint64_t
548
fido_cbor_info_maxlargeblob(const fido_cbor_info_t *ci)
549
17.1k
{
550
17.1k
        return (ci->maxlargeblob);
551
17.1k
}
552
553
uint64_t
554
fido_cbor_info_fwversion(const fido_cbor_info_t *ci)
555
17.1k
{
556
17.1k
        return (ci->fwversion);
557
17.1k
}
558
559
uint64_t
560
fido_cbor_info_minpinlen(const fido_cbor_info_t *ci)
561
17.1k
{
562
17.1k
        return (ci->minpinlen);
563
17.1k
}
564
565
uint64_t
566
fido_cbor_info_maxrpid_minpinlen(const fido_cbor_info_t *ci)
567
17.1k
{
568
17.1k
        return (ci->maxrpid_minlen);
569
17.1k
}
570
571
uint64_t
572
fido_cbor_info_uv_attempts(const fido_cbor_info_t *ci)
573
17.1k
{
574
17.1k
        return (ci->uv_attempts);
575
17.1k
}
576
577
uint64_t
578
fido_cbor_info_uv_modality(const fido_cbor_info_t *ci)
579
17.1k
{
580
17.1k
        return (ci->uv_modality);
581
17.1k
}
582
583
int64_t
584
fido_cbor_info_rk_remaining(const fido_cbor_info_t *ci)
585
17.1k
{
586
17.1k
        return (ci->rk_remaining);
587
17.1k
}
588
589
const uint8_t *
590
fido_cbor_info_protocols_ptr(const fido_cbor_info_t *ci)
591
173k
{
592
173k
        return (ci->protocols.ptr);
593
173k
}
594
595
size_t
596
fido_cbor_info_protocols_len(const fido_cbor_info_t *ci)
597
173k
{
598
173k
        return (ci->protocols.len);
599
173k
}
600
601
size_t
602
fido_cbor_info_algorithm_count(const fido_cbor_info_t *ci)
603
38.9k
{
604
38.9k
        return (ci->algorithms.len);
605
38.9k
}
606
607
const char *
608
fido_cbor_info_algorithm_type(const fido_cbor_info_t *ci, size_t idx)
609
21.8k
{
610
21.8k
        if (idx >= ci->algorithms.len)
611
17.1k
                return (NULL);
612
613
4.64k
        return (ci->algorithms.ptr[idx].type);
614
21.8k
}
615
616
int
617
fido_cbor_info_algorithm_cose(const fido_cbor_info_t *ci, size_t idx)
618
21.8k
{
619
21.8k
        if (idx >= ci->algorithms.len)
620
17.1k
                return (0);
621
622
4.64k
        return (ci->algorithms.ptr[idx].cose);
623
21.8k
}
624
625
bool
626
fido_cbor_info_new_pin_required(const fido_cbor_info_t *ci)
627
17.1k
{
628
17.1k
        return (ci->new_pin_reqd);
629
17.1k
}
630
631
char **
632
fido_cbor_info_certs_name_ptr(const fido_cbor_info_t *ci)
633
5.39k
{
634
5.39k
        return (ci->certs.name);
635
5.39k
}
636
637
const uint64_t *
638
fido_cbor_info_certs_value_ptr(const fido_cbor_info_t *ci)
639
5.39k
{
640
5.39k
        return (ci->certs.value);
641
5.39k
}
642
643
size_t
644
fido_cbor_info_certs_len(const fido_cbor_info_t *ci)
645
22.5k
{
646
22.5k
        return (ci->certs.len);
647
22.5k
}