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

NAME

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

SYNOPSIS

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

DESCRIPTION

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

RETURN VALUES

144     On success, fido_dev_open() and fido_dev_close() return FIDO_OK.  On er‐
145     ror, a different error code defined in <fido/err.h> is returned.
146

SEE ALSO

148     fido_dev_info_manifest(3), fido_dev_set_io_functions(3), fido_init(3)
149
150BSD                              May 25, 2018                              BSD
Impressum