FIDO_DEV_GET_ASSERT(3)

πŸ“¦
version 1.17.0 Β· 2 versions
  • 1.17.0 Β· alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, debian bookworm, 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
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, debian bookworm, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– FIDO_DEV_GET_ASSERT(3) πŸ’–

okay bestie, pull up a chair, we're reading a library functions manual page and honestly? it's giving iconic. this one's all about fido_dev_get_assert from the fido library β€” yes the FIDO2 one, the security-key one, the one that makes you feel like a hacker every time you boop your little key πŸ¦‹


✨ NAME ✨

fido_dev_get_assert β€” obtains an assertion from a FIDO2 device

like. it goes and gets you an assertion. from a FIDO2 device. that's the whole vibe πŸŽ€


🌸 SYNOPSIS 🌸

#include <fido.h>

int
fido_dev_get_assert(fido_dev_t *dev, fido_assert_t *assert,
    const char *pin);

three args, no cap. dev, assert, pin. that's the trio πŸ‘‘


πŸ’… DESCRIPTION πŸ’…

so the way that fido_dev_get_assert() works is it asks the FIDO2 device represented by dev for an assertion, and it builds that request according to these parameters that live inside assert:

  • relying party ID
  • client data hash
  • list of allowed credential IDs
  • user presence and user verification attributes

obsessed. literally everything it needs is already chilling in assert.

if you wanna know how those values get set in the first place, go read fido_assert_set_authdata(3) β€” that's the one that handles it. iykyk πŸ’œ

now, the pin situation. if a PIN is not needed to authenticate the request against dev, then pin may be NULL. cute, no PIN, no problem. but otherwise β€” and this is the important part, bestie β€” pin must point to a NUL-terminated UTF-8 string. not a vibe, not a guess, an actual NUL-terminated UTF-8 string. periodt πŸ’…

and once fido_dev_get_assert() returns successfully? ohhh that's when the fun starts. you can then invoke all of these on assert to pull out the various attributes of the generated assertion:

eight whole little getters, all lined up, all ready to spill the tea about your assertion. main character energy fr fr ✨

⚠️ also please note: fido_dev_get_assert() is synchronous and will block if necessary. so like, it's not gonna go do seventeen other things while you wait. it waits. you wait. everyone waits together. plan accordingly 🫢

⭐ RETURN VALUES ⭐

the error codes returned by fido_dev_get_assert() are defined in <fido/err.h>. go look there if something's off, she's got the receipts.

on success, FIDO_OK is returned. that's the good one. the slay one. the one you want to see 🌈


πŸŽ€ SEE ALSO πŸŽ€


and that's the page, bestie!! πŸ’– this was the Debian version of the FIDO_DEV_GET_ASSERT(3) manual, dated May 24, 2018 β€” go forth and get those assertions, you've absolutely got this πŸ‘‘βœ¨πŸŒΈ

πŸ“¦ where this page comes from