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_versions_ptr,
7     fido_cbor_info_options_name_ptr, fido_cbor_info_options_value_ptr,
8     fido_cbor_info_aaguid_len, fido_cbor_info_extensions_len,
9     fido_cbor_info_protocols_len, fido_cbor_info_versions_len,
10     fido_cbor_info_options_len, fido_cbor_info_maxmsgsiz,
11     fido_cbor_info_maxcredcntlst, fido_cbor_info_maxcredidlen,
12     fido_cbor_info_fwversion — FIDO 2 CBOR Info API
13

SYNOPSIS

15     #include <fido.h>
16
17     fido_cbor_info_t *
18     fido_cbor_info_new(void);
19
20     void
21     fido_cbor_info_free(fido_cbor_info_t **ci_p);
22
23     int
24     fido_dev_get_cbor_info(fido_dev_t *dev, fido_cbor_info_t *ci);
25
26     const unsigned char *
27     fido_cbor_info_aaguid_ptr(const fido_cbor_info_t *ci);
28
29     char **
30     fido_cbor_info_extensions_ptr(const fido_cbor_info_t *ci);
31
32     const uint8_t *
33     fido_cbor_info_protocols_ptr(const fido_cbor_info_t *ci);
34
35     char **
36     fido_cbor_info_versions_ptr(const fido_cbor_info_t *ci);
37
38     char **
39     fido_cbor_info_options_name_ptr(const fido_cbor_info_t *ci);
40
41     const bool *
42     fido_cbor_info_options_value_ptr(const fido_cbor_info_t *ci);
43
44     size_t
45     fido_cbor_info_aaguid_len(const fido_cbor_info_t *ci);
46
47     size_t
48     fido_cbor_info_extensions_len(const fido_cbor_info_t *ci);
49
50     size_t
51     fido_cbor_info_protocols_len(const fido_cbor_info_t *ci);
52
53     size_t
54     fido_cbor_info_versions_len(const fido_cbor_info_t *ci);
55
56     size_t
57     fido_cbor_info_options_len(const fido_cbor_info_t *ci);
58
59     uint64_t
60     fido_cbor_info_maxmsgsiz(const fido_cbor_info_t *ci);
61
62     uint64_t
63     fido_cbor_info_maxcredcntlst(const fido_cbor_info_t *ci);
64
65     uint64_t
66     fido_cbor_info_maxcredidlen(const fido_cbor_info_t *ci);
67
68     uint64_t
69     fido_cbor_info_fwversion(const fido_cbor_info_t *ci);
70

DESCRIPTION

72     The fido_cbor_info_new() function returns a pointer to a newly allocated,
73     empty fido_cbor_info_t type.  If memory cannot be allocated, NULL is re‐
74     turned.
75
76     The fido_cbor_info_free() function releases the memory backing *ci_p,
77     where *ci_p must have been previously allocated by fido_cbor_info_new().
78     On return, *ci_p is set to NULL.  Either ci_p or *ci_p may be NULL, in
79     which case fido_cbor_info_free() is a NOP.
80
81     The fido_dev_get_cbor_info() function transmits a CTAP_CBOR_GETINFO com‐
82     mand to dev and fills ci with attributes retrieved from the command's re‐
83     sponse.  The fido_dev_get_cbor_info() function may block.
84
85     The fido_cbor_info_aaguid_ptr(), fido_cbor_info_extensions_ptr(),
86     fido_cbor_info_protocols_ptr(), and fido_cbor_info_versions_ptr() func‐
87     tions return pointers to the authenticator attestation GUID, supported
88     extensions, PIN protocol and CTAP version strings of ci.  The correspond‐
89     ing length of a given attribute can be obtained by
90     fido_cbor_info_aaguid_len(), fido_cbor_info_extensions_len(),
91     fido_cbor_info_protocols_len(), or fido_cbor_info_versions_len().
92
93     The fido_cbor_info_options_name_ptr() and
94     fido_cbor_info_options_value_ptr() functions return pointers to the array
95     of option names and their respective values in ci.  The length of the op‐
96     tions array is returned by fido_cbor_info_options_len().
97
98     The fido_cbor_info_maxmsgsiz() function returns the maximum message size
99     attribute of ci.
100
101     The fido_cbor_info_maxcredcntlst() function returns the maximum supported
102     number of credentials in a single credential ID list as reported in ci.
103
104     The fido_cbor_info_maxcredidlen() function returns the maximum supported
105     length of a credential ID as reported in ci.
106
107     The fido_cbor_info_fwversion() function returns the firmware version at‐
108     tribute of ci.
109
110     A complete example of how to use these functions can be found in the
111     example/info.c file shipped with libfido2.
112

RETURN VALUES

114     The fido_cbor_info_aaguid_ptr(), fido_cbor_info_extensions_ptr(),
115     fido_cbor_info_protocols_ptr(), fido_cbor_info_versions_ptr(),
116     fido_cbor_info_options_name_ptr(), and fido_cbor_info_options_value_ptr()
117     functions return NULL if the respective field in ci is absent.  If not
118     NULL, returned pointers are guaranteed to exist until any API function
119     that takes ci without the const qualifier is invoked.
120

SEE ALSO

122     fido_dev_open(3)
123
124BSD                              May 24, 2018                              BSD
Impressum