1ba9bdd8bSchristos.\" Copyright (c) 2018 Yubico AB. All rights reserved. 2*2d40c451Schristos.\" 3*2d40c451Schristos.\" Redistribution and use in source and binary forms, with or without 4*2d40c451Schristos.\" modification, are permitted provided that the following conditions are 5*2d40c451Schristos.\" met: 6*2d40c451Schristos.\" 7*2d40c451Schristos.\" 1. Redistributions of source code must retain the above copyright 8*2d40c451Schristos.\" notice, this list of conditions and the following disclaimer. 9*2d40c451Schristos.\" 2. Redistributions in binary form must reproduce the above copyright 10*2d40c451Schristos.\" notice, this list of conditions and the following disclaimer in 11*2d40c451Schristos.\" the documentation and/or other materials provided with the 12*2d40c451Schristos.\" distribution. 13*2d40c451Schristos.\" 14*2d40c451Schristos.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 15*2d40c451Schristos.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 16*2d40c451Schristos.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 17*2d40c451Schristos.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 18*2d40c451Schristos.\" HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 19*2d40c451Schristos.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20*2d40c451Schristos.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21*2d40c451Schristos.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22*2d40c451Schristos.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23*2d40c451Schristos.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 24*2d40c451Schristos.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25*2d40c451Schristos.\" 26*2d40c451Schristos.\" SPDX-License-Identifier: BSD-2-Clause 27ba9bdd8bSchristos.\" 28ba9bdd8bSchristos.Dd $Mdocdate: May 24 2018 $ 29ba9bdd8bSchristos.Dt FIDO_DEV_GET_ASSERT 3 30ba9bdd8bSchristos.Os 31ba9bdd8bSchristos.Sh NAME 32ba9bdd8bSchristos.Nm fido_dev_get_assert 33*2d40c451Schristos.Nd obtains an assertion from a FIDO2 device 34ba9bdd8bSchristos.Sh SYNOPSIS 35ba9bdd8bSchristos.In fido.h 36ba9bdd8bSchristos.Ft int 37ba9bdd8bSchristos.Fn fido_dev_get_assert "fido_dev_t *dev" "fido_assert_t *assert" "const char *pin" 38ba9bdd8bSchristos.Sh DESCRIPTION 39ba9bdd8bSchristosThe 40ba9bdd8bSchristos.Fn fido_dev_get_assert 41*2d40c451Schristosfunction asks the FIDO2 device represented by 42ba9bdd8bSchristos.Fa dev 43ba9bdd8bSchristosfor an assertion according to the following parameters defined in 44ba9bdd8bSchristos.Fa assert : 45ba9bdd8bSchristos.Pp 46ba9bdd8bSchristos.Bl -dash -compact 47ba9bdd8bSchristos.It 48ba9bdd8bSchristos.Nm relying party ID ; 49ba9bdd8bSchristos.It 50ba9bdd8bSchristos.Nm client data hash ; 51ba9bdd8bSchristos.It 52ba9bdd8bSchristos.Nm list of allowed credential IDs ; 53ba9bdd8bSchristos.It 54ba9bdd8bSchristos.Nm user presence and user verification attributes . 55ba9bdd8bSchristos.El 56ba9bdd8bSchristos.Pp 57ba9bdd8bSchristosSee 58ba9bdd8bSchristos.Xr fido_assert_set_authdata 3 59ba9bdd8bSchristosfor information on how these values are set. 60ba9bdd8bSchristos.Pp 61ba9bdd8bSchristosIf a PIN is not needed to authenticate the request against 62ba9bdd8bSchristos.Fa dev , 63ba9bdd8bSchristosthen 64ba9bdd8bSchristos.Fa pin 65ba9bdd8bSchristosmay be NULL. 66ba9bdd8bSchristosOtherwise 67ba9bdd8bSchristos.Fa pin 68ba9bdd8bSchristosmust point to a NUL-terminated UTF-8 string. 69ba9bdd8bSchristos.Pp 70ba9bdd8bSchristosAfter a successful call to 71ba9bdd8bSchristos.Fn fido_dev_get_assert , 72ba9bdd8bSchristosthe 73ba9bdd8bSchristos.Xr fido_assert_count 3 , 74ba9bdd8bSchristos.Xr fido_assert_user_display_name 3 , 75ba9bdd8bSchristos.Xr fido_assert_user_icon 3 , 76ba9bdd8bSchristos.Xr fido_assert_user_name 3 , 77ba9bdd8bSchristos.Xr fido_assert_authdata_ptr 3 , 78ba9bdd8bSchristos.Xr fido_assert_user_id_ptr 3 , 79ba9bdd8bSchristos.Xr fido_assert_sig_ptr 3 , 80ba9bdd8bSchristosand 81ba9bdd8bSchristos.Xr fido_assert_sigcount 3 82ba9bdd8bSchristosfunctions may be invoked on 83ba9bdd8bSchristos.Fa assert 84ba9bdd8bSchristosto retrieve the various attributes of the generated assertion. 85ba9bdd8bSchristos.Pp 86ba9bdd8bSchristosPlease note that 87ba9bdd8bSchristos.Fn fido_dev_get_assert 88ba9bdd8bSchristosis synchronous and will block if necessary. 89ba9bdd8bSchristos.Sh RETURN VALUES 90ba9bdd8bSchristosThe error codes returned by 91ba9bdd8bSchristos.Fn fido_dev_get_assert 92ba9bdd8bSchristosare defined in 93ba9bdd8bSchristos.In fido/err.h . 94ba9bdd8bSchristosOn success, 95ba9bdd8bSchristos.Dv FIDO_OK 96ba9bdd8bSchristosis returned. 97ba9bdd8bSchristos.Sh SEE ALSO 98ba9bdd8bSchristos.Xr fido_assert_new 3 , 99ba9bdd8bSchristos.Xr fido_assert_set_authdata 3 100