1FIDO_DEV_OPEN(3) BSD Library Functions Manual FIDO_DEV_OPEN(3)
2
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_protocol, fido_dev_build, fido_dev_flags,
7 fido_dev_major, fido_dev_minor — FIDO 2 device open/close and related
8 functions
9
11 #include <fido.h>
12
13 int
14 fido_dev_open(fido_dev_t *dev, const char *path);
15
16 int
17 fido_dev_close(fido_dev_t *dev);
18
19 int
20 fido_dev_cancel(fido_dev_t *dev);
21
22 fido_dev_t *
23 fido_dev_new(void);
24
25 void
26 fido_dev_free(fido_dev_t **dev_p);
27
28 void
29 fido_dev_force_fido2(fido_dev_t *dev);
30
31 void
32 fido_dev_force_u2f(fido_dev_t *dev);
33
34 bool
35 fido_dev_is_fido2(const fido_dev_t *dev);
36
37 uint8_t
38 fido_dev_protocol(const fido_dev_t *dev);
39
40 uint8_t
41 fido_dev_build(const fido_dev_t *dev);
42
43 uint8_t
44 fido_dev_flags(const fido_dev_t *dev);
45
46 uint8_t
47 fido_dev_major(const fido_dev_t *dev);
48
49 uint8_t
50 fido_dev_minor(const fido_dev_t *dev);
51
53 The fido_dev_open() function opens the device pointed to by path, where
54 dev is a freshly allocated or otherwise closed fido_dev_t.
55
56 The fido_dev_close() function closes the device represented by dev. If
57 dev is already closed, fido_dev_close() is a NOP.
58
59 The fido_dev_cancel() function cancels any pending requests on dev.
60
61 The fido_dev_new() function returns a pointer to a newly allocated, empty
62 fido_dev_t. If memory cannot be allocated, NULL is returned.
63
64 The fido_dev_free() function releases the memory backing *dev_p, where
65 *dev_p must have been previously allocated by fido_dev_new(). On return,
66 *dev_p is set to NULL. Either dev_p or *dev_p may be NULL, in which case
67 fido_dev_free() is a NOP.
68
69 The fido_dev_force_fido2() function can be used to force CTAP2 communica‐
70 tion with dev.
71
72 The fido_dev_force_u2f() function can be used to force CTAP1 (U2F) commu‐
73 nication with dev.
74
75 The fido_dev_is_fido2() function returns true if dev is a FIDO 2 device.
76
77 The fido_dev_protocol() function returns the CTAPHID protocol version
78 identifier of dev.
79
80 The fido_dev_build() function returns the CTAPHID build version number of
81 dev.
82
83 The fido_dev_flags() function returns the CTAPHID capabilities flags of
84 dev.
85
86 The fido_dev_major() function returns the CTAPHID major version number of
87 dev.
88
89 The fido_dev_minor() function returns the CTAPHID minor version number of
90 dev.
91
92 For the format and meaning of the CTAPHID parameters returned by func‐
93 tions above, please refer to the FIDO Client to Authenticator Protocol
94 (CTAP) specification.
95
97 On success, fido_dev_open() and fido_dev_close() return FIDO_OK. On
98 error, a different error code defined in <fido/err.h> is returned.
99
101 fido_dev_info_manifest(3), fido_dev_set_io_functions(3)
102
103BSD May 10, 2020 BSD