MySQL 8.4.2
Source Code Documentation
client_registration::registration Class Referenceabstract

This class is used to perform registration step on client side. More...

#include <registration.h>

Inheritance diagram for client_registration::registration:
[legend]

Public Member Functions

 registration ()
 Construcutor to allocate memory for performing attestation (registration) More...
 
virtual ~registration ()
 Standard destructor. More...
 
bool make_credentials (const char *challenge)
 This method fills in all information required to initiate registration process. More...
 
void set_rp_id (std::string rp_id)
 Method to set the relying party name or id. More...
 
void set_user (std::string user)
 Set method to set user name. More...
 
size_t get_authdata_len ()
 Method to get length of authenticator data. More...
 
const unsigned char * get_authdata_ptr ()
 Method to get authenticator data. More...
 
size_t get_sig_len ()
 Method to get length of signature. More...
 
const unsigned char * get_sig_ptr ()
 Method to get signature data. More...
 
size_t get_x5c_len ()
 Method to get length of x509 certificate. More...
 
const unsigned char * get_x5c_ptr ()
 Method to get x509 certificate. More...
 
const char * get_rp_id ()
 Method to get rp id. More...
 
bool is_fido2 ()
 Method to check if token device supports CTAP2.1 resident keys feature. More...
 
virtual bool parse_challenge (const char *challenge)=0
 
virtual bool make_challenge_response (unsigned char *&buf)=0
 
virtual void set_client_data (const unsigned char *, const char *)=0
 
virtual bool generate_signature ()=0
 

Protected Member Functions

fido_dev_info_t * discover_fido2_devices (size_t num_devices)
 Discover available devices. More...
 

Protected Attributes

fido_cred_t * m_cred
 
bool m_is_fido2 {false}
 

Detailed Description

This class is used to perform registration step on client side.

Constructor & Destructor Documentation

◆ registration()

registration::registration ( )

Construcutor to allocate memory for performing attestation (registration)

◆ ~registration()

registration::~registration ( )
virtual

Standard destructor.

Member Function Documentation

◆ discover_fido2_devices()

fido_dev_info_t * registration::discover_fido2_devices ( size_t  num_devices)
protected

Discover available devices.

Caller should always free num_devices + 1.

Parameters
[in]num_devicesNumber of devices to open
Returns
handle to fido_dev_info_t array on success. null otherwise.

◆ generate_signature()

virtual bool client_registration::registration::generate_signature ( )
pure virtual

Implemented in webauthn_registration.

◆ get_authdata_len()

size_t registration::get_authdata_len ( )

Method to get length of authenticator data.

Return values
lengthof authenticator data.

◆ get_authdata_ptr()

const unsigned char * registration::get_authdata_ptr ( )

Method to get authenticator data.

Return values
bufferholding authenticator data

◆ get_rp_id()

const char * registration::get_rp_id ( )

Method to get rp id.

Return values
bufferholding rp id

◆ get_sig_len()

size_t registration::get_sig_len ( )

Method to get length of signature.

Return values
lengthof signature

◆ get_sig_ptr()

const unsigned char * registration::get_sig_ptr ( )

Method to get signature data.

Return values
bufferholding signature data

◆ get_x5c_len()

size_t registration::get_x5c_len ( )

Method to get length of x509 certificate.

Return values
lengthof x509 certificate

◆ get_x5c_ptr()

const unsigned char * registration::get_x5c_ptr ( )

Method to get x509 certificate.

Return values
bufferholding x509 certificate

◆ is_fido2()

bool registration::is_fido2 ( )

Method to check if token device supports CTAP2.1 resident keys feature.

Return values
falseauthenticator does not support resident keys
trueauthenticator supports resident keys

◆ make_challenge_response()

virtual bool client_registration::registration::make_challenge_response ( unsigned char *&  buf)
pure virtual

Implemented in webauthn_registration.

◆ make_credentials()

bool registration::make_credentials ( const char *  challenge)

This method fills in all information required to initiate registration process.

This method parses server challenge and generates challenge response.

Parameters
[in]challengebuffer holding the server challenge
Return values
falsesuccessfull generation of credentials.
trueerror occurred.

◆ parse_challenge()

virtual bool client_registration::registration::parse_challenge ( const char *  challenge)
pure virtual

Implemented in webauthn_registration.

◆ set_client_data()

virtual void client_registration::registration::set_client_data ( const unsigned char *  ,
const char *   
)
pure virtual

Implemented in webauthn_registration.

◆ set_rp_id()

void registration::set_rp_id ( std::string  rp_id)

Method to set the relying party name or id.

Parameters
[in]rp_idbuffer holding relying party name

◆ set_user()

void registration::set_user ( std::string  user)

Set method to set user name.

Parameters
[in]userbuffer holding user name

Member Data Documentation

◆ m_cred

fido_cred_t* client_registration::registration::m_cred
protected

◆ m_is_fido2

bool client_registration::registration::m_is_fido2 {false}
protected

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