xref: /freebsd/contrib/libfido2/man/fido_assert_allow_cred.3 (revision 5ca8e32633c4ffbbcd6762e5888b6a4ba0708c6c)
1.\" Copyright (c) 2018-2022 Yubico AB. All rights reserved.
2.\"
3.\" Redistribution and use in source and binary forms, with or without
4.\" modification, are permitted provided that the following conditions are
5.\" met:
6.\"
7.\"    1. Redistributions of source code must retain the above copyright
8.\"       notice, this list of conditions and the following disclaimer.
9.\"    2. Redistributions in binary form must reproduce the above copyright
10.\"       notice, this list of conditions and the following disclaimer in
11.\"       the documentation and/or other materials provided with the
12.\"       distribution.
13.\"
14.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
15.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
16.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
17.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
18.\" HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
20.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25.\"
26.\" SPDX-License-Identifier: BSD-2-Clause
27.\"
28.Dd $Mdocdate: December 1 2022 $
29.Dt FIDO_ASSERT_ALLOW_CRED 3
30.Os
31.Sh NAME
32.Nm fido_assert_allow_cred ,
33.Nm fido_assert_empty_allow_list
34.Nd manage allow lists in a FIDO2 assertion
35.Sh SYNOPSIS
36.In fido.h
37.Ft int
38.Fn fido_assert_allow_cred "fido_assert_t *assert" "const unsigned char *ptr" "size_t len"
39.Ft int
40.Fn fido_assert_empty_allow_list "fido_assert_t *assert"
41.Sh DESCRIPTION
42The
43.Fn fido_assert_allow_cred
44function adds
45.Fa ptr
46to the list of credentials allowed in
47.Fa assert ,
48where
49.Fa ptr
50points to a credential ID of
51.Fa len
52bytes.
53A copy of
54.Fa ptr
55is made, and no references to the passed pointer are kept.
56If
57.Fn fido_assert_allow_cred
58fails, the existing list of allowed credentials is preserved.
59.Pp
60For the format of a FIDO2 credential ID, please refer to the
61Web Authentication (webauthn) standard.
62.Pp
63The
64.Fn fido_assert_empty_allow_list
65function empties the list of credentials allowed in
66.Fa assert .
67.Sh RETURN VALUES
68The error codes returned by
69.Fn fido_assert_allow_cred
70and
71.Fn fido_assert_empty_allow_list
72are defined in
73.In fido/err.h .
74On success,
75.Dv FIDO_OK
76is returned.
77.Sh SEE ALSO
78.Xr fido_assert_new 3 ,
79.Xr fido_assert_set_authdata 3 ,
80.Xr fido_dev_get_assert 3
81