---
name: "fido_cred_empty_exclude_list"
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_cred_exclude"
---

# fido\_cred\_empty\_exclude\_list(3)

manage exclude lists in a FIDO2 credential

Part of [fido\_cred\_exclude(3)](/fido_cred_exclude/3.md).

## NAME

**fido\_cred\_exclude**, **fido\_cred\_empty\_exclude\_list** – manage exclude lists in a FIDO2 credential

## 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

The **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)](/fido_dev_make_cred/3.md) on a device that contains the credential denoted by *ptr*, then [fido\_dev\_make\_cred(3)](/fido_dev_make_cred/3.md) will fail.

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

The **fido\_cred\_empty\_exclude\_list**() function empties the list of credentials excluded by *cred*.

## 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

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