p The .Fn fido_assert_set_count function sets the number of assertion statements in .Fa assert to .Fa n .
p The .Fn fido_assert_set_authdata and .Fn fido_assert_set_sig functions set the authenticator data and signature parts of the statement with index .Fa idx of .Fa assert to .Fa ptr , where .Fa ptr points to .Fa len bytes. A copy of .Fa ptr is made, and no references to the passed pointer are kept. Please note that the first assertion statement of .Fa assert has an .Fa idx of .Em 0 . The authenticator data passed to .Fn fido_assert_set_authdata must be a CBOR-encoded byte string, as obtained from .Fn fido_assert_authdata_ptr . Alternatively, a raw binary blob may be passed to .Fn fido_assert_set_authdata_raw .
p The .Fn fido_assert_set_clientdata_hash function sets the client data hash of .Fa assert to .Fa ptr , where .Fa ptr points to .Fa len bytes. A copy of .Fa ptr is made, and no references to the passed pointer are kept.
p The .Fn fido_assert_set_clientdata function allows an application to set the client data hash of .Fa assert by specifying the assertion's unhashed client data. This is required by Windows Hello, which calculates the client data hash internally. For compatibility with Windows Hello, applications should use .Fn fido_assert_set_clientdata instead of .Fn fido_assert_set_clientdata_hash .
p The .Fn fido_assert_set_rp function sets the relying party .Fa id of .Fa assert , where .Fa id is a NUL-terminated UTF-8 string. The content of .Fa id is copied, and no references to the passed pointer are kept.
p The .Fn fido_assert_set_extensions function sets the extensions of .Fa assert to the bitmask .Fa flags . At the moment, only the .Dv FIDO_EXT_CRED_BLOB , .Dv FIDO_EXT_HMAC_SECRET , and .Dv FIDO_EXT_LARGEBLOB_KEY extensions are supported. If .Fa flags is zero, the extensions of .Fa assert are cleared.
p The .Fn fido_assert_set_hmac_salt and .Fn fido_assert_set_hmac_secret functions set the hmac-salt and hmac-secret parts of .Fa assert to .Fa ptr , where .Fa ptr points to .Fa len bytes. A copy of .Fa ptr is made, and no references to the passed pointer are kept. The HMAC Secret
q hmac-secret Extension is a CTAP 2.0 extension. Note that the resulting hmac-secret varies according to whether user verification was performed by the authenticator. The .Fn fido_assert_set_hmac_secret function is normally only useful when writing tests.
p The .Fn fido_assert_set_up and .Fn fido_assert_set_uv functions set the .Fa up (user presence) and .Fa uv (user verification) attributes of .Fa assert . Both are .Dv FIDO_OPT_OMIT by default, allowing the authenticator to use its default settings.
p The .Fn fido_assert_set_winhello_appid function sets the U2F application .Fa id
q Dq U2F AppID of .Fa assert , where .Fa id is a NUL-terminated UTF-8 string. The content of .Fa id is copied, and no references to the passed pointer are kept. The .Fn fido_assert_set_winhello_appid function is a no-op unless .Fa assert is passed to .Xr fido_dev_get_assert 3 with a device .Fa dev on which .Xr fido_dev_is_winhello 3 holds true. In this case, .Em libfido2 will instruct Windows Hello to try the assertion twice, first with the .Fa id passed to .Fn fido_assert_set_rp , and a second time with the .Fa id passed to .Fn fido_assert_set_winhello_appid . If the second assertion succeeds, .Xr fido_assert_rp_id 3 will point to the U2F AppID once .Xr fido_dev_get_assert 3 completes. This mechanism exists in Windows Hello to ensure U2F backwards compatibility without the application inadvertently prompting the user twice. Note that .Fn fido_assert_set_winhello_appid is not needed on platforms offering CTAP primitives, since the authenticator can be silently probed for the existence of U2F credentials.
p Use of the .Nm set of functions may happen in two distinct situations: when asking a FIDO2 device to produce a series of assertion statements, prior to .Xr fido_dev_get_assert 3 (i.e, in the context of a FIDO2 client), or when verifying assertion statements using .Xr fido_assert_verify 3 (i.e, in the context of a FIDO2 server).
p For a complete description of the generation of a FIDO2 assertion and its verification, please refer to the FIDO2 specification. An example of how to use the .Nm set of functions can be found in the
a examples/assert.c file shipped with .Em libfido2 . .Sh RETURN VALUES The .Nm functions return .Dv FIDO_OK on success. The error codes returned by the .Nm set of functions are defined in n fido/err.h . .Sh SEE ALSO .Xr fido_assert_allow_cred 3 , .Xr fido_assert_verify 3 , .Xr fido_dev_get_assert 3 , .Xr fido_dev_is_winhello 3