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

NAME

4     fido_dev_open, fido_dev_open_with_info, fido_dev_close, fido_dev_cancel,
5     fido_dev_new, fido_dev_new_with_info, fido_dev_free,
6     fido_dev_force_fido2, fido_dev_force_u2f, fido_dev_is_fido2,
7     fido_dev_is_winhello, fido_dev_supports_credman,
8     fido_dev_supports_cred_prot, fido_dev_supports_permissions,
9     fido_dev_supports_pin, fido_dev_supports_uv, fido_dev_has_pin,
10     fido_dev_has_uv, fido_dev_protocol, fido_dev_build, fido_dev_flags,
11     fido_dev_major, fido_dev_minor — FIDO2 device open/close and related
12     functions
13

SYNOPSIS

15     #include <fido.h>
16
17     int
18     fido_dev_open(fido_dev_t *dev, const char *path);
19
20     int
21     fido_dev_open_with_info(fido_dev_t *dev);
22
23     int
24     fido_dev_close(fido_dev_t *dev);
25
26     int
27     fido_dev_cancel(fido_dev_t *dev);
28
29     fido_dev_t *
30     fido_dev_new(void);
31
32     fido_dev_t *
33     fido_dev_new_with_info(const fido_dev_info_t *);
34
35     void
36     fido_dev_free(fido_dev_t **dev_p);
37
38     void
39     fido_dev_force_fido2(fido_dev_t *dev);
40
41     void
42     fido_dev_force_u2f(fido_dev_t *dev);
43
44     bool
45     fido_dev_is_fido2(const fido_dev_t *dev);
46
47     bool
48     fido_dev_is_winhello(const fido_dev_t *dev);
49
50     bool
51     fido_dev_supports_credman(const fido_dev_t *dev);
52
53     bool
54     fido_dev_supports_cred_prot(const fido_dev_t *dev);
55
56     bool
57     fido_dev_supports_permissions(const fido_dev_t *dev);
58
59     bool
60     fido_dev_supports_pin(const fido_dev_t *dev);
61
62     bool
63     fido_dev_supports_uv(const fido_dev_t *dev);
64
65     bool
66     fido_dev_has_pin(const fido_dev_t *dev);
67
68     bool
69     fido_dev_has_uv(const fido_dev_t *dev);
70
71     uint8_t
72     fido_dev_protocol(const fido_dev_t *dev);
73
74     uint8_t
75     fido_dev_build(const fido_dev_t *dev);
76
77     uint8_t
78     fido_dev_flags(const fido_dev_t *dev);
79
80     uint8_t
81     fido_dev_major(const fido_dev_t *dev);
82
83     uint8_t
84     fido_dev_minor(const fido_dev_t *dev);
85

DESCRIPTION

87     The fido_dev_open() function opens the device pointed to by path, where
88     dev is a freshly allocated or otherwise closed fido_dev_t.  If dev claims
89     to be FIDO2, libfido2 will attempt to speak FIDO2 to dev.  If that fails,
90     libfido2 will fallback to U2F unless the FIDO_DISABLE_U2F_FALLBACK flag
91     was set in fido_init(3).
92
93     The fido_dev_open_with_info() function opens dev as previously allocated
94     using fido_dev_new_with_info().
95
96     The fido_dev_close() function closes the device represented by dev.  If
97     dev is already closed, fido_dev_close() is a NOP.
98
99     The fido_dev_cancel() function cancels any pending requests on dev.
100
101     The fido_dev_new() function returns a pointer to a newly allocated, empty
102     fido_dev_t.  If memory cannot be allocated, NULL is returned.
103
104     The fido_dev_new_with_info() function returns a pointer to a newly allo‐
105     cated fido_dev_t with fido_dev_info_t parameters, for use with
106     fido_dev_info_manifest(3) and fido_dev_open_with_info().  If memory can‐
107     not be allocated, NULL is returned.
108
109     The fido_dev_free() function releases the memory backing *dev_p, where
110     *dev_p must have been previously allocated by fido_dev_new().  On return,
111     *dev_p is set to NULL.  Either dev_p or *dev_p may be NULL, in which case
112     fido_dev_free() is a NOP.
113
114     The fido_dev_force_fido2() function can be used to force CTAP2 communica‐
115     tion with dev, where dev is an open device.
116
117     The fido_dev_force_u2f() function can be used to force CTAP1 (U2F) commu‐
118     nication with dev, where dev is an open device.
119
120     The fido_dev_is_fido2() function returns true if dev is a FIDO2 device.
121
122     The fido_dev_is_winhello() function returns true if dev is a Windows
123     Hello device.
124
125     The fido_dev_supports_credman() function returns true if dev supports
126     CTAP 2.1 Credential Management.
127
128     The fido_dev_supports_cred_prot() function returns true if dev supports
129     CTAP 2.1 Credential Protection.
130
131     The fido_dev_supports_permissions() function returns true if dev supports
132     CTAP 2.1 UV token permissions.
133
134     The fido_dev_supports_pin() function returns true if dev supports CTAP
135     2.0 Client PINs.
136
137     The fido_dev_supports_uv() function returns true if dev supports a built-
138     in user verification method.
139
140     The fido_dev_has_pin() function returns true if dev has a CTAP 2.0 Client
141     PIN set.
142
143     The fido_dev_has_uv() function returns true if dev supports built-in user
144     verification and its user verification feature is configured.
145
146     The fido_dev_protocol() function returns the CTAPHID protocol version
147     identifier of dev.
148
149     The fido_dev_build() function returns the CTAPHID build version number of
150     dev.
151
152     The fido_dev_flags() function returns the CTAPHID capabilities flags of
153     dev.
154
155     The fido_dev_major() function returns the CTAPHID major version number of
156     dev.
157
158     The fido_dev_minor() function returns the CTAPHID minor version number of
159     dev.
160
161     For the format and meaning of the CTAPHID parameters returned by func‐
162     tions above, please refer to the FIDO Client to Authenticator Protocol
163     (CTAP) specification.
164

RETURN VALUES

166     On success, fido_dev_open(), fido_dev_open_with_info(), and
167     fido_dev_close() return FIDO_OK.  On error, a different error code de‐
168     fined in <fido/err.h> is returned.
169

SEE ALSO

171     fido_dev_info_manifest(3), fido_dev_set_io_functions(3), fido_init(3)
172
173BSD                              May 25, 2018                              BSD
Impressum