1.\" Copyright (c) 2018 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: May 24 2018 $ 29.Dt FIDO_DEV_GET_ASSERT 3 30.Os 31.Sh NAME 32.Nm fido_dev_get_assert 33.Nd obtains an assertion from a FIDO2 device 34.Sh SYNOPSIS 35.In fido.h 36.Ft int 37.Fn fido_dev_get_assert "fido_dev_t *dev" "fido_assert_t *assert" "const char *pin" 38.Sh DESCRIPTION 39The 40.Fn fido_dev_get_assert 41function asks the FIDO2 device represented by 42.Fa dev 43for an assertion according to the following parameters defined in 44.Fa assert : 45.Pp 46.Bl -dash -compact 47.It 48.Nm relying party ID ; 49.It 50.Nm client data hash ; 51.It 52.Nm list of allowed credential IDs ; 53.It 54.Nm user presence and user verification attributes . 55.El 56.Pp 57See 58.Xr fido_assert_set_authdata 3 59for information on how these values are set. 60.Pp 61If a PIN is not needed to authenticate the request against 62.Fa dev , 63then 64.Fa pin 65may be NULL. 66Otherwise 67.Fa pin 68must point to a NUL-terminated UTF-8 string. 69.Pp 70After a successful call to 71.Fn fido_dev_get_assert , 72the 73.Xr fido_assert_count 3 , 74.Xr fido_assert_user_display_name 3 , 75.Xr fido_assert_user_icon 3 , 76.Xr fido_assert_user_name 3 , 77.Xr fido_assert_authdata_ptr 3 , 78.Xr fido_assert_user_id_ptr 3 , 79.Xr fido_assert_sig_ptr 3 , 80and 81.Xr fido_assert_sigcount 3 82functions may be invoked on 83.Fa assert 84to retrieve the various attributes of the generated assertion. 85.Pp 86Please note that 87.Fn fido_dev_get_assert 88is synchronous and will block if necessary. 89.Sh RETURN VALUES 90The error codes returned by 91.Fn fido_dev_get_assert 92are defined in 93.In fido/err.h . 94On success, 95.Dv FIDO_OK 96is returned. 97.Sh SEE ALSO 98.Xr fido_assert_new 3 , 99.Xr fido_assert_set_authdata 3 100