FIDO\_DEV\_GET\_ASSERT(3) Library Functions Manual FIDO\_DEV\_GET\_ASSERT(3)

# [NAME](#NAME)

`fido_dev_get_assert` — obtains an assertion from a FIDO2 device

# [SYNOPSIS](#SYNOPSIS)

`#include <fido.h>`

`int`  
`fido_dev_get_assert`(`fido_dev_t *dev`, `fido_assert_t *assert`, `const char *pin`);

# [DESCRIPTION](#DESCRIPTION)

The [`fido_dev_get_assert`](#fido_dev_get_assert)() function asks the FIDO2 device represented by `dev` for an assertion according to the following parameters defined in `assert`:

- `relying party ID`;
- `client data hash`;
- `list of allowed credential IDs`;
- `user presence and user verification attributes`.

See [fido\_assert\_set\_authdata(3)](/man/os/libfido2/fido_assert_set_authdata.3) for information on how these values are set.

If a PIN is not needed to authenticate the request against `dev`, then `pin` may be NULL. Otherwise `pin` must point to a NUL-terminated UTF-8 string.

After a successful call to [`fido_dev_get_assert`](#fido_dev_get_assert~2)(), the [fido\_assert\_count(3)](/man/os/libfido2/fido_assert_count.3), [fido\_assert\_user\_display\_name(3)](/man/os/libfido2/fido_assert_user_display_name.3), [fido\_assert\_user\_icon(3)](/man/os/libfido2/fido_assert_user_icon.3), [fido\_assert\_user\_name(3)](/man/os/libfido2/fido_assert_user_name.3), [fido\_assert\_authdata\_ptr(3)](/man/os/libfido2/fido_assert_authdata_ptr.3), [fido\_assert\_user\_id\_ptr(3)](/man/os/libfido2/fido_assert_user_id_ptr.3), [fido\_assert\_sig\_ptr(3)](/man/os/libfido2/fido_assert_sig_ptr.3), and [fido\_assert\_sigcount(3)](/man/os/libfido2/fido_assert_sigcount.3) functions may be invoked on `assert` to retrieve the various attributes of the generated assertion.

Please note that [`fido_dev_get_assert`](#fido_dev_get_assert~3)() is synchronous and will block if necessary.

# [RETURN VALUES](#RETURN_VALUES)

The error codes returned by `fido_dev_get_assert`() are defined in `<fido/err.h>`. On success, `FIDO_OK` is returned.

# [SEE ALSO](#SEE_ALSO)

[fido\_assert\_new(3)](/man/os/libfido2/fido_assert_new.3), [fido\_assert\_set\_authdata(3)](/man/os/libfido2/fido_assert_set_authdata.3)

May 24, 2018 Linux 4.19.0-gvisor

---

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