FIDO_DEV_MAKE_CRED(3)
π NAME π
fido_dev_make_cred β bestie, this is the one that generates a brand new credential on a FIDO2 device. like, literally makes a whole new identity key on your little hardware key. iconic behavior β¨
πΈ SYNOPSIS πΈ
#include <fido.h>
int
fido_dev_make_cred(fido_dev_t *dev, fido_cred_t *cred, const char *pin);
π¦ DESCRIPTION π¦
okay so. fido_dev_make_cred() walks up to the FIDO2 device that dev is representing and is like "hey babe, make me a new credential pls" β and it builds it according to all these parameters that live inside cred:
type;- client data hash;
- relying party;
- user attributes;
- list of excluded credential IDs;
- resident/discoverable key and user verification attributes.
ngl if you wanna know how all those values get set in the first place, go read fido_cred_set_authdata(3) β that's the lore. π
Now about that PIN situation π«Ά β if a PIN is not needed to authenticate the request against dev, then pin can just be NULL, no stress, she's fine. But if a PIN is needed, then pin must point to a NUL-terminated UTF-8 string. like it's not optional at that point, bestie, it's giving mandatory. π
After a successful call to fido_dev_make_cred(), you can hit up fido_cred_authdata_ptr(3), fido_cred_pubkey_ptr(3), fido_cred_x5c_ptr(3), and fido_cred_sig_ptr(3) on cred to scoop out all the different parts of the credential that just got generated. it's like opening a lil gift box of cryptographic goodness πβ¨
β οΈ heads up girlypop: fido_dev_make_cred() is synchronous β she will block if necessary. so don't be out here acting surprised when your thread just. sits there. waiting. she said "i'll get there when i get there" π
π RETURN VALUES π
the error codes that fido_dev_make_cred() hands back are defined in <fido/err.h>. and on success? you get FIDO_OK. that's the good ending fr fr π
π SEE ALSO π
and that's the whole page bestie, no cap π β this one came from Debian, dated May 23, 2018, and it lives under the name FIDO_DEV_MAKE_CRED(3). go make some credentials, you got this π§β¨
π¦ 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) 2018 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