---
name: "fido_dev_get_cbor_info"
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_cbor_info_new"
---

# fido\_dev\_get\_cbor\_info(3)

FIDO2 CBOR Info API

Part of [fido\_cbor\_info\_new(3)](/fido_cbor_info_new/3.md).

## NAME

**fido\_cbor\_info\_new**, **fido\_cbor\_info\_free**, **fido\_dev\_get\_cbor\_info**, **fido\_cbor\_info\_decrypt**, **fido\_cbor\_info\_aaguid\_ptr**, **fido\_cbor\_info\_attfmts\_ptr**, **fido\_cbor\_info\_encid\_ptr**, **fido\_cbor\_info\_id\_ptr**, **fido\_cbor\_info\_encstate\_ptr**, **fido\_cbor\_info\_state\_ptr**, **fido\_cbor\_info\_extensions\_ptr**, **fido\_cbor\_info\_pin\_policy\_url\_ptr**, **fido\_cbor\_info\_protocols\_ptr**, **fido\_cbor\_info\_reset\_transports\_ptr**, **fido\_cbor\_info\_transports\_ptr**, **fido\_cbor\_info\_versions\_ptr**, **fido\_cbor\_info\_options\_name\_ptr**, **fido\_cbor\_info\_options\_value\_ptr**, **fido\_cbor\_info\_algorithm\_type**, **fido\_cbor\_info\_algorithm\_cose**, **fido\_cbor\_info\_algorithm\_count**, **fido\_cbor\_info\_certs\_name\_ptr**, **fido\_cbor\_info\_certs\_value\_ptr**, **fido\_cbor\_info\_certs\_len**, **fido\_cbor\_info\_cfgcmds\_ptr**, **fido\_cbor\_info\_cfgcmds\_len**, **fido\_cbor\_info\_aaguid\_len**, **fido\_cbor\_info\_attfmts\_len**, **fido\_cbor\_info\_encid\_len**, **fido\_cbor\_info\_id\_len**, **fido\_cbor\_info\_encstate\_len**, **fido\_cbor\_info\_state\_len**, **fido\_cbor\_info\_extensions\_len**, **fido\_cbor\_info\_pin\_policy\_url\_len**, **fido\_cbor\_info\_protocols\_len**, **fido\_cbor\_info\_reset\_transports\_len**, **fido\_cbor\_info\_transports\_len**, **fido\_cbor\_info\_versions\_len**, **fido\_cbor\_info\_options\_len**, **fido\_cbor\_info\_long\_touch\_reset**, **fido\_cbor\_info\_maxmsgsiz**, **fido\_cbor\_info\_maxcredbloblen**, **fido\_cbor\_info\_maxcredcntlst**, **fido\_cbor\_info\_maxcredidlen**, **fido\_cbor\_info\_maxlargeblob**, **fido\_cbor\_info\_maxrpid\_minpinlen**, **fido\_cbor\_info\_maxpinlen**, **fido\_cbor\_info\_minpinlen**, **fido\_cbor\_info\_pin\_policy**, **fido\_cbor\_info\_fwversion**, **fido\_cbor\_info\_uv\_attempts**, **fido\_cbor\_info\_uv\_modality**, **fido\_cbor\_info\_uv\_count\_since\_pin**, **fido\_cbor\_info\_rk\_remaining**, **fido\_cbor\_info\_new\_pin\_required** – FIDO2 CBOR Info API

## SYNOPSIS

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

*fido\_cbor\_info\_t* *\**\

**fido\_cbor\_info\_new**(*void*);

*void*\

**fido\_cbor\_info\_free**(*fido\_cbor\_info\_t \*\*ci\_p*);

*int*\

**fido\_dev\_get\_cbor\_info**(*fido\_dev\_t \*dev*, *fido\_cbor\_info\_t \*ci*);

*int*\

**fido\_cbor\_info\_decrypt**(*fido\_cbor\_info\_t \*ci*, *const unsigned char \*ppuat*, *size\_t ppuat\_len*);

*const* *unsigned* *char* *\**\

**fido\_cbor\_info\_aaguid\_ptr**(*const fido\_cbor\_info\_t \*ci*);

*char* *\*\**\

**fido\_cbor\_info\_attfmts\_ptr**(*const fido\_cbor\_info\_t \*ci*);

*const* *uint8\_t* *\**\

