Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
FIDO_CBOR_INFO_NEW(3)  FreeBSD Library Functions Manual	 FIDO_CBOR_INFO_NEW(3)

NAME
     fido_cbor_info_new, fido_cbor_info_free, fido_dev_get_cbor_info,
     fido_cbor_info_aaguid_ptr,	fido_cbor_info_extensions_ptr,
     fido_cbor_info_protocols_ptr, fido_cbor_info_versions_ptr,
     fido_cbor_info_options_name_ptr, fido_cbor_info_options_value_ptr,
     fido_cbor_info_aaguid_len,	fido_cbor_info_extensions_len,
     fido_cbor_info_protocols_len, fido_cbor_info_versions_len,
     fido_cbor_info_options_len, fido_cbor_info_maxmsgsiz,
     fido_cbor_info_fwversion -- FIDO 2	CBOR Info API

SYNOPSIS
     #include <fido.h>

     fido_cbor_info_t *
     fido_cbor_info_new(void);

     void
     fido_cbor_info_free(fido_cbor_info_t **ci_p);

     int
     fido_dev_get_cbor_info(fido_dev_t *dev, fido_cbor_info_t *ci);

     const unsigned char *
     fido_cbor_info_aaguid_ptr(const fido_cbor_info_t *ci);

     char **
     fido_cbor_info_extensions_ptr(const fido_cbor_info_t *ci);

     const uint8_t *
     fido_cbor_info_protocols_ptr(const	fido_cbor_info_t *ci);

     char **
     fido_cbor_info_versions_ptr(const fido_cbor_info_t	*ci);

     char **
     fido_cbor_info_options_name_ptr(const fido_cbor_info_t *ci);

     const bool	*
     fido_cbor_info_options_value_ptr(const fido_cbor_info_t *ci);

     size_t
     fido_cbor_info_aaguid_len(const fido_cbor_info_t *ci);

     size_t
     fido_cbor_info_extensions_len(const fido_cbor_info_t *ci);

     size_t
     fido_cbor_info_protocols_len(const	fido_cbor_info_t *ci);

     size_t
     fido_cbor_info_versions_len(const fido_cbor_info_t	*ci);

     size_t
     fido_cbor_info_options_len(const fido_cbor_info_t *ci);

     uint64_t
     fido_cbor_info_maxmsgsiz(const fido_cbor_info_t *ci);

     uint64_t
     fido_cbor_info_fwversion(const fido_cbor_info_t *ci);

DESCRIPTION
     The fido_cbor_info_new() function returns a pointer to a newly allocated,
     empty fido_cbor_info_t type.  If memory cannot be allocated, NULL is re-
     turned.

     The fido_cbor_info_free() function	releases the memory backing *ci_p,
     where *ci_p must have been	previously allocated by	fido_cbor_info_new().
     On	return,	*ci_p is set to	NULL.  Either ci_p or *ci_p may	be NULL, in
     which case	fido_cbor_info_free() is a NOP.

     The fido_dev_get_cbor_info() function transmits a CTAP_CBOR_GETINFO com-
     mand to dev and fills ci with attributes retrieved	from the command's re-
     sponse.  The fido_dev_get_cbor_info() function may	block.

     The fido_cbor_info_aaguid_ptr(), fido_cbor_info_extensions_ptr(),
     fido_cbor_info_protocols_ptr(), and fido_cbor_info_versions_ptr() func-
     tions return pointers to the AAGUID, supported extensions,	PIN protocol
     and CTAP version strings of ci.  The corresponding	length of a given at-
     tribute can be obtained by	fido_cbor_info_aaguid_len(),
     fido_cbor_info_extensions_len(), fido_cbor_info_protocols_len(), or
     fido_cbor_info_versions_len().

     The fido_cbor_info_options_name_ptr() and
     fido_cbor_info_options_value_ptr()	functions return pointers to the array
     of	option names and their respective values in ci.	 The length of the op-
     tions array is returned by	fido_cbor_info_options_len().

     The fido_cbor_info_maxmsgsiz() function returns the maximum message size
     attribute of ci.

     The fido_cbor_info_fwversion() function returns the firmware version at-
     tribute of	ci.

     A complete	example	of how to use these functions can be found in the
     example/info.c file shipped with libfido2.

RETURN VALUES
     The fido_cbor_info_aaguid_ptr(), fido_cbor_info_extensions_ptr(),
     fido_cbor_info_protocols_ptr(), fido_cbor_info_versions_ptr(),
     fido_cbor_info_options_name_ptr(),	and fido_cbor_info_options_value_ptr()
     functions return NULL if the respective field in ci is absent.  If	not
     NULL, returned pointers are guaranteed to exist until any API function
     that takes	ci without the const qualifier is invoked.

SEE ALSO
     fido_dev_open(3)

FreeBSD	13.0			 May 24, 2018			  FreeBSD 13.0

NAME | SYNOPSIS | DESCRIPTION | RETURN VALUES | SEE ALSO

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=fido_cbor_info_new&sektion=3&manpath=FreeBSD+12.1-RELEASE+and+Ports>

home | help