1FIDO_DEV_SET_PIN(3)      BSD Library Functions Manual      FIDO_DEV_SET_PIN(3)
2

NAME

4     fido_dev_set_pin, fido_dev_get_retry_count, fido_dev_reset — FIDO 2
5     device management functions
6

SYNOPSIS

8     #include <fido.h>
9
10     int
11     fido_dev_set_pin(fido_dev_t *dev, const char *pin, const char *oldpin);
12
13     int
14     fido_dev_get_retry_count(fido_dev_t *dev, int *retries);
15
16     int
17     fido_dev_reset(fido_dev_t *dev);
18

DESCRIPTION

20     The fido_dev_set_pin() function sets the PIN of device dev to pin, where
21     pin is a NUL-terminated UTF-8 string.  If oldpin is not NULL, the
22     device's PIN is changed from oldpin to pin, where pin and oldpin are NUL-
23     terminated UTF-8 strings.
24
25     The fido_dev_get_retry_count() function fills retries with the number of
26     PIN retries left in dev before lock-out, where retries is an addressable
27     pointer.
28
29     The fido_dev_reset() function performs a reset on dev, resetting the
30     device's PIN and erasing credentials stored on the device.
31
32     Please note that fido_dev_set_pin(), fido_dev_get_retry_count(), and
33     fido_dev_reset() are synchronous and will block if necessary.
34

RETURN VALUES

36     The error codes returned by fido_dev_set_pin(),
37     fido_dev_get_retry_count(), and fido_dev_reset() are defined in
38     <fido/err.h>.  On success, FIDO_OK is returned.
39

CAVEATS

41     Regarding fido_dev_reset(), the actual user-flow to perform a reset is
42     outside the scope of the FIDO2 specification, and may therefore vary
43     depending on the authenticator.  Yubico authenticators will return
44     FIDO_ERR_NOT_ALLOWED if a reset is issued later than 5 seconds after
45     power-up, and FIDO_ERR_ACTION_TIMEOUT if the user fails to confirm the
46     reset by touching the key within 30 seconds.
47
48BSD                              May 10, 2020                              BSD
Impressum