xref: /freebsd/contrib/libfido2/man/fido_dev_get_assert.3 (revision dd4f32ae62426a10a84b4322756d82c06c202c4e)
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 24 2018 $
6.Dt FIDO_DEV_GET_ASSERT 3
7.Os
8.Sh NAME
9.Nm fido_dev_get_assert
10.Nd obtains an assertion from a FIDO2 device
11.Sh SYNOPSIS
12.In fido.h
13.Ft int
14.Fn fido_dev_get_assert "fido_dev_t *dev" "fido_assert_t *assert" "const char *pin"
15.Sh DESCRIPTION
16The
17.Fn fido_dev_get_assert
18function asks the FIDO2 device represented by
19.Fa dev
20for an assertion according to the following parameters defined in
21.Fa assert :
22.Pp
23.Bl -dash -compact
24.It
25.Nm relying party ID ;
26.It
27.Nm client data hash ;
28.It
29.Nm list of allowed credential IDs ;
30.It
31.Nm user presence and user verification attributes .
32.El
33.Pp
34See
35.Xr fido_assert_set_authdata 3
36for information on how these values are set.
37.Pp
38If a PIN is not needed to authenticate the request against
39.Fa dev ,
40then
41.Fa pin
42may be NULL.
43Otherwise
44.Fa pin
45must point to a NUL-terminated UTF-8 string.
46.Pp
47After a successful call to
48.Fn fido_dev_get_assert ,
49the
50.Xr fido_assert_count 3 ,
51.Xr fido_assert_user_display_name 3 ,
52.Xr fido_assert_user_icon 3 ,
53.Xr fido_assert_user_name 3 ,
54.Xr fido_assert_authdata_ptr 3 ,
55.Xr fido_assert_user_id_ptr 3 ,
56.Xr fido_assert_sig_ptr 3 ,
57and
58.Xr fido_assert_sigcount 3
59functions may be invoked on
60.Fa assert
61to retrieve the various attributes of the generated assertion.
62.Pp
63Please note that
64.Fn fido_dev_get_assert
65is synchronous and will block if necessary.
66.Sh RETURN VALUES
67The error codes returned by
68.Fn fido_dev_get_assert
69are defined in
70.In fido/err.h .
71On success,
72.Dv FIDO_OK
73is returned.
74.Sh SEE ALSO
75.Xr fido_assert_new 3 ,
76.Xr fido_assert_set_authdata 3
77