FIDO_ASSERT_ALLOW_CRED(3)

πŸ’– FIDO_ASSERT_ALLOW_CRED πŸ’–

okay bestie, so this one lives in the Library Functions Manual section 3, and it's called FIDO_ASSERT_ALLOW_CRED(3) β€” we're talking fido_assert_allow_cred and fido_assert_empty_allow_list, and they're here to manage allow lists in a FIDO2 assertion. πŸŽ€


✨ NAME ✨

fido_assert_allow_cred, fido_assert_empty_allow_list β€” manage allow lists in a FIDO2 assertion πŸ¦‹


🌸 SYNOPSIS 🌸

#include <fido.h>

int
fido_assert_allow_cred(fido_assert_t *assert, const unsigned char *ptr,
    size_t len);

int
fido_assert_empty_allow_list(fido_assert_t *assert);

πŸ’… DESCRIPTION πŸ’…

so like, fido_assert_allow_cred() adds ptr to the list of credentials allowed in assert, where ptr points to a credential ID of len bytes. it makes a copy of ptr β€” no references to the pointer you passed in are kept, so you can go do whatever with it afterwards, we don't care, we already have our own. πŸ’–

and listen, if fido_assert_allow_cred() fails? the existing list of allowed credentials is preserved. nothing gets half-eaten, the vibe stays intact. πŸ™ˆ

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

then there's fido_assert_empty_allow_list(), which does exactly what it says on the tin: it empties the list of credentials allowed in assert. poof. gone. 🫢


⭐ RETURN VALUES ⭐

the error codes returned by fido_assert_allow_cred() and fido_assert_empty_allow_list() are defined in <fido/err.h>. and on success? FIDO_OK is returned. slay. πŸ‘‘


🌈 SEE ALSO 🌈


and that's the whole page, bestie β€” this one shipped with Debian, dated December 1, 2022. go forth and allow-list responsibly πŸ’œβœ¨

πŸ“¦ where this page comes from