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_maxcredcntlst,
14     fido_cbor_info_maxcredidlen, fido_cbor_info_fwversion — FIDO 2 CBOR Info
15     API
16

SYNOPSIS

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

DESCRIPTION

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

RETURN VALUES

148     The fido_cbor_info_aaguid_ptr(), fido_cbor_info_extensions_ptr(),
149     fido_cbor_info_protocols_ptr(), fido_cbor_info_transports_ptr(),
150     fido_cbor_info_versions_ptr(), fido_cbor_info_options_name_ptr(), and
151     fido_cbor_info_options_value_ptr() functions return NULL if the respec‐
152     tive field in ci is absent.  If not NULL, returned pointers are guaran‐
153     teed to exist until any API function that takes ci without the const
154     qualifier is invoked.
155

SEE ALSO

157     fido_dev_open(3)
158
159BSD                              May 24, 2018                              BSD
Impressum