FIDO\_CRED\_EXCLUDE(3) Library Functions Manual FIDO\_CRED\_EXCLUDE(3)

# [NAME](#NAME)

`fido_cred_exclude`, `fido_cred_empty_exclude_list` — manage exclude lists in a FIDO2 credential

# [SYNOPSIS](#SYNOPSIS)

`#include <fido.h>`

`int`  
`fido_cred_exclude`(`fido_cred_t *cred`, `const unsigned char *ptr`, `size_t len`);

`int`  
`fido_cred_empty_exclude_list`(`fido_cred_t *cred`);

# [DESCRIPTION](#DESCRIPTION)

The [`fido_cred_exclude`](#fido_cred_exclude)() function adds `ptr` to the list of credentials excluded by `cred`, where `ptr` points to a credential ID of `len` bytes. A copy of `ptr` is made, and no references to the passed pointer are kept. If `fido_cred_exclude`() fails, the existing list of excluded credentials is preserved.

If `fido_cred_exclude` returns success and `cred` is later passed to [fido\_dev\_make\_cred(3)](/man/os/libfido2/fido_dev_make_cred.3) on a device that contains the credential denoted by `ptr`, then [fido\_dev\_make\_cred(3)](/man/os/libfido2/fido_dev_make_cred.3) will fail.

For the format of a FIDO2 credential ID, please refer to the Web Authentication (webauthn) standard.

The [`fido_cred_empty_exclude_list`](#fido_cred_empty_exclude_list)() function empties the list of credentials excluded by `cred`.

# [RETURN VALUES](#RETURN_VALUES)

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

# [SEE ALSO](#SEE_ALSO)

[fido\_cred\_new(3)](/man/os/libfido2/fido_cred_new.3), [fido\_cred\_set\_authdata(3)](/man/os/libfido2/fido_cred_set_authdata.3), [fido\_dev\_make\_cred(3)](/man/os/libfido2/fido_dev_make_cred.3)

December 2, 2022 Linux 4.19.0-gvisor

---

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