Debian Codegraph @

extra/libfido2/libfido2-1.15.0/man/fido_bio_enroll_new.3

raw
1 .\" Copyright (c) 2019 Yubico AB. All rights reserved.
2 .\"
3 .\" Redistribution and use in source and binary forms, with or without
4 .\" modification, are permitted provided that the following conditions are
5 .\" met:
6 .\"
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in
11 .\" the documentation and/or other materials provided with the
12 .\" distribution.
13 .\"
14 .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
15 .\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
16 .\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
17 .\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
18 .\" HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19 .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
20 .\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24 .\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 .\"
26 .\" SPDX-License-Identifier: BSD-2-Clause
27 .\"
28 .Dd $Mdocdate: September 13 2019 $
29 .Dt FIDO_BIO_ENROLL_NEW 3
30 .Os
31 .Sh NAME
32 .Nm fido_bio_enroll_new ,
33 .Nm fido_bio_enroll_free ,
34 .Nm fido_bio_enroll_last_status ,
35 .Nm fido_bio_enroll_remaining_samples
36 .Nd FIDO2 biometric enrollment API
37 .Sh SYNOPSIS
38 .In fido.h
39 .In fido/bio.h
40 .Bd -literal
41 #define FIDO_BIO_ENROLL_FP_GOOD 0x00
42 #define FIDO_BIO_ENROLL_FP_TOO_HIGH 0x01
43 #define FIDO_BIO_ENROLL_FP_TOO_LOW 0x02
44 #define FIDO_BIO_ENROLL_FP_TOO_LEFT 0x03
45 #define FIDO_BIO_ENROLL_FP_TOO_RIGHT 0x04
46 #define FIDO_BIO_ENROLL_FP_TOO_FAST 0x05
47 #define FIDO_BIO_ENROLL_FP_TOO_SLOW 0x06
48 #define FIDO_BIO_ENROLL_FP_POOR_QUALITY 0x07
49 #define FIDO_BIO_ENROLL_FP_TOO_SKEWED 0x08
50 #define FIDO_BIO_ENROLL_FP_TOO_SHORT 0x09
51 #define FIDO_BIO_ENROLL_FP_MERGE_FAILURE 0x0a
52 #define FIDO_BIO_ENROLL_FP_EXISTS 0x0b
53 #define FIDO_BIO_ENROLL_FP_DATABASE_FULL 0x0c
54 #define FIDO_BIO_ENROLL_NO_USER_ACTIVITY 0x0d
55 #define FIDO_BIO_ENROLL_NO_USER_PRESENCE_TRANSITION 0x0e
56 .Ed
57 .Ft fido_bio_enroll_t *
58 .Fn fido_bio_enroll_new "void"
59 .Ft void
60 .Fn fido_bio_enroll_free "fido_bio_enroll_t **enroll_p"
61 .Ft uint8_t
62 .Fn fido_bio_enroll_last_status "const fido_bio_enroll_t *enroll"
63 .Ft uint8_t
64 .Fn fido_bio_enroll_remaining_samples "const fido_bio_enroll_t *enroll"
65 .Sh DESCRIPTION
66 Ongoing FIDO2 biometric enrollments are abstracted in
67 .Em libfido2
68 by the
69 .Vt fido_bio_enroll_t
70 type.
71 .Pp
72 The functions described in this page allow a
73 .Vt fido_bio_enroll_t
74 type to be allocated, deallocated, and inspected.
75 For device operations on
76 .Vt fido_bio_enroll_t ,
77 please refer to
78 .Xr fido_bio_dev_get_info 3 .
79 .Pp
80 The
81 .Fn fido_bio_enroll_new
82 function returns a pointer to a newly allocated, empty
83 .Vt fido_bio_enroll_t
84 type.
85 If memory cannot be allocated, NULL is returned.
86 .Pp
87 The
88 .Fn fido_bio_enroll_free
89 function releases the memory backing
90 .Fa *enroll_p ,
91 where
92 .Fa *enroll_p
93 must have been previously allocated by
94 .Fn fido_bio_enroll_new .
95 On return,
96 .Fa *enroll_p
97 is set to NULL.
98 Either
99 .Fa enroll_p
100 or
101 .Fa *enroll_p
102 may be NULL, in which case
103 .Fn fido_bio_enroll_free
104 is a NOP.
105 .Pp
106 The
107 .Fn fido_bio_enroll_last_status
108 function returns the enrollment status of
109 .Fa enroll .
110 .Pp
111 The
112 .Fn fido_bio_enroll_remaining_samples
113 function returns the number of samples left for
114 .Fa enroll
115 to complete.
116 .Sh SEE ALSO
117 .Xr fido_bio_dev_get_info 3 ,
118 .Xr fido_bio_template 3