1FIDO_BIO_TEMPLATE(3) BSD Library Functions Manual FIDO_BIO_TEMPLATE(3)
2
4 fido_bio_template, fido_bio_template_array_count,
5 fido_bio_template_array_free, fido_bio_template_array_new,
6 fido_bio_template_free, fido_bio_template_id_len,
7 fido_bio_template_id_ptr, fido_bio_template_name, fido_bio_template_new,
8 fido_bio_template_set_id, fido_bio_template_set_name — FIDO 2 biometric
9 template API
10
12 #include <fido.h>
13 #include <fido/bio.h>
14
15 fido_bio_template_t *
16 fido_bio_template_new(void);
17
18 void
19 fido_bio_template_free(fido_bio_template_t **template_p);
20
21 const char *
22 fido_bio_template_name(const fido_bio_template_t *template);
23
24 const unsigned char *
25 fido_bio_template_id_ptr(const fido_bio_template_t *template);
26
27 size_t
28 fido_bio_template_id_len(const fido_bio_template_t *template);
29
30 int
31 fido_bio_template_set_id(fido_bio_template_t *template,
32 const unsigned char *ptr, size_t len);
33
34 int
35 fido_bio_template_set_name(fido_bio_template_t *template,
36 const char *name);
37
38 fido_bio_template_array_t *
39 fido_bio_template_array_new(void);
40
41 void
42 fido_bio_template_array_free(fido_bio_template_array_t **array_p);
43
44 size_t
45 fido_bio_template_array_count(const fido_bio_template_array_t *array);
46
47 const fido_bio_template_t *
48 fido_bio_template(const fido_bio_template_array_t *array, size_t idx);
49
51 Existing FIDO 2 biometric enrollments are abstracted in libfido2 by the
52 fido_bio_template_t and fido_bio_template_array_t types.
53
54 The functions described in this page allow a fido_bio_template_t type to
55 be allocated, deallocated, changed, and inspected, and a
56 fido_bio_template_array_t type to be allocated, deallocated, and in‐
57 spected. For device operations on fido_bio_template_t and
58 fido_bio_template_array_t, please refer to fido_bio_dev_get_info(3).
59
60 The fido_bio_template_new() function returns a pointer to a newly allo‐
61 cated, empty fido_bio_template_t type. If memory cannot be allocated,
62 NULL is returned.
63
64 The fido_bio_template_free() function releases the memory backing
65 *template_p, where *template_p must have been previously allocated by
66 fido_bio_template_new(). On return, *template_p is set to NULL. Either
67 template_p or *template_p may be NULL, in which case
68 fido_bio_template_free() is a NOP.
69
70 The fido_bio_template_name() function returns a pointer to a NUL-termi‐
71 nated string containing the friendly name of template, or NULL if
72 template does not have a friendly name set.
73
74 The fido_bio_template_id_ptr() function returns a pointer to the template
75 id of template, or NULL if template does not have an id. The correspond‐
76 ing length can be obtained by fido_bio_template_id_len().
77
78 The fido_bio_template_set_name() function sets the friendly name of
79 template to name. If name is NULL, the friendly name of template is un‐
80 set.
81
82 The fido_bio_template_array_new() function returns a pointer to a newly
83 allocated, empty fido_bio_template_array_t type. If memory cannot be al‐
84 located, NULL is returned.
85
86 The fido_bio_template_array_free() function releases the memory backing
87 *array_p, where *array_p must have been previously allocated by
88 fido_bio_template_array_new(). On return, *array_p is set to NULL. Ei‐
89 ther array_p or *array_p may be NULL, in which case
90 fido_bio_template_array_free() is a NOP.
91
92 The fido_bio_template_array_count() function returns the number of tem‐
93 plates in array.
94
95 The fido_bio_template() function returns a pointer to the template at in‐
96 dex idx in array. Please note that the first template in array has an
97 idx (index) value of 0.
98
100 The error codes returned by fido_bio_template_set_id() and
101 fido_bio_template_set_name() are defined in <fido/err.h>. On success,
102 FIDO_OK is returned.
103
105 fido_bio_dev_get_info(3), fido_bio_enroll_new(3)
106
107BSD September 13, 2019 BSD