]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/libfido2/man/fido_init.3
libfido2: update to 1.13.0
[FreeBSD/FreeBSD.git] / contrib / libfido2 / man / fido_init.3
1 .\" Copyright (c) 2018 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: May 25 2018 $
29 .Dt FIDO_INIT 3
30 .Os
31 .Sh NAME
32 .Nm fido_init ,
33 .Nm fido_set_log_handler
34 .Nd initialise the FIDO2 library
35 .Sh SYNOPSIS
36 .In fido.h
37 .Bd -literal
38 typedef void fido_log_handler_t(const char *);
39 .Ed
40 .Pp
41 .Ft void
42 .Fn fido_init "int flags"
43 .Ft void
44 .Fn fido_set_log_handler "fido_log_handler_t *handler"
45 .Sh DESCRIPTION
46 The
47 .Fn fido_init
48 function initialises the
49 .Em libfido2
50 library.
51 Its invocation must precede that of any other
52 .Em libfido2
53 function in the context of the executing thread.
54 .Pp
55 If
56 .Dv FIDO_DEBUG
57 is set in
58 .Fa flags ,
59 then
60 debug output will be emitted by
61 .Em libfido2
62 on
63 .Em stderr .
64 Alternatively, the
65 .Ev FIDO_DEBUG
66 environment variable may be set.
67 .Pp
68 If
69 .Dv FIDO_DISABLE_U2F_FALLBACK
70 is set in
71 .Fa flags ,
72 then
73 .Em libfido2
74 will not fallback to U2F in
75 .Xr fido_dev_open 3
76 if a device claims to support FIDO2 but fails to respond to
77 a CTAP 2.0 greeting.
78 .Pp
79 The
80 .Fn fido_set_log_handler
81 function causes
82 .Fa handler
83 to be called for each log line generated in the context of the
84 executing thread.
85 Lines passed to
86 .Fa handler
87 include a trailing newline character and are not printed by
88 .Em libfido2
89 on
90 .Em stderr .
91 .Sh SEE ALSO
92 .Xr fido_assert_new 3 ,
93 .Xr fido_cred_new 3 ,
94 .Xr fido_dev_info_manifest 3 ,
95 .Xr fido_dev_open 3