A wrapper class which abstracts all access to FIDO device.
More...
#include <fido_registration.h>
|
| fido_make_cred () |
| Construcutor to allocate memory for performing attestation (registration) More...
|
|
| ~fido_make_cred () |
| Standard destructor. More...
|
|
bool | make_credentials (const char *challenge) |
| This method fills in all information required to initiate registration process. More...
|
|
bool | make_challenge_response (unsigned char *&challenge_response) |
| This method will extract authenticator data, signature, certificate and rp id from fido_cred_t struct, construct a buffer holding this data which will be converted to base64 format before passing to server. More...
|
|
A wrapper class which abstracts all access to FIDO device.
◆ fido_make_cred()
fido_make_cred::fido_make_cred |
( |
| ) |
|
Construcutor to allocate memory for performing attestation (registration)
◆ ~fido_make_cred()
fido_make_cred::~fido_make_cred |
( |
| ) |
|
◆ generate_signature()
bool fido_make_cred::generate_signature |
( |
| ) |
|
|
private |
This method checks if a token device is available on client host.
If device is present, device expects user to perform gesture action, upon which device generates credential details, which consists of authenticator data, signature and optional x509 certificate which is passed to server.
- Return values
-
FIDO_OK(false) | successful generation of credentials. |
true | error occurred. |
◆ get_authdata_len()
size_t fido_make_cred::get_authdata_len |
( |
| ) |
|
|
private |
Method to get length of authenticator data.
- Return values
-
length | of authenticator data. |
◆ get_authdata_ptr()
const unsigned char * fido_make_cred::get_authdata_ptr |
( |
| ) |
|
|
private |
Method to get authenticator data.
- Return values
-
buffer | holding authenticator data |
◆ get_rp_id()
const char * fido_make_cred::get_rp_id |
( |
| ) |
|
|
private |
Method to get rp id.
- Return values
-
◆ get_sig_len()
size_t fido_make_cred::get_sig_len |
( |
| ) |
|
|
private |
Method to get length of signature.
- Return values
-
◆ get_sig_ptr()
const unsigned char * fido_make_cred::get_sig_ptr |
( |
| ) |
|
|
private |
Method to get signature data.
- Return values
-
buffer | holding signature data |
◆ get_x5c_len()
size_t fido_make_cred::get_x5c_len |
( |
| ) |
|
|
private |
Method to get length of x509 certificate.
- Return values
-
length | of x509 certificate |
◆ get_x5c_ptr()
const unsigned char * fido_make_cred::get_x5c_ptr |
( |
| ) |
|
|
private |
Method to get x509 certificate.
- Return values
-
buffer | holding x509 certificate |
◆ make_challenge_response()
bool fido_make_cred::make_challenge_response |
( |
unsigned char *& |
challenge_response | ) |
|
This method will extract authenticator data, signature, certificate and rp id from fido_cred_t struct, construct a buffer holding this data which will be converted to base64 format before passing to server.
- Parameters
-
[out] | challenge_response | buffer to hold challenge response |
- Return values
-
◆ make_credentials()
bool fido_make_cred::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] | challenge | buffer holding the server challenge |
- Return values
-
false | successful generation of credentials. |
true | error occurred. |
◆ parse_challenge()
bool fido_make_cred::parse_challenge |
( |
const char * |
challenge | ) |
|
|
private |
Helper method to parse the challenge received from server during registration process.
This method extracts salt, user name, relying party name and set it in fido_cred_t.
- Parameters
-
[in] | challenge | buffer holding the server challenge |
- Return values
-
◆ set_rp_id()
void fido_make_cred::set_rp_id |
( |
std::string |
rp_id | ) |
|
|
private |
Method to set the relying party name or id.
- Parameters
-
[in] | rp_id | buffer holding relying party name |
◆ set_scramble()
void fido_make_cred::set_scramble |
( |
unsigned char * |
scramble, |
|
|
size_t |
len |
|
) |
| |
|
private |
Set method to set 32 bit random salt.
- Parameters
-
[in] | scramble | buffer holding random salt |
[in] | len | length of salt |
◆ set_type()
void fido_make_cred::set_type |
( |
int |
type = COSE_ES256 | ) |
|
|
private |
Method to set the algorithm type.
- Parameters
-
◆ set_user()
void fido_make_cred::set_user |
( |
std::string |
user | ) |
|
|
private |
Set method to set user name.
- Parameters
-
[in] | user | buffer holding user name |
◆ m_cred
fido_cred_t* fido_make_cred::m_cred |
|
private |
The documentation for this class was generated from the following files: