FIDO_CRED_EXCLUDE(3)

πŸ“¦
version 1.17.0 Β· 3 versions
  • 1.17.0 Β· alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 1.10.0 Β· ubuntu jammy
  • 1.12.0 Β· debian bookworm
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– FIDO_CRED_EXCLUDE πŸ’–

okay bestie, sit down, hydrate, and let me tell you about fido_cred_exclude and fido_cred_empty_exclude_list β€” the two functions that manage exclude lists in a FIDO2 credential. yes, that's the whole vibe. it's giving gatekeeping but make it cryptography ✨


🌸 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 πŸ¦‹

✨ fido_cred_exclude() ✨

so fido_cred_exclude() takes ptr and adds it to the list of credentials that cred is excluding, where ptr points to a credential ID that's len bytes long. it makes a copy of ptr, okay? like it does NOT keep any references to the pointer you passed in. she's independent, she's self-sufficient, she doesn't need you πŸ’…

and if fido_cred_exclude() fails? no worries bestie, the existing list of excluded credentials is preserved. nothing gets messed up, we don't do chaos here 🫢

now here's the iconic part: if fido_cred_exclude returns success and cred gets passed to fido_dev_make_cred(3) later, on a device that already contains the credential denoted by ptr... then fido_dev_make_cred(3) will fail. periodt. that's the whole point. it's a vibe check and the device did not pass 😭

for the format of a FIDO2 credential ID, please refer to the Web Authentication (webauthn) standard. iykyk πŸ“–

πŸŽ€ fido_cred_empty_exclude_list() πŸŽ€

and fido_cred_empty_exclude_list()? she empties the list of credentials excluded by cred. clean slate. reset era. main character energy 🌈


⭐ RETURN VALUES ⭐

the error codes returned by fido_cred_exclude() and fido_cred_empty_exclude_list() are defined in <fido/err.h>. and on success? you get FIDO_OK back, which is honestly the only response we accept in this house πŸ‘‘

ngl bestie, check your return values. always. no cap. πŸ’€

πŸ‘€ SEE ALSO πŸ‘€


that's the whole page, bestie β€” go forth and exclude credentials responsibly βœ¨πŸ’–πŸŽ€πŸ¦‹πŸŒΈ

this page came from Debian, dated December 2, 2022, and it lives in the FIDO_CRED_EXCLUDE(3) corner of the manual. mwah, slay, bye πŸ«ΆπŸ’…

πŸ“¦ where this page comes from