10afa8e06SEd Maste.\" Copyright (c) 2018 Yubico AB. All rights reserved. 2*2ccfa855SEd Maste.\" 3*2ccfa855SEd Maste.\" Redistribution and use in source and binary forms, with or without 4*2ccfa855SEd Maste.\" modification, are permitted provided that the following conditions are 5*2ccfa855SEd Maste.\" met: 6*2ccfa855SEd Maste.\" 7*2ccfa855SEd Maste.\" 1. Redistributions of source code must retain the above copyright 8*2ccfa855SEd Maste.\" notice, this list of conditions and the following disclaimer. 9*2ccfa855SEd Maste.\" 2. Redistributions in binary form must reproduce the above copyright 10*2ccfa855SEd Maste.\" notice, this list of conditions and the following disclaimer in 11*2ccfa855SEd Maste.\" the documentation and/or other materials provided with the 12*2ccfa855SEd Maste.\" distribution. 13*2ccfa855SEd Maste.\" 14*2ccfa855SEd Maste.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 15*2ccfa855SEd Maste.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 16*2ccfa855SEd Maste.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 17*2ccfa855SEd Maste.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 18*2ccfa855SEd Maste.\" HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 19*2ccfa855SEd Maste.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20*2ccfa855SEd Maste.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21*2ccfa855SEd Maste.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22*2ccfa855SEd Maste.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23*2ccfa855SEd Maste.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 24*2ccfa855SEd Maste.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25*2ccfa855SEd Maste.\" 26*2ccfa855SEd Maste.\" SPDX-License-Identifier: BSD-2-Clause 270afa8e06SEd Maste.\" 280afa8e06SEd Maste.Dd $Mdocdate: May 25 2018 $ 290afa8e06SEd Maste.Dt FIDO_INIT 3 300afa8e06SEd Maste.Os 310afa8e06SEd Maste.Sh NAME 323e696dfbSEd Maste.Nm fido_init , 333e696dfbSEd Maste.Nm fido_set_log_handler 340afa8e06SEd Maste.Nd initialise the FIDO2 library 350afa8e06SEd Maste.Sh SYNOPSIS 360afa8e06SEd Maste.In fido.h 373e696dfbSEd Maste.Bd -literal 383e696dfbSEd Mastetypedef void fido_log_handler_t(const char *); 393e696dfbSEd Maste.Ed 403e696dfbSEd Maste.Pp 410afa8e06SEd Maste.Ft void 420afa8e06SEd Maste.Fn fido_init "int flags" 433e696dfbSEd Maste.Ft void 443e696dfbSEd Maste.Fn fido_set_log_handler "fido_log_handler_t *handler" 450afa8e06SEd Maste.Sh DESCRIPTION 460afa8e06SEd MasteThe 470afa8e06SEd Maste.Fn fido_init 480afa8e06SEd Mastefunction initialises the 490afa8e06SEd Maste.Em libfido2 500afa8e06SEd Mastelibrary. 510afa8e06SEd MasteIts invocation must precede that of any other 520afa8e06SEd Maste.Em libfido2 530afa8e06SEd Mastefunction in the context of the executing thread. 540afa8e06SEd Maste.Pp 550afa8e06SEd MasteIf 560afa8e06SEd Maste.Dv FIDO_DEBUG 570afa8e06SEd Masteis set in 580afa8e06SEd Maste.Fa flags , 590afa8e06SEd Mastethen 600afa8e06SEd Mastedebug output will be emitted by 610afa8e06SEd Maste.Em libfido2 620afa8e06SEd Masteon 630afa8e06SEd Maste.Em stderr . 640afa8e06SEd MasteAlternatively, the 650afa8e06SEd Maste.Ev FIDO_DEBUG 660afa8e06SEd Masteenvironment variable may be set. 670afa8e06SEd Maste.Pp 680afa8e06SEd MasteIf 690afa8e06SEd Maste.Dv FIDO_DISABLE_U2F_FALLBACK 700afa8e06SEd Masteis set in 710afa8e06SEd Maste.Fa flags , 720afa8e06SEd Mastethen 730afa8e06SEd Maste.Em libfido2 740afa8e06SEd Mastewill not fallback to U2F in 750afa8e06SEd Maste.Xr fido_dev_open 3 763e696dfbSEd Masteif a device claims to support FIDO2 but fails to respond to 773e696dfbSEd Mastea CTAP 2.0 greeting. 783e696dfbSEd Maste.Pp 793e696dfbSEd MasteThe 803e696dfbSEd Maste.Fn fido_set_log_handler 813e696dfbSEd Mastefunction causes 823e696dfbSEd Maste.Fa handler 833e696dfbSEd Masteto be called for each log line generated in the context of the 843e696dfbSEd Masteexecuting thread. 853e696dfbSEd MasteLines passed to 863e696dfbSEd Maste.Fa handler 873e696dfbSEd Masteinclude a trailing newline character and are not printed by 883e696dfbSEd Maste.Em libfido2 893e696dfbSEd Masteon 903e696dfbSEd Maste.Em stderr . 910afa8e06SEd Maste.Sh SEE ALSO 920afa8e06SEd Maste.Xr fido_assert_new 3 , 930afa8e06SEd Maste.Xr fido_cred_new 3 , 940afa8e06SEd Maste.Xr fido_dev_info_manifest 3 , 950afa8e06SEd Maste.Xr fido_dev_open 3 96