diff options
Diffstat (limited to 'man/fido_bio_template.3')
-rw-r--r-- | man/fido_bio_template.3 | 169 |
1 files changed, 169 insertions, 0 deletions
diff --git a/man/fido_bio_template.3 b/man/fido_bio_template.3 new file mode 100644 index 0000000..6140926 --- /dev/null +++ b/man/fido_bio_template.3 | |||
@@ -0,0 +1,169 @@ | |||
1 | .\" Copyright (c) 2019 Yubico AB. All rights reserved. | ||
2 | .\" Use of this source code is governed by a BSD-style | ||
3 | .\" license that can be found in the LICENSE file. | ||
4 | .\" | ||
5 | .Dd $Mdocdate: September 13 2019 $ | ||
6 | .Dt FIDO_BIO_TEMPLATE 3 | ||
7 | .Os | ||
8 | .Sh NAME | ||
9 | .Nm fido_bio_template , | ||
10 | .Nm fido_bio_template_array_count , | ||
11 | .Nm fido_bio_template_array_free , | ||
12 | .Nm fido_bio_template_array_new , | ||
13 | .Nm fido_bio_template_free , | ||
14 | .Nm fido_bio_template_id_len , | ||
15 | .Nm fido_bio_template_id_ptr , | ||
16 | .Nm fido_bio_template_name , | ||
17 | .Nm fido_bio_template_new , | ||
18 | .Nm fido_bio_template_set_id , | ||
19 | .Nm fido_bio_template_set_name | ||
20 | .Nd FIDO 2 biometric template API | ||
21 | .Sh SYNOPSIS | ||
22 | .In fido.h | ||
23 | .In fido/bio.h | ||
24 | .Ft fido_bio_template_t * | ||
25 | .Fn fido_bio_template_new "void" | ||
26 | .Ft void | ||
27 | .Fn fido_bio_template_free "fido_bio_template_t **template_p" | ||
28 | .Ft const char * | ||
29 | .Fn fido_bio_template_name "const fido_bio_template_t *template" | ||
30 | .Ft const unsigned char * | ||
31 | .Fn fido_bio_template_id_ptr "const fido_bio_template_t *template" | ||
32 | .Ft size_t | ||
33 | .Fn fido_bio_template_id_len "const fido_bio_template_t *template" | ||
34 | .Ft int | ||
35 | .Fn fido_bio_template_set_id "fido_bio_template_t *template" "const unsigned char *ptr" "size_t len" | ||
36 | .Ft int | ||
37 | .Fn fido_bio_template_set_name "fido_bio_template_t *template" "const char *name" | ||
38 | .Ft fido_bio_template_array_t * | ||
39 | .Fn fido_bio_template_array_new "void" | ||
40 | .Ft void | ||
41 | .Fn fido_bio_template_array_free "fido_bio_template_array_t **template_array_p" | ||
42 | .Ft size_t | ||
43 | .Fn fido_bio_template_array_count "const fido_bio_template_array_t *template_array" | ||
44 | .Ft const fido_bio_template_t * | ||
45 | .Fn fido_bio_template "const fido_bio_template_array_t *template_array" "size_t idx" | ||
46 | .Sh DESCRIPTION | ||
47 | Existing FIDO 2 biometric enrollments are abstracted in | ||
48 | .Em libfido2 | ||
49 | by the | ||
50 | .Vt fido_bio_template_t | ||
51 | and | ||
52 | .Vt fido_bio_template_array_t | ||
53 | types. | ||
54 | .Pp | ||
55 | The functions described in this page allow a | ||
56 | .Vt fido_bio_template_t | ||
57 | type to be allocated, deallocated, changed, and inspected, | ||
58 | and a | ||
59 | .Vt fido_bio_template_array_t | ||
60 | type to be allocated, deallocated, and inspected. | ||
61 | For device operations on | ||
62 | .Vt fido_bio_template_t | ||
63 | and | ||
64 | .Vt fido_bio_template_array_t , | ||
65 | please refer to | ||
66 | .Xr fido_bio_dev_get_info 3 . | ||
67 | .Pp | ||
68 | The | ||
69 | .Fn fido_bio_template_new | ||
70 | function returns a pointer to a newly allocated, empty | ||
71 | .Vt fido_bio_template_t | ||
72 | type. | ||
73 | If memory cannot be allocated, NULL is returned. | ||
74 | .Pp | ||
75 | The | ||
76 | .Fn fido_bio_template_free | ||
77 | function releases the memory backing | ||
78 | .Fa *template_p , | ||
79 | where | ||
80 | .Fa *template_p | ||
81 | must have been previously allocated by | ||
82 | .Fn fido_bio_template_new . | ||
83 | On return, | ||
84 | .Fa *template_p | ||
85 | is set to NULL. | ||
86 | Either | ||
87 | .Fa template_p | ||
88 | or | ||
89 | .Fa *template_p | ||
90 | may be NULL, in which case | ||
91 | .Fn fido_bio_template_free | ||
92 | is a NOP. | ||
93 | .Pp | ||
94 | The | ||
95 | .Fn fido_bio_template_name | ||
96 | function returns a pointer to a NUL-terminated string containing | ||
97 | the friendly name of | ||
98 | .Fa template , | ||
99 | or NULL if | ||
100 | .Fa template | ||
101 | does not have a friendly name set. | ||
102 | .Pp | ||
103 | The | ||
104 | .Fn fido_bio_template_id_ptr | ||
105 | function returns a pointer to the template id of | ||
106 | .Fa template , | ||
107 | or NULL if | ||
108 | .Fa template | ||
109 | does not have an id. | ||
110 | The corresponding length can be obtained by | ||
111 | .Fn fido_bio_template_id_len . | ||
112 | .Pp | ||
113 | The | ||
114 | .Fn fido_bio_template_set_name | ||
115 | function sets the friendly name of | ||
116 | .Fa template | ||
117 | to | ||
118 | .Fa name . | ||
119 | If | ||
120 | .Fa name | ||
121 | is NULL, the friendly name of | ||
122 | .Fa template | ||
123 | is unset. | ||
124 | .Pp | ||
125 | The | ||
126 | .Fn fido_bio_template_array_new | ||
127 | function returns a pointer to a newly allocated, empty | ||
128 | .Vt fido_bio_template_array_t | ||
129 | type. | ||
130 | If memory cannot be allocated, NULL is returned. | ||
131 | .Pp | ||
132 | The | ||
133 | .Fn fido_bio_template_array_free | ||
134 | function releases the memory backing | ||
135 | .Fa *template_array_p , | ||
136 | where | ||
137 | .Fa *template_array_p | ||
138 | must have been previously allocated by | ||
139 | .Fn fido_bio_template_array_new . | ||
140 | On return, | ||
141 | .Fa *template_array_p | ||
142 | is set to NULL. | ||
143 | Either | ||
144 | .Fa template_array_p | ||
145 | or | ||
146 | .Fa *template_array_p | ||
147 | may be NULL, in which case | ||
148 | .Fn fido_bio_template_array_free | ||
149 | is a NOP. | ||
150 | .Pp | ||
151 | The | ||
152 | .Fn fido_bio_template_array_count | ||
153 | function returns the number of templates in | ||
154 | .Fa template_array . | ||
155 | .Pp | ||
156 | The | ||
157 | .Fn fido_bio_template | ||
158 | function returns a pointer to the template at index | ||
159 | .Fa idx | ||
160 | in | ||
161 | .Fa template_array . | ||
162 | Please note that the first template in | ||
163 | .Fa template_array | ||
164 | has an | ||
165 | .Fa idx | ||
166 | (index) value of 0. | ||
167 | .Sh SEE ALSO | ||
168 | .Xr fido_bio_dev_get_info 3 , | ||
169 | .Xr fido_bio_enroll_new 3 | ||