**fido\_cbor\_info\_cfgcmds\_ptr**(*const fido\_cbor\_info\_t \*ci*);

*const* *unsigned* *char* *\**\

**fido\_cbor\_info\_encid\_ptr**(*const fido\_cbor\_info\_t \*ci*);

*const* *unsigned* *char* *\**\

**fido\_cbor\_info\_id\_ptr**(*const fido\_cbor\_info\_t \*ci*);

*const* *unsigned* *char* *\**\

**fido\_cbor\_info\_encstate\_ptr**(*const fido\_cbor\_info\_t \*ci*);

*const* *unsigned* *char* *\**\

**fido\_cbor\_info\_state\_ptr**(*const fido\_cbor\_info\_t \*ci*);

*char* *\*\**\

**fido\_cbor\_info\_extensions\_ptr**(*const fido\_cbor\_info\_t \*ci*);

*const* *unsigned* *char* *\**\

**fido\_cbor\_info\_pin\_policy\_url\_ptr**(*const fido\_cbor\_info\_t \*ci*);

*const* *uint8\_t* *\**\

**fido\_cbor\_info\_protocols\_ptr**(*const fido\_cbor\_info\_t \*ci*);

*char* *\*\**\

**fido\_cbor\_info\_reset\_transports\_ptr**(*const fido\_cbor\_info\_t \*ci*);

*char* *\*\**\

**fido\_cbor\_info\_transports\_ptr**(*const fido\_cbor\_info\_t \*ci*);

*char* *\*\**\

**fido\_cbor\_info\_versions\_ptr**(*const fido\_cbor\_info\_t \*ci*);

*char* *\*\**\

**fido\_cbor\_info\_options\_name\_ptr**(*const fido\_cbor\_info\_t \*ci*);

*const* *bool* *\**\

**fido\_cbor\_info\_options\_value\_ptr**(*const fido\_cbor\_info\_t \*ci*);

*const* *char* *\**\

**fido\_cbor\_info\_algorithm\_type**(*const fido\_cbor\_info\_t \*ci*, *size\_t idx*);

*int*\

**fido\_cbor\_info\_algorithm\_cose**(*const fido\_cbor\_info\_t \*ci*, *size\_t idx*);

*size\_t*\

**fido\_cbor\_info\_algorithm\_count**(*const fido\_cbor\_info\_t \*ci*);

*char* *\*\**\

**fido\_cbor\_info\_certs\_name\_ptr**(*const fido\_cbor\_info\_t \*ci*);

*const* *uint64\_t* *\**\

**fido\_cbor\_info\_certs\_value\_ptr**(*const fido\_cbor\_info\_t \*ci*);

*size\_t*\

**fido\_cbor\_info\_certs\_len**(*const fido\_cbor\_info\_t \*ci*);

*size\_t*\

**fido\_cbor\_info\_aaguid\_len**(*const fido\_cbor\_info\_t \*ci*);

*size\_t*\

**fido\_cbor\_info\_attfmts\_len**(*const fido\_cbor\_info\_t \*ci*);

*size\_t*\

**fido\_cbor\_info\_cfgcmds\_len**(*const fido\_cbor\_info\_t \*ci*);

*size\_t*\

**fido\_cbor\_info\_encid\_len**(*const fido\_cbor\_info\_t \*ci*);

*size\_t*\

**fido\_cbor\_info\_id\_len**(*const fido\_cbor\_info\_t \*ci*);

*size\_t*\

**fido\_cbor\_info\_encstate\_len**(*const fido\_cbor\_info\_t \*ci*);

*size\_t*\

**fido\_cbor\_info\_state\_len**(*const fido\_cbor\_info\_t \*ci*);

*size\_t*\

**fido\_cbor\_info\_extensions\_len**(*const fido\_cbor\_info\_t \*ci*);

*size\_t*\

**fido\_cbor\_info\_pin\_policy\_url\_len**(*const fido\_cbor\_info\_t \*ci*);

*size\_t*\

**fido\_cbor\_info\_protocols\_len**(*const fido\_cbor\_info\_t \*ci*);

*size\_t*\

**fido\_cbor\_info\_reset\_transports\_len**(*const fido\_cbor\_info\_t \*ci*);

*size\_t*\

**fido\_cbor\_info\_transports\_len**(*const fido\_cbor\_info\_t \*ci*);

