FIDO\_INIT(3) Library Functions Manual FIDO\_INIT(3)

# [NAME](#NAME)

`fido_init`, `fido_set_log_handler` — initialise the FIDO2 library

# [SYNOPSIS](#SYNOPSIS)

`#include <fido.h>`

```
typedef void fido_log_handler_t(const char *);
```

`void`  
`fido_init`(`int flags`);

`void`  
`fido_set_log_handler`(`fido_log_handler_t *handler`);

# [DESCRIPTION](#DESCRIPTION)

The [`fido_init`](#fido_init)() function initialises the *libfido2* library. Its invocation must precede that of any other *libfido2* function in the context of the executing thread.

If `FIDO_DEBUG` is set in `flags`, then debug output will be emitted by *libfido2* on *stderr*. Alternatively, the `FIDO_DEBUG` environment variable may be set.

If `FIDO_DISABLE_U2F_FALLBACK` is set in `flags`, then *libfido2* will not fallback to U2F in [fido\_dev\_open(3)](/man/os/libfido2/fido_dev_open.3) if a device claims to support FIDO2 but fails to respond to a CTAP 2.0 greeting.

The [`fido_set_log_handler`](#fido_set_log_handler)() function causes `handler` to be called for each log line generated in the context of the executing thread. Lines passed to `handler` include a trailing newline character and are not printed by *libfido2* on *stderr*.

# [SEE ALSO](#SEE_ALSO)

[fido\_assert\_new(3)](/man/os/libfido2/fido_assert_new.3), [fido\_cred\_new(3)](/man/os/libfido2/fido_cred_new.3), [fido\_dev\_info\_manifest(3)](/man/os/libfido2/fido_dev_info_manifest.3), [fido\_dev\_open(3)](/man/os/libfido2/fido_dev_open.3)

May 25, 2018 Linux 4.19.0-gvisor

---

Document: fido_set_log_handler(3) from libfido2 1.17.0-r7 (Chainguard OS)
Source: https://github.com/Yubico/libfido2
