---
name: "fido_dev_get_assert"
section: "3"
platform: "linux"
package: "libfido2"
version: "1.17.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/fido_dev_get_assert"
---

# fido\_dev\_get\_assert(3)

obtains an assertion from a FIDO2 device

## NAME

**fido\_dev\_get\_assert** – obtains an assertion from a FIDO2 device

## SYNOPSIS

**#include \<fido.h\>**

*int*\

**fido\_dev\_get\_assert**(*fido\_dev\_t \*dev*, *fido\_assert\_t \*assert*, *const char \*pin*);

## DESCRIPTION

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)](/fido_assert_set_authdata/3.md) 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_count/3.md), [fido\_assert\_user\_display\_name(3)](/fido_assert_user_display_name/3.md), [fido\_assert\_user\_icon(3)](/fido_assert_user_icon/3.md), [fido\_assert\_user\_name(3)](/fido_assert_user_name/3.md), [fido\_assert\_authdata\_ptr(3)](/fido_assert_authdata_ptr/3.md), [fido\_assert\_user\_id\_ptr(3)](/fido_assert_user_id_ptr/3.md), [fido\_assert\_sig\_ptr(3)](/fido_assert_sig_ptr/3.md), and [fido\_assert\_sigcount(3)](/fido_assert_sigcount/3.md) 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.

## SEE ALSO

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