diff options
author | nicoo <nicoo@debian.org> | 2020-02-12 13:42:22 +0100 |
---|---|---|
committer | Nicolas Braud-Santoni <nicolas@braud-santoni.eu> | 2020-02-12 13:42:22 +0100 |
commit | c79050aa44b8836d836c5dd22a383a073c28b74b (patch) | |
tree | 7bcca9fabd7718bf87ca600a6594f57b76d8de7d /man/fido_dev_set_pin.3 |
Import upstream release 1.3.0
Closes: #951184
Diffstat (limited to 'man/fido_dev_set_pin.3')
-rw-r--r-- | man/fido_dev_set_pin.3 | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/man/fido_dev_set_pin.3 b/man/fido_dev_set_pin.3 new file mode 100644 index 0000000..94f841b --- /dev/null +++ b/man/fido_dev_set_pin.3 | |||
@@ -0,0 +1,88 @@ | |||
1 | .\" Copyright (c) 2018 Yubico AB. All rights reserved. | ||
2 | .\" Use of this source code is governed by a BSD-style | ||
3 | .\" license that can be found in the LICENSE file. | ||
4 | .\" | ||
5 | .Dd $Mdocdate: May 25 2018 $ | ||
6 | .Dt FIDO_DEV_SET_PIN 3 | ||
7 | .Os | ||
8 | .Sh NAME | ||
9 | .Nm fido_dev_set_pin , | ||
10 | .Nm fido_dev_get_retry_count , | ||
11 | .Nm fido_dev_reset | ||
12 | .Nd FIDO 2 device management functions | ||
13 | .Sh SYNOPSIS | ||
14 | .In fido.h | ||
15 | .Ft int | ||
16 | .Fn fido_dev_set_pin "fido_dev_t *dev" "const char *pin" "const char *oldpin" | ||
17 | .Ft int | ||
18 | .Fn fido_dev_get_retry_count "fido_dev_t *dev" "int *retries" | ||
19 | .Ft int | ||
20 | .Fn fido_dev_reset "fido_dev_t *dev" | ||
21 | .Sh DESCRIPTION | ||
22 | The | ||
23 | .Fn fido_dev_set_pin | ||
24 | function sets the PIN of device | ||
25 | .Fa dev | ||
26 | to | ||
27 | .Fa pin , | ||
28 | where | ||
29 | .Fa pin | ||
30 | is a NUL-terminated UTF-8 string. | ||
31 | If | ||
32 | .Fa oldpin | ||
33 | is not NULL, the device's PIN is changed from | ||
34 | .Fa oldpin | ||
35 | to | ||
36 | .Fa pin , | ||
37 | where | ||
38 | .Fa pin | ||
39 | and | ||
40 | .Fa oldpin | ||
41 | are NUL-terminated UTF-8 strings. | ||
42 | .Pp | ||
43 | The | ||
44 | .Fn fido_dev_get_retry_count | ||
45 | function fills | ||
46 | .Fa retries | ||
47 | with the number of PIN retries left in | ||
48 | .Fa dev | ||
49 | before lock-out, where | ||
50 | .Fa retries | ||
51 | is an addressable pointer. | ||
52 | .Pp | ||
53 | The | ||
54 | .Fn fido_dev_reset | ||
55 | function performs a reset on | ||
56 | .Fa dev , | ||
57 | resetting the device's PIN and erasing credentials stored on the | ||
58 | device. | ||
59 | .Pp | ||
60 | Please note that | ||
61 | .Fn fido_dev_set_pin , | ||
62 | .Fn fido_dev_get_retry_count , | ||
63 | and | ||
64 | .Fn fido_dev_reset | ||
65 | are synchronous and will block if necessary. | ||
66 | .Sh RETURN VALUES | ||
67 | The error codes returned by | ||
68 | .Fn fido_dev_set_pin , | ||
69 | .Fn fido_dev_get_retry_count , | ||
70 | and | ||
71 | .Fn fido_dev_reset | ||
72 | are defined in | ||
73 | .In fido/err.h . | ||
74 | On success, | ||
75 | .Dv FIDO_OK | ||
76 | is returned. | ||
77 | .Sh CAVEATS | ||
78 | Regarding | ||
79 | .Fn fido_dev_reset , | ||
80 | the actual user-flow to perform a reset is outside the scope of the | ||
81 | FIDO2 specification, and may therefore vary depending on the | ||
82 | authenticator. | ||
83 | Yubico authenticators will return | ||
84 | .Dv FIDO_ERR_NOT_ALLOWED | ||
85 | if a reset is issued later than 5 seconds after power-up, and | ||
86 | .Dv FIDO_ERR_ACTION_TIMEOUT | ||
87 | if the user fails to confirm the reset by touching the key | ||
88 | within 30 seconds. | ||