*size\_t*\

**fido\_cbor\_info\_versions\_len**(*const fido\_cbor\_info\_t \*ci*);

*size\_t*\

**fido\_cbor\_info\_options\_len**(*const fido\_cbor\_info\_t \*ci*);

*bool*\

**fido\_cbor\_info\_long\_touch\_reset**(*const fido\_cbor\_info\_t \*ci*);

*uint64\_t*\

**fido\_cbor\_info\_maxmsgsiz**(*const fido\_cbor\_info\_t \*ci*);

*uint64\_t*\

**fido\_cbor\_info\_maxcredbloblen**(*const fido\_cbor\_info\_t \*ci*);

*uint64\_t*\

**fido\_cbor\_info\_maxcredcntlst**(*const fido\_cbor\_info\_t \*ci*);

*uint64\_t*\

**fido\_cbor\_info\_maxcredidlen**(*const fido\_cbor\_info\_t \*ci*);

*uint64\_t*\

**fido\_cbor\_info\_maxlargeblob**(*const fido\_cbor\_info\_t \*ci*);

*uint64\_t*\

**fido\_cbor\_info\_maxrpid\_minpinlen**(*const fido\_cbor\_info\_t \*ci*);

*uint64\_t*\

**fido\_cbor\_info\_maxpinlen**(*const fido\_cbor\_info\_t \*ci*);

*uint64\_t*\

**fido\_cbor\_info\_minpinlen**(*const fido\_cbor\_info\_t \*ci*);

*int*\

**fido\_cbor\_info\_pin\_policy**(*const fido\_cbor\_info\_t \*ci*);

*uint64\_t*\

**fido\_cbor\_info\_fwversion**(*const fido\_cbor\_info\_t \*ci*);

*uint64\_t*\

**fido\_cbor\_info\_uv\_attempts**(*const fido\_cbor\_info\_t \*ci*);

*uint64\_t*\

**fido\_cbor\_info\_uv\_modality**(*const fido\_cbor\_info\_t \*ci*);

*int64\_t*\

**fido\_cbor\_info\_uv\_count\_since\_pin**(*const fido\_cbor\_info\_t \*ci*);

*int64\_t*\

**fido\_cbor\_info\_rk\_remaining**(*const fido\_cbor\_info\_t \*ci*);

*bool*\

**fido\_cbor\_info\_new\_pin\_required**(*const fido\_cbor\_info\_t \*ci*);

## DESCRIPTION

The **fido\_cbor\_info\_new**() function returns a pointer to a newly allocated, empty *fido\_cbor\_info\_t* type. If memory cannot be allocated, NULL is returned.

The **fido\_cbor\_info\_free**() function releases the memory backing *\*ci\_p*, where *\*ci\_p* must have been previously allocated by **fido\_cbor\_info\_new**(). On return, *\*ci\_p* is set to NULL. Either *ci\_p* or *\*ci\_p* may be NULL, in which case **fido\_cbor\_info\_free**() is a NOP.

The **fido\_dev\_get\_cbor\_info**() function transmits a CTAP\_CBOR\_GETINFO command to *dev* and fills *ci* with attributes retrieved from the command's response. The **fido\_dev\_get\_cbor\_info**() function may block.

The **fido\_cbor\_info\_decrypt**() function decrypts the encrypted fields of *ci* using the persistent PIN/UV Auth token referenced by *ppuat*, which must point to at least *ppuat\_len* bytes.

The **fido\_cbor\_info\_aaguid\_ptr**(), **fido\_cbor\_info\_attfmts\_ptr**(), **fido\_cbor\_info\_cfgcmds\_ptr**(), **fido\_cbor\_info\_encid\_ptr**(), **fido\_cbor\_info\_id\_ptr**(), **fido\_cbor\_info\_encstate\_ptr**(), **fido\_cbor\_info\_state\_ptr**(), **fido\_cbor\_info\_extensions\_ptr**(), **fido\_cbor\_info\_pin\_policy\_url\_ptr**(), **fido\_cbor\_info\_protocols\_ptr**(), **fido\_cbor\_info\_reset\_transports\_ptr**(), **fido\_cbor\_info\_transports\_ptr**(), and **fido\_cbor\_info\_versions\_ptr**() functions return pointers to the authenticator attestation GUID, supported attestation formats, supported authenticator config commands, encrypted identifier, decrypted identifier, encrypted credential store state, decrypted credential store state, supported extensions, PIN complexity policy URL, PIN protocol, transports for authenticator reset, transports, and CTAP version strings of *ci*. The corresponding length of a given attribute can be obtained by **fido\_cbor\_info\_aaguid\_len**(), **fido\_cbor\_info\_attfmts\_len**(), **fido\_cbor\_info\_cfgcmds\_len**(), **fido\_cbor\_info\_encid\_len**(), **fido\_cbor\_info\_id\_len**(), **fido\_cbor\_info\_encstate\_len**(), **fido\_cbor\_info\_state\_len**(), **fido\_cbor\_info\_extensions\_len**(), **fido\_cbor\_info\_pin\_policy\_url\_len**(), **fido\_cbor\_info\_protocols\_len**(), **fido\_cbor\_info\_reset\_transports\_len**(), **fido\_cbor\_info\_transports\_len**(), or **fido\_cbor\_info\_versions\_len**(). The supported attestation formats, encrypted identifier, PIN complexity policy URL, and transports for authenticator reset attributes are CTAP 2.2 additions. The supported authenticator config commands and encrypted credential store state attributes are CTAP 2.3 additions.

The **fido\_cbor\_info\_options\_name\_ptr**() and **fido\_cbor\_info\_options\_value\_ptr**() functions return pointers to the array of option names and their respective values in *ci*. The length of the options array is returned by **fido\_cbor\_info\_options\_len**().

The **fido\_cbor\_info\_algorithm\_count**() function returns the number of supported algorithms in *ci*. The **fido\_cbor\_info\_algorithm\_cose**() function returns the COSE identifier of algorithm *idx* in *ci*, or 0 if the COSE identifier is unknown or unset. The **fido\_cbor\_info\_algorithm\_type**() function returns the type of algorithm *idx* in *ci*, or NULL if the type is unset. Please note that the first algorithm in *ci* has an *idx* (index) value of 0.

The **fido\_cbor\_info\_certs\_name\_ptr**() and **fido\_cbor\_info\_certs\_value\_ptr**() functions return pointers to the array of certification names and their respective values in *ci*. The length of the certifications array is returned by **fido\_cbor\_info\_certs\_len**().

The **fido\_cbor\_info\_maxmsgsiz**() function returns the maximum message size attribute of *ci*.

The **fido\_cbor\_info\_maxcredbloblen**() function returns the maximum “credBlob” length in bytes supported by the authenticator as reported in *ci*.

The **fido\_cbor\_info\_maxcredcntlst**() function returns the maximum supported number of credentials in a single credential ID list as reported in *ci*.

The **fido\_cbor\_info\_maxcredidlen**() function returns the maximum supported length of a credential ID as reported in *ci*.

The **fido\_cbor\_info\_maxrpid\_minpinlen**() function returns the maximum number of RP IDs that may be passed to [fido\_dev\_set\_pin\_minlen\_rpid(3)](/fido_dev_set_pin_minlen_rpid/3.md), as reported in *ci*. The minimum PIN length attribute is a CTAP 2.1 addition. If the attribute is not advertised by the authenticator, the **fido\_cbor\_info\_maxrpid\_minpinlen**() function returns zero.

The **fido\_cbor\_info\_maxlargeblob**() function returns the maximum length in bytes of an authenticator's serialized largeBlob array as reported in *ci*.

The **fido\_cbor\_info\_maxpinlen**() function returns the maximum PIN length enforced by the authenticator as reported in *ci*. The maximum PIN length attribute is a CTAP 2.2 addition. If the attribute is not advertised by the authenticator, the **fido\_cbor\_info\_maxpinlen**() function returns zero.

The **fido\_cbor\_info\_minpinlen**() function returns the minimum PIN length enforced by the authenticator as reported in *ci*. The minimum PIN length attribute is a CTAP 2.1 addition. If the attribute is not advertised by the authenticator, the **fido\_cbor\_info\_minpinlen**() function returns zero.

The **fido\_cbor\_info\_pin\_policy**() function returns information about whether an additional PIN complexity policy is enforced by the authenticator, as reported by *ci.* The PIN complexity policy attribute is a CTAP 2.2 addition. The value is 1 if an additional policy is enforced, 0 if no such policy is enforced, or -1 if the feature is not supported by the authenticator.

The **fido\_cbor\_info\_fwversion**() function returns the firmware version attribute of *ci*.

The **fido\_cbor\_info\_uv\_attempts**() function returns the number of UV attempts that the platform may attempt before falling back to PIN authentication. If 1, then all [fido\_dev\_get\_uv\_retry\_count(3)](/fido_dev_get_uv_retry_count/3.md) retries are handled internally by the authenticator and the platform may only attempt non-PIN UV once. The UV attempts attribute is a CTAP 2.1 addition. If the attribute is not advertised by the authenticator, the **fido\_cbor\_info\_uv\_attempts**() function returns zero.

The **fido\_cbor\_info\_uv\_count\_since\_pin**() function returns the number of built-in UV operations since the last PIN entry. The UV count since last PIN entry attribute is a CTAP 2.2 addition. If the attribute is not advertised by the authenticator, the **fido\_cbor\_info\_uv\_count\_since\_pin**() function returns -1.

The **fido\_cbor\_info\_uv\_modality**() function returns a bitmask representing different UV modes supported by the authenticator, as defined in the FIDO Registry of Predefined Values and reported in *ci*. See the *FIDO\_UV\_MODE\_\** definitions in ⟨fido/param.h⟩ for the set of values defined by libfido2 and a brief description of each. The UV modality attribute is a CTAP 2.1 addition. If the attribute is not advertised by the authenticator, the **fido\_cbor\_info\_uv\_modality**() function returns zero.

The **fido\_cbor\_info\_rk\_remaining**() function returns the estimated number of additional resident/discoverable credentials that can be stored on the authenticator as reported in *ci*. The estimated number of remaining resident credentials is a CTAP 2.1 addition. If the attribute is not advertised by the authenticator, the **fido\_cbor\_info\_rk\_remaining**() function returns -1.

The **fido\_cbor\_info\_new\_pin\_required**() function returns whether a new PIN is required by the authenticator as reported in *ci*. If **fido\_cbor\_info\_new\_pin\_required**() returns true, operations requiring PIN authentication will fail until a new PIN is set on the authenticator. The [fido\_dev\_set\_pin(3)](/fido_dev_set_pin/3.md) function can be used to set a new PIN.

The **fido\_cbor\_info\_long\_touch\_reset**() function returns true if a long touch is required to reset the authenticator. The long touch for reset attribute is a CTAP 2.2 addition. If the attribute is not advertised by the authenticator, the **fido\_cbor\_info\_long\_touch\_reset**() function returns false.

A complete example of how to use these functions can be found in the *example/info.c* file shipped with *libfido2*.

## RETURN VALUES

The error codes returned by **fido\_dev\_get\_cbor\_info**() and **fido\_cbor\_info\_decrypt**() are defined in ⟨fido/err.h⟩. On success, FIDO\_OK is returned.

The **fido\_cbor\_info\_aaguid\_ptr**(), **fido\_cbor\_info\_encid\_ptr**(), **fido\_cbor\_info\_encstate\_ptr**(), **fido\_cbor\_info\_extensions\_ptr**(), **fido\_cbor\_info\_protocols\_ptr**(), **fido\_cbor\_info\_transports\_ptr**(), **fido\_cbor\_info\_versions\_ptr**(), **fido\_cbor\_info\_options\_name\_ptr**(), and **fido\_cbor\_info\_options\_value\_ptr**() functions return NULL if the respective field in *ci* is absent. If not NULL, returned pointers are guaranteed to exist until any API function that takes *ci* without the *const* qualifier is invoked.

## SEE ALSO

[fido\_dev\_get\_puat(3)](/fido_dev_get_puat/3.md), [fido\_dev\_get\_uv\_retry\_count(3)](/fido_dev_get_uv_retry_count/3.md), [fido\_dev\_open(3)](/fido_dev_open/3.md), [fido\_dev\_set\_pin(3)](/fido_dev_set_pin/3.md), [fido\_dev\_set\_pin\_minlen\_rpid(3)](/fido_dev_set_pin_minlen_rpid/3.md) FIDO Registry of Predefined Values, FIDO Alliance, 2021-05-25, Review Draft, Version 2.2, https://fidoalliance.org/specs/common-specs/fido-registry-v2.2-rd-20210525.html.
