MySQL 8.3.0
Source Code Documentation
fido_assertion Class Reference

Class to initiate authentication(aka assertion in FIDO terminology) on client side by generating a signed signature by FIDO device which needs to be sent to server to be verified. More...

#include <fido_assertion.h>

Inheritance diagram for fido_assertion:
[legend]

Public Member Functions

 fido_assertion ()=default
 
bool get_signed_challenge (unsigned char **challenge_res, size_t &challenge_res_len) override
 This method will extract authenticator data, signature from fido_assert_t struct and serialize it. More...
 
void set_client_data (const unsigned char *, const char *) override
 Set method to set 32 bytes random salt. More...
 
bool sign_challenge () override
 Method to obtains an assertion from a FIDO device. More...
 
bool parse_challenge (const unsigned char *challenge) override
 Helper method to parse the challenge received from server during authentication process. More...
 
- Public Member Functions inherited from client_authentication::assertion
 assertion ()
 Construcutor to allocate memory for performing assertion (authentication) More...
 
virtual ~assertion ()
 Standard destructor. More...
 
void set_cred_id (const unsigned char *cred, size_t len)
 Set method to set credential ID. More...
 
void set_rp_id (const char *rp_id)
 Method to set the relying party name or id. More...
 
const char * get_rp_id ()
 Method to get rp id. More...
 
const unsigned char * get_authdata_ptr (size_t index=0)
 Method to get authenticator data. More...
 
size_t get_authdata_len (size_t index=0)
 Method to get length of authenticator data. More...
 
const unsigned char * get_signature_ptr (size_t index=0)
 Method to get signature. More...
 
size_t get_signature_len (size_t index=0)
 Method to get length of signature. More...
 
size_t get_num_assertions ()
 Method to get number of assertions. More...
 

Additional Inherited Members

- Protected Member Functions inherited from client_authentication::assertion
fido_dev_info_t * discover_fido2_devices (size_t num_devices)
 Discover available devices. More...
 
- Protected Attributes inherited from client_authentication::assertion
fido_assert_t * m_assert
 

Detailed Description

Class to initiate authentication(aka assertion in FIDO terminology) on client side by generating a signed signature by FIDO device which needs to be sent to server to be verified.

Constructor & Destructor Documentation

◆ fido_assertion()

fido_assertion::fido_assertion ( )
default

Member Function Documentation

◆ get_signed_challenge()

bool fido_assertion::get_signed_challenge ( unsigned char **  challenge_res,
size_t &  challenge_res_len 
)
overridevirtual

This method will extract authenticator data, signature from fido_assert_t struct and serialize it.

Parameters
[out]challenge_resbuffer to signed challenge
[out]challenge_res_lenlength of signed challenge
Return values
falsesuccessful.
truefailed.

Implements client_authentication::assertion.

◆ parse_challenge()

bool fido_assertion::parse_challenge ( const unsigned char *  challenge)
overridevirtual

Helper method to parse the challenge received from server during authentication process.

This method extracts salt, relying party name and credential ID.

Parameters
[in]challengebuffer holding the server challenge
Return values
falsereceived challenge was valid
truereceived challenge was corrupt

Implements client_authentication::assertion.

◆ set_client_data()

void fido_assertion::set_client_data ( const unsigned char *  salt,
const char *   
)
overridevirtual

Set method to set 32 bytes random salt.

Parameters
[in]saltbuffer holding random salt

Implements client_authentication::assertion.

◆ sign_challenge()

bool fido_assertion::sign_challenge ( )
overridevirtual

Method to obtains an assertion from a FIDO device.

Return values
falseassertion successful.
trueassertion failed.

Implements client_authentication::assertion.


The documentation for this class was generated from the following files: