fido_dev_get_assert(3)

fido_dev_get_assert3

Obtains an assertion from a fido2 device

Usage

#include <fido.h>

int

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

Overview

The 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) 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(), the fido_assert_count(3), fido_assert_user_display_name(3), fido_assert_user_icon(3), fido_assert_user_name(3), fido_assert_authdata_ptr(3), fido_assert_user_id_ptr(3), fido_assert_sig_ptr(3), and 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() is synchronous and will block if necessary.

Return values

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

Releases

4 releases since Debian 11 (Bullseye); the text changed 1 time.

  1. 11
  2. 12–Arch

From libfido2 1.17.0-1 in Arch Linux 2026-11-01. Parsed by carta from the page's mdoc source.