---
name: "fido_cred_verify"
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_verify"
---

# fido\_cred\_verify(3)

verify the attestation signature of a FIDO2 credential

## NAME

**fido\_cred\_verify**, **fido\_cred\_verify\_self** – verify the attestation signature of a FIDO2 credential

## SYNOPSIS

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

*int*\

**fido\_cred\_verify**(*const fido\_cred\_t \*cred*);

*int*\

**fido\_cred\_verify\_self**(*const fido\_cred\_t \*cred*);

## DESCRIPTION

The **fido\_cred\_verify**() and **fido\_cred\_verify\_self**() functions verify whether the attestation signature contained in *cred* matches the attributes of the credential. Before using **fido\_cred\_verify**() or **fido\_cred\_verify\_self**() in a sensitive context, the reader is strongly encouraged to make herself familiar with the FIDO2 credential attestation process as defined in the Web Authentication (webauthn) standard.

The **fido\_cred\_verify**() function verifies whether the client data hash, relying party ID, credential ID, type, protection policy, minimum PIN length, and resident/discoverable key and user verification attributes of *cred* have been attested by the holder of the private counterpart of the public key contained in the credential's x509 certificate.

Please note that the x509 certificate itself is not verified.

The attestation statement formats supported by **fido\_cred\_verify**() are *packed*, *fido-u2f*, and *tpm*. The attestation type implemented by **fido\_cred\_verify**() is *Basic* *Attestation*.

The **fido\_cred\_verify\_self**() function verifies whether the client data hash, relying party ID, credential ID, type, protection policy, minimum PIN length, and resident/discoverable key and user verification attributes of *cred* have been attested by the holder of the credential's private key.

The attestation statement formats supported by **fido\_cred\_verify\_self**() are *packed* and *fido-u2f*. The attestation type implemented by **fido\_cred\_verify\_self**() is *Self* *Attestation*.

Other attestation formats and types are not supported.

## RETURN VALUES

The error codes returned by **fido\_cred\_verify**() and **fido\_cred\_verify\_self**() are defined in ⟨fido/err.h⟩. If *cred* passes verification, then 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)
