|
Server : Apache/2.4.62 System : FreeBSD fbsdweb2.web.rcn.net 14.1-RELEASE FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64 User : www ( 80) PHP Version : 8.3.8 Disable Function : NONE Directory : /usr/local/share/doc/libfido2/html/ |
Upload File : |
<!DOCTYPE html>
<html>
<!-- This is an automatically generated file. Do not edit.
Copyright (c) 2018 Yubico AB. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
SPDX-License-Identifier: BSD-2-Clause
-->
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link rel="stylesheet" href="style.css" type="text/css" media="all"/>
<title>FIDO_DEV_SET_PIN(3)</title>
</head>
<body>
<table class="head">
<tr>
<td class="head-ltitle">FIDO_DEV_SET_PIN(3)</td>
<td class="head-vol">FreeBSD Library Functions Manual</td>
<td class="head-rtitle">FIDO_DEV_SET_PIN(3)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<p class="Pp"><code class="Nm">fido_dev_set_pin</code>,
<code class="Nm">fido_dev_get_retry_count</code>,
<code class="Nm">fido_dev_get_uv_retry_count</code>,
<code class="Nm">fido_dev_reset</code> — <span class="Nd">FIDO2
device management functions</span></p>
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<p class="Pp"><code class="In">#include
<<a class="In">fido.h</a>></code></p>
<p class="Pp"><var class="Ft">int</var>
<br/>
<code class="Fn">fido_dev_set_pin</code>(<var class="Fa" style="white-space: nowrap;">fido_dev_t
*dev</var>, <var class="Fa" style="white-space: nowrap;">const char
*pin</var>, <var class="Fa" style="white-space: nowrap;">const char
*oldpin</var>);</p>
<p class="Pp"><var class="Ft">int</var>
<br/>
<code class="Fn">fido_dev_get_retry_count</code>(<var class="Fa" style="white-space: nowrap;">fido_dev_t
*dev</var>, <var class="Fa" style="white-space: nowrap;">int
*retries</var>);</p>
<p class="Pp"><var class="Ft">int</var>
<br/>
<code class="Fn">fido_dev_get_uv_retry_count</code>(<var class="Fa" style="white-space: nowrap;">fido_dev_t
*dev</var>, <var class="Fa" style="white-space: nowrap;">int
*retries</var>);</p>
<p class="Pp"><var class="Ft">int</var>
<br/>
<code class="Fn">fido_dev_reset</code>(<var class="Fa" style="white-space: nowrap;">fido_dev_t
*dev</var>);</p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
<p class="Pp">The
<a class="permalink" href="#fido_dev_set_pin"><code class="Fn" id="fido_dev_set_pin">fido_dev_set_pin</code></a>()
function sets the PIN of device <var class="Fa">dev</var> to
<var class="Fa">pin</var>, where <var class="Fa">pin</var> is a
NUL-terminated UTF-8 string. If <var class="Fa">oldpin</var> is not NULL,
the device's PIN is changed from <var class="Fa">oldpin</var> to
<var class="Fa">pin</var>, where <var class="Fa">pin</var> and
<var class="Fa">oldpin</var> are NUL-terminated UTF-8 strings.</p>
<p class="Pp" id="fido_dev_get_retry_count">The
<a class="permalink" href="#fido_dev_get_retry_count"><code class="Fn">fido_dev_get_retry_count</code></a>()
function fills <var class="Fa">retries</var> with the number of PIN retries
left in <var class="Fa">dev</var> before lock-out, where
<var class="Fa">retries</var> is an addressable pointer.</p>
<p class="Pp" id="fido_dev_get_uv_retry_count">The
<a class="permalink" href="#fido_dev_get_uv_retry_count"><code class="Fn">fido_dev_get_uv_retry_count</code></a>()
function fills <var class="Fa">retries</var> with the number of built-in UV
retries left in <var class="Fa">dev</var> before built-in UV is disabled,
where <var class="Fa">retries</var> is an addressable pointer.</p>
<p class="Pp" id="fido_dev_reset">The
<a class="permalink" href="#fido_dev_reset"><code class="Fn">fido_dev_reset</code></a>()
function performs a reset on <var class="Fa">dev</var>, resetting the
device's PIN and erasing credentials stored on the device.</p>
<p class="Pp" id="fido_dev_set_pin~2">Please note that
<a class="permalink" href="#fido_dev_set_pin~2"><code class="Fn">fido_dev_set_pin</code></a>(),
<code class="Fn">fido_dev_get_retry_count</code>(),
<code class="Fn">fido_dev_get_uv_retry_count</code>(), and
<code class="Fn">fido_dev_reset</code>() are synchronous and will block if
necessary.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="RETURN_VALUES"><a class="permalink" href="#RETURN_VALUES">RETURN
VALUES</a></h1>
<p class="Pp">The error codes returned by
<code class="Fn">fido_dev_set_pin</code>(),
<code class="Fn">fido_dev_get_retry_count</code>(),
<code class="Fn">fido_dev_get_uv_retry_count</code>(), and
<code class="Fn">fido_dev_reset</code>() are defined in
<code class="In"><<a class="In">fido/err.h</a>></code>. On success,
<code class="Dv">FIDO_OK</code> is returned.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1>
<p class="Pp"><a class="Xr" href="fido_cbor_info_uv_attempts.html">fido_cbor_info_uv_attempts(3)</a></p>
</section>
<section class="Sh">
<h1 class="Sh" id="CAVEATS"><a class="permalink" href="#CAVEATS">CAVEATS</a></h1>
<p class="Pp">Regarding <code class="Fn">fido_dev_reset</code>(), the actual
user-flow to perform a reset is outside the scope of the FIDO2
specification, and may therefore vary depending on the authenticator. Yubico
authenticators will return <code class="Dv">FIDO_ERR_NOT_ALLOWED</code> if a
reset is issued later than 5 seconds after power-up, and
<code class="Dv">FIDO_ERR_ACTION_TIMEOUT</code> if the user fails to confirm
the reset by touching the key within 30 seconds.</p>
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">May 25, 2018</td>
<td class="foot-os">Yubico AB</td>
</tr>
</table>
</body>
</html>