| FIDO_CRED_NEW(3) | Library Functions Manual | FIDO_CRED_NEW(3) |
fido_cred_new, fido_cred_free,
fido_cred_prot, fido_cred_fmt,
fido_cred_authdata_ptr,
fido_cred_clientdata_hash_ptr,
fido_cred_id_ptr,
fido_cred_pubkey_ptr,
fido_cred_sig_ptr,
fido_cred_x5c_ptr,
fido_cred_authdata_len,
fido_cred_clientdata_hash_len,
fido_cred_id_len,
fido_cred_pubkey_len,
fido_cred_sig_len,
fido_cred_x5c_len —
#include <fido.h>
fido_cred_t *
fido_cred_new(void);
void
fido_cred_free(fido_cred_t
**cred_p);
int
fido_cred_prot(fido_cred_t
*cred);
const char *
fido_cred_fmt(const
fido_cred_t *cred);
const unsigned char *
fido_cred_authdata_ptr(const
fido_cred_t *cred);
const unsigned char *
fido_cred_clientdata_hash_ptr(const
fido_cred_t *cred);
const unsigned char *
fido_cred_id_ptr(const
fido_cred_t *cred);
const unsigned char *
fido_cred_pubkey_ptr(const
fido_cred_t *cred);
const unsigned char *
fido_cred_sig_ptr(const
fido_cred_t *cred);
const unsigned char *
fido_cred_x5c_ptr(const
fido_cred_t *cred);
size_t
fido_cred_authdata_len(const
fido_cred_t *cred);
size_t
fido_cred_clientdata_hash_len(const
fido_cred_t *cred);
size_t
fido_cred_id_len(const
fido_cred_t *cred);
size_t
fido_cred_pubkey_len(const
fido_cred_t *cred);
size_t
fido_cred_sig_len(const
fido_cred_t *cred);
size_t
fido_cred_x5c_len(const
fido_cred_t *cred);
The fido_cred_new() function returns a
pointer to a newly allocated, empty fido_cred_t type.
If memory cannot be allocated, NULL is returned.
The fido_cred_free() function releases the
memory backing *cred_p, where
*cred_p must have been previously allocated by
fido_cred_new(). On return,
*cred_p is set to NULL. Either
cred_p or *cred_p may be NULL,
in which case fido_cred_free() is a NOP.
The fido_cred_prot() function returns the
protection of cred. See
fido_cred_set_prot(3)
for the values understood by libfido2.
The fido_cred_fmt() function returns a
pointer to a NUL-terminated string containing the format of
cred, or NULL if cred does not
have a format set.
The fido_cred_authdata_ptr(),
fido_cred_clientdata_hash_ptr(),
fido_cred_id_ptr(),
fido_cred_pubkey_ptr(),
fido_cred_sig_ptr(), and
fido_cred_x5c_ptr() functions return pointers to the
authenticator data, client data hash, ID, public key, signature and x509
certificate parts of cred, or NULL if the respective
entry is not set.
The corresponding length can be obtained by
fido_cred_authdata_len(),
fido_cred_clientdata_hash_len(),
fido_cred_id_len(),
fido_cred_pubkey_len(), and
fido_cred_sig_len().
The authenticator data, x509 certificate, and signature parts of a credential are typically passed to a FIDO 2 server for verification.
fido_cred_authdata_ptr() is a CBOR-encoded byte
string, as obtained from the authenticator.
If not NULL, pointers returned by
fido_cred_fmt(),
fido_cred_authdata_ptr(),
fido_cred_clientdata_hash_ptr(),
fido_cred_id_ptr(),
fido_cred_pubkey_ptr(),
fido_cred_sig_ptr(), and
fido_cred_x5c_ptr() are guaranteed to exist until
any API function that takes cred without the
const qualifier is invoked.
| $Mdocdate: May 23 2018 $ | NetBSD 9.99 |