xref: /freebsd/contrib/libfido2/man/fido_bio_info_new.3 (revision a57ca37dd1848cd42844d9082c4a74c2ed57f68a)
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_INFO_NEW 3
7.Os
8.Sh NAME
9.Nm fido_bio_info_new ,
10.Nm fido_bio_info_free ,
11.Nm fido_bio_info_type ,
12.Nm fido_bio_info_max_samples
13.Nd FIDO2 biometric sensor information API
14.Sh SYNOPSIS
15.In fido.h
16.In fido/bio.h
17.Ft fido_bio_info_t *
18.Fn fido_bio_info_new "void"
19.Ft void
20.Fn fido_bio_info_free "fido_bio_info_t **info_p"
21.Ft uint8_t
22.Fn fido_bio_info_type "const fido_bio_info_t *info"
23.Ft uint8_t
24.Fn fido_bio_info_max_samples "const fido_bio_info_t *info"
25.Sh DESCRIPTION
26Biometric sensor metadata is abstracted in
27.Em libfido2
28by the
29.Vt fido_bio_info_t
30type.
31.Pp
32The functions described in this page allow a
33.Vt fido_bio_info_t
34type to be allocated, deallocated, and inspected.
35For device operations on
36.Vt fido_bio_info_t ,
37please refer to
38.Xr fido_bio_dev_get_info 3 .
39.Pp
40The
41.Fn fido_bio_info_new
42function returns a pointer to a newly allocated, empty
43.Vt fido_bio_info_t
44type.
45If memory cannot be allocated, NULL is returned.
46.Pp
47The
48.Fn fido_bio_info_free
49function releases the memory backing
50.Fa *info_p ,
51where
52.Fa *info_p
53must have been previously allocated by
54.Fn fido_bio_info_new .
55On return,
56.Fa *info_p
57is set to NULL.
58Either
59.Fa info_p
60or
61.Fa *info_p
62may be NULL, in which case
63.Fn fido_bio_info_free
64is a NOP.
65.Pp
66The
67.Fn fido_bio_info_type
68function returns the fingerprint sensor type, which is
69.Dv 1
70for touch sensors, and
71.Dv 2
72for swipe sensors.
73.Pp
74The
75.Fn fido_bio_info_max_samples
76function returns the maximum number of successful samples
77required for enrollment.
78.Sh SEE ALSO
79.Xr fido_bio_dev_get_info 3 ,
80.Xr fido_bio_enroll_new 3 ,
81.Xr fido_bio_template 3
82