1FIDO_CBOR_INFO_NEW(3)    BSD Library Functions Manual    FIDO_CBOR_INFO_NEW(3)
2

NAME

4     fido_cbor_info_new, fido_cbor_info_free, fido_dev_get_cbor_info,
5     fido_cbor_info_aaguid_ptr, fido_cbor_info_extensions_ptr,
6     fido_cbor_info_protocols_ptr, fido_cbor_info_transports_ptr,
7     fido_cbor_info_versions_ptr, fido_cbor_info_options_name_ptr,
8     fido_cbor_info_options_value_ptr, fido_cbor_info_algorithm_type,
9     fido_cbor_info_algorithm_cose, fido_cbor_info_algorithm_count,
10     fido_cbor_info_aaguid_len, fido_cbor_info_extensions_len,
11     fido_cbor_info_protocols_len, fido_cbor_info_transports_len,
12     fido_cbor_info_versions_len, fido_cbor_info_options_len,
13     fido_cbor_info_maxmsgsiz, fido_cbor_info_maxcredbloblen,
14     fido_cbor_info_maxcredcntlst, fido_cbor_info_maxcredidlen,
15     fido_cbor_info_maxlargeblob, fido_cbor_info_fwversion — FIDO2 CBOR Info
16     API
17

SYNOPSIS

19     #include <fido.h>
20
21     fido_cbor_info_t *
22     fido_cbor_info_new(void);
23
24     void
25     fido_cbor_info_free(fido_cbor_info_t **ci_p);
26
27     int
28     fido_dev_get_cbor_info(fido_dev_t *dev, fido_cbor_info_t *ci);
29
30     const unsigned char *
31     fido_cbor_info_aaguid_ptr(const fido_cbor_info_t *ci);
32
33     char **
34     fido_cbor_info_extensions_ptr(const fido_cbor_info_t *ci);
35
36     const uint8_t *
37     fido_cbor_info_protocols_ptr(const fido_cbor_info_t *ci);
38
39     char **
40     fido_cbor_info_transports_ptr(const fido_cbor_info_t *ci);
41
42     char **
43     fido_cbor_info_versions_ptr(const fido_cbor_info_t *ci);
44
45     char **
46     fido_cbor_info_options_name_ptr(const fido_cbor_info_t *ci);
47
48     const bool *
49     fido_cbor_info_options_value_ptr(const fido_cbor_info_t *ci);
50
51     const char *
52     fido_cbor_info_algorithm_type(const fido_cbor_info_t *ci, size_t idx);
53
54     int
55     fido_cbor_info_algorithm_cose(const fido_cbor_info_t *ci, size_t idx);
56
57     size_t
58     fido_cbor_info_algorithm_count(const fido_cbor_info_t *ci);
59
60     size_t
61     fido_cbor_info_aaguid_len(const fido_cbor_info_t *ci);
62
63     size_t
64     fido_cbor_info_extensions_len(const fido_cbor_info_t *ci);
65
66     size_t
67     fido_cbor_info_protocols_len(const fido_cbor_info_t *ci);
68
69     size_t
70     fido_cbor_info_transports_len(const fido_cbor_info_t *ci);
71
72     size_t
73     fido_cbor_info_versions_len(const fido_cbor_info_t *ci);
74
75     size_t
76     fido_cbor_info_options_len(const fido_cbor_info_t *ci);
77
78     uint64_t
79     fido_cbor_info_maxmsgsiz(const fido_cbor_info_t *ci);
80
81     uint64_t
82     fido_cbor_info_maxcredbloblen(const fido_cbor_info_t *ci);
83
84     uint64_t
85     fido_cbor_info_maxcredcntlst(const fido_cbor_info_t *ci);
86
87     uint64_t
88     fido_cbor_info_maxcredidlen(const fido_cbor_info_t *ci);
89
90     uint64_t
91     fido_cbor_info_maxlargeblob(const fido_cbor_info_t *ci);
92
93     uint64_t
94     fido_cbor_info_fwversion(const fido_cbor_info_t *ci);
95

