FIDO_BIO_TEMPLATE(3)
π FIDO_BIO_TEMPLATE(3) π
ok so bestie, this is the FIDO_BIO_TEMPLATE(3) page from the Library Functions Manual, and we are about to get so cozy with the FIDO2 biometric template API. grab a boba, we're doing this π§β¨
β¨ NAME β¨
fido_bio_template, fido_bio_template_array_count, fido_bio_template_array_free, fido_bio_template_array_new, fido_bio_template_free, fido_bio_template_id_len, fido_bio_template_id_ptr, fido_bio_template_name, fido_bio_template_new, fido_bio_template_set_id, fido_bio_template_set_name β it's giving FIDO2 biometric template API π
πΈ SYNOPSIS πΈ
#include <fido.h>
#include <fido/bio.h>
fido_bio_template_t *
fido_bio_template_new(void);
void
fido_bio_template_free(fido_bio_template_t **template_p);
const char *
fido_bio_template_name(const fido_bio_template_t *template);
const unsigned char *
fido_bio_template_id_ptr(const fido_bio_template_t *template);
size_t
fido_bio_template_id_len(const fido_bio_template_t *template);
int
fido_bio_template_set_id(fido_bio_template_t *template,
const unsigned char *ptr, size_t len);
int
fido_bio_template_set_name(fido_bio_template_t *template,
const char *name);
fido_bio_template_array_t *
fido_bio_template_array_new(void);
void
fido_bio_template_array_free(fido_bio_template_array_t **array_p);
size_t
fido_bio_template_array_count(const fido_bio_template_array_t *array);
const fido_bio_template_t *
fido_bio_template(const fido_bio_template_array_t *array, size_t idx);
π¦ DESCRIPTION π¦
so like, existing FIDO2 biometric enrollments? libfido2 abstracts them with two types: fido_bio_template_t and fido_bio_template_array_t. iconic of them honestly π
the functions on this page let you allocate, deallocate, change, and inspect a fido_bio_template_t, and allocate, deallocate, and inspect a fido_bio_template_array_t. no cap.
but bestie, for device operations onfido_bio_template_tandfido_bio_template_array_t, go check outfido_bio_dev_get_info(3)instead. that's a different page, different vibe π«Ά
π« the template functions π«
fido_bio_template_new() β hands you a pointer to a freshly allocated, empty fido_bio_template_t. and if memory can't be allocated? you get NULL. rude but true π
fido_bio_template_free() β releases the memory backing *template_p, and heads up, *template_p must have been previously allocated by fido_bio_template_new(). on return, *template_p gets set to NULL. and plot twist: either template_p or *template_p may be NULL, and in that case fido_bio_template_free() is a NOP. no drama, no crash π
fido_bio_template_name() β returns a pointer to a NUL-terminated string holding the friendly name of template. or NULL if template doesn't have a friendly name set. it's giving "no name, no problem" β¨
fido_bio_template_id_ptr() β returns a pointer to the template id of template, or NULL if template doesn't have an id. and the matching length? get that with fido_bio_template_id_len() π
fido_bio_template_set_name() β sets the friendly name of template to name. and if name is NULL? the friendly name of template gets unset. we love a clean slate π
π the template array functions π
fido_bio_template_array_new() β returns a pointer to a newly allocated, empty fido_bio_template_array_t. if memory cannot be allocated, NULL is returned. same energy as before fr fr π
fido_bio_template_array_free() β releases the memory backing *array_p, where *array_p must have been previously allocated by fido_bio_template_array_new(). on return, *array_p is set to NULL. either array_p or *array_p may be NULL, in which case fido_bio_template_array_free() is a NOP π
fido_bio_template_array_count() β returns the number of templates in array. simple. slay. count them bestie π’
fido_bio_template() β returns a pointer to the template at index idx in array. and please note: the first template in array has an idx (index) value of 0. zero-indexed, as the universe intended β
π RETURN VALUES π
the error codes returned by fido_bio_template_set_id() and fido_bio_template_set_name() are defined in <fido/err.h>. and on success? you get FIDO_OK π periodt.
π₯ SEE ALSO π₯
ok that's the whole page bestie, you ate it up π
β¨ this was Debian's FIDO_BIO_TEMPLATE(3) from September 13, 2019 β yes she's a lil vintage, but she's still main character energy ππ¦π
π¦ where this page comes from
- alpine 3.22: libfido2-doc 1.16.0-r0 Β· BSD-2-Clause
- alpine 3.23: libfido2-doc 1.16.0-r2 Β· BSD-2-Clause
- alpine 3.24: libfido2-doc 1.16.0-r4 Β· BSD-2-Clause
- arch rolling: libfido2 1.17.0-1 Β· BSD-2-Clause
- centos-stream 10: libfido2-devel 1.14.0-7.el10 Β· BSD-2-Clause
- centos-stream 9: libfido2-devel 1.13.0-2.el9 Β· BSD
- centos-stream 9: libfido2-devel 1.13.0-2.el9 Β· BSD
- debian bookworm: libfido2-doc 1.12.0-2 Β· BSD-2-Clause
- debian trixie: libfido2-doc 1.15.0-1 Β· BSD-2-Clause
- fedora 43: libfido2-devel 1.16.0-3.fc43 Β· BSD-2-Clause
- fedora 43: libfido2-devel 1.16.0-3.fc43 Β· BSD-2-Clause
- fedora 44: libfido2-devel 1.16.0-5.fc44 Β· BSD-2-Clause
- fedora 44: libfido2-devel 1.16.0-5.fc44 Β· BSD-2-Clause
- nixos 26.05: fido2-manage 0-unstable-2025-06-06
- nixpkgs unstable: fido2-manage 0-unstable-2025-06-06
- nixpkgs unstable: libfido2 1.17.0
- opensuse-leap 16.0: libfido2-devel 1.15.0-160000.3.2 Β· BSD-2-Clause
- opensuse-leap 16.0: libfido2-devel 1.15.0-160000.3.2 Β· BSD-2-Clause
- opensuse-leap 16.0: libfido2-devel 1.15.0-160000.3.2 Β· BSD-2-Clause
- opensuse-leap 16.0: libfido2-devel 1.15.0-160000.3.2 Β· BSD-2-Clause
- ubuntu noble: libfido2-doc 1.14.0-1build3 Β· BSD-2-Clause
- ubuntu questing: libfido2-doc 1.16.0-2
- ubuntu resolute: libfido2-doc 1.16.0-2build1 Β· BSD-2-Clause
- ubuntu stonking: libfido2-doc 1.17.0-2build1 Β· BSD-2-Clause
- π the page's license: BSD-2-Clause
- Copyright (c) 2019 Yubico AB. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms