1.\" Copyright (c) 2018 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: May 25 2018 $ 6.Dt FIDO_INIT 3 7.Os 8.Sh NAME 9.Nm fido_init , 10.Nm fido_set_log_handler 11.Nd initialise the FIDO2 library 12.Sh SYNOPSIS 13.In fido.h 14.Bd -literal 15typedef void fido_log_handler_t(const char *); 16.Ed 17.Pp 18.Ft void 19.Fn fido_init "int flags" 20.Ft void 21.Fn fido_set_log_handler "fido_log_handler_t *handler" 22.Sh DESCRIPTION 23The 24.Fn fido_init 25function initialises the 26.Em libfido2 27library. 28Its invocation must precede that of any other 29.Em libfido2 30function in the context of the executing thread. 31.Pp 32If 33.Dv FIDO_DEBUG 34is set in 35.Fa flags , 36then 37debug output will be emitted by 38.Em libfido2 39on 40.Em stderr . 41Alternatively, the 42.Ev FIDO_DEBUG 43environment variable may be set. 44.Pp 45If 46.Dv FIDO_DISABLE_U2F_FALLBACK 47is set in 48.Fa flags , 49then 50.Em libfido2 51will not fallback to U2F in 52.Xr fido_dev_open 3 53if a device claims to support FIDO2 but fails to respond to 54a CTAP 2.0 greeting. 55.Pp 56The 57.Fn fido_set_log_handler 58function causes 59.Fa handler 60to be called for each log line generated in the context of the 61executing thread. 62Lines passed to 63.Fa handler 64include a trailing newline character and are not printed by 65.Em libfido2 66on 67.Em stderr . 68.Sh SEE ALSO 69.Xr fido_assert_new 3 , 70.Xr fido_cred_new 3 , 71.Xr fido_dev_info_manifest 3 , 72.Xr fido_dev_open 3 73