DESCRIPTION

97     The fido_cbor_info_new() function returns a pointer to a newly allocated,
98     empty fido_cbor_info_t type.  If memory cannot be allocated, NULL is re‐
99     turned.
100
101     The fido_cbor_info_free() function releases the memory backing *ci_p,
102     where *ci_p must have been previously allocated by fido_cbor_info_new().
103     On return, *ci_p is set to NULL.  Either ci_p or *ci_p may be NULL, in
104     which case fido_cbor_info_free() is a NOP.
105
106     The fido_dev_get_cbor_info() function transmits a CTAP_CBOR_GETINFO com‐
107     mand to dev and fills ci with attributes retrieved from the command's re‐
108     sponse.  The fido_dev_get_cbor_info() function may block.
109
110     The fido_cbor_info_aaguid_ptr(), fido_cbor_info_extensions_ptr(),
111     fido_cbor_info_protocols_ptr(), fido_cbor_info_transports_ptr(), and
112     fido_cbor_info_versions_ptr() functions return pointers to the authenti‐
113     cator attestation GUID, supported extensions, PIN protocol, transports,
114     and CTAP version strings of ci.  The corresponding length of a given at‐
115     tribute can be obtained by fido_cbor_info_aaguid_len(),
116     fido_cbor_info_extensions_len(), fido_cbor_info_protocols_len(),
117     fido_cbor_info_transports_len(), or fido_cbor_info_versions_len().
118
119     The fido_cbor_info_options_name_ptr() and
120     fido_cbor_info_options_value_ptr() functions return pointers to the array
121     of option names and their respective values in ci.  The length of the op‐
122     tions array is returned by fido_cbor_info_options_len().
123
124     The fido_cbor_info_algorithm_count() function returns the number of sup‐
125     ported algorithms in ci.  The fido_cbor_info_algorithm_cose() function
126     returns the COSE identifier of algorithm idx in ci, or 0 if the COSE
127     identifier is unknown or unset.  The fido_cbor_info_algorithm_type()
128     function returns the type of algorithm idx in ci, or NULL if the type is
129     unset.  Please note that the first algorithm in ci has an idx (index)
130     value of 0.
131
132     The fido_cbor_info_maxmsgsiz() function returns the maximum message size
133     attribute of ci.
134
135     The fido_cbor_info_maxcredbloblen() function returns the maximum
136     “credBlob” length in bytes supported by the authenticator as reported in
137     ci.
138
139     The fido_cbor_info_maxcredcntlst() function returns the maximum supported
140     number of credentials in a single credential ID list as reported in ci.
141
142     The fido_cbor_info_maxcredidlen() function returns the maximum supported
143     length of a credential ID as reported in ci.
144
145     The fido_cbor_info_maxlargeblob() function returns the maximum length in
146     bytes of an authenticator's serialized largeBlob array as reported in ci.
147
148     The fido_cbor_info_fwversion() function returns the firmware version at‐
149     tribute of ci.
150
151     A complete example of how to use these functions can be found in the
152     example/info.c file shipped with libfido2.
153

RETURN VALUES

155     The fido_cbor_info_aaguid_ptr(), fido_cbor_info_extensions_ptr(),
156     fido_cbor_info_protocols_ptr(), fido_cbor_info_transports_ptr(),
157     fido_cbor_info_versions_ptr(), fido_cbor_info_options_name_ptr(), and
158     fido_cbor_info_options_value_ptr() functions return NULL if the respec‐
159     tive field in ci is absent.  If not NULL, returned pointers are guaran‐
160     teed to exist until any API function that takes ci without the const
161     qualifier is invoked.
162

SEE ALSO

164     fido_dev_open(3)
165
166BSD                             April 22, 2022                             BSD
Impressum