All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches

FIDO2 CTAP utility helper More...

Detailed Description

FIDO2 CTAP utility helper

Files

file  ctap_utils.h
 Definition for CTAP utility functions.
 

Functions

void fido2_ctap_utils_wait_for_user_presence (void)
 LED animation to indicate that user action is required.
 
ctap_status_code_t fido2_ctap_utils_init_gpio_pin (gpio_t pin, gpio_mode_t mode, gpio_flank_t flank)
 Initialize button to be used for user presence test.
 
ctap_status_code_t fido2_ctap_utils_user_presence_test (void)
 Test user presence.
 
static int fido2_ctap_utils_cred_cmp (const void *k1, const void *k2)
 Compare fido2 credentials based on id to find more recent one.
 
static bool fido2_ctap_utils_ks_equal (const ctap_resident_key_t *k1, const ctap_resident_key_t *k2)
 Check equality of resident keys based on rp_id_hash and user_id.
 

Function Documentation

◆ fido2_ctap_utils_cred_cmp()

static int fido2_ctap_utils_cred_cmp ( const void * k1,
const void * k2 )
inlinestatic

Compare fido2 credentials based on id to find more recent one.

The more recent credential has a higher id. Therefore we sort in descending order.

Parameters
[in]k1first resident key
[in]k2second resident key
Returns
<0 if k1 > k2
>0 if k1 < k2

Definition at line 66 of file ctap_utils.h.

◆ fido2_ctap_utils_init_gpio_pin()

ctap_status_code_t fido2_ctap_utils_init_gpio_pin ( gpio_t pin,
gpio_mode_t mode,
gpio_flank_t flank )

Initialize button to be used for user presence test.

Returns
ctap_status_code_t

◆ fido2_ctap_utils_ks_equal()

static bool fido2_ctap_utils_ks_equal ( const ctap_resident_key_t * k1,
const ctap_resident_key_t * k2 )
inlinestatic

Check equality of resident keys based on rp_id_hash and user_id.

Parameters
[in]k1first resident key
[in]k2second resident key
Returns
true if equal false otherwise

Definition at line 83 of file ctap_utils.h.

◆ fido2_ctap_utils_user_presence_test()

ctap_status_code_t fido2_ctap_utils_user_presence_test ( void )

Test user presence.

Successful if user clicks button in less than CTAP_UP_TIMEOUT

Returns
ctap_status_code_t