Trident IoT Z-Wave SDK
 
Loading...
Searching...
No Matches
cc_user_credential_validation.h File Reference
+ Include dependency graph for cc_user_credential_validation.h:

Go to the source code of this file.

Typedefs

typedef bool(* u3c_credential_type_validator_t) (u3c_credential_t *, RECEIVE_OPTIONS_TYPE_EX *)
 

Functions

bool find_existing_credential (const u3c_credential_t *const p_credential, u3c_credential_metadata_t *p_existing_metadata)
 
bool validate_credential_data (u3c_credential_t *p_credential, RECEIVE_OPTIONS_TYPE_EX *p_rx_options)
 
bool validate_new_credential_metadata (const u3c_credential_metadata_t *const p_metadata)
 
bool validate_associated_uuid (uint16_t uuid)
 
bool validate_new_credential_data (u3c_credential_t *p_credential, RECEIVE_OPTIONS_TYPE_EX *p_rx_options)
 
bool validate_admin_pin_code (u3c_admin_code_metadata_t *const data)
 Validates that credential does not exist in the database, is not a duplicate of the admin code and conforms to the manufacturer security rules.
 
bool validate_user_name_encoding (const uint8_t *p_name, uint8_t p_name_length, u3c_user_name_encoding p_name_encoding)
 

Detailed Description

User Credential Command Class credential validation.

Typedef Documentation

◆ u3c_credential_type_validator_t

typedef bool(* u3c_credential_type_validator_t) (u3c_credential_t *, RECEIVE_OPTIONS_TYPE_EX *)

Function pointer type for Credential Type Validators

Function Documentation

◆ find_existing_credential()

bool find_existing_credential ( const u3c_credential_t *const p_credential,
u3c_credential_metadata_t * p_existing_metadata )

Checks whether a Credential is identical to an existing Credential in the database.

Parameters
[in]p_credentialPointer to the incoming credential
[out]p_existing_metadataPointer to the existing credential metadata (valid only if true was returned)
Returns
true if the credential is a duplicate

◆ validate_admin_pin_code()

bool validate_admin_pin_code ( u3c_admin_code_metadata_t *const data)

Validates that credential does not exist in the database, is not a duplicate of the admin code and conforms to the manufacturer security rules.

This function checks that the following requirements are satisfied:

CC:0083.01.1A.13.004 - AC is not a duplicate of the current AC CC:0083.01.1A.13.005 - AC is not a duplicate of the existing credential CC:0083.01.1A.11.011 - Manufacturer and application specific requirements

Parameters
dataPointer to structure containing Admin Code information.
Returns
True if all checks pass. If checks do not pass, returns false, and result code populated in code struct.
Note
result code of a successful check should be ignored, but in practice ensure it is set to ADMIN_CODE_OPERATION_RESULT_NONE in this case.

◆ validate_associated_uuid()

bool validate_associated_uuid ( uint16_t uuid)

Validates that a UUID belongs to an existing user.

Parameters
[in]uuidUUID to check if exists
Returns
true if user exists

◆ validate_credential_data()

bool validate_credential_data ( u3c_credential_t * p_credential,
RECEIVE_OPTIONS_TYPE_EX * p_rx_options )

Function for validating a Credential against the rules mandated by the specification

Parameters
[in]p_credentialPointer to the incoming credential
[in]p_rx_optionsPointer to the properties of the incoming frame
Returns
true if the credential passes all checks

◆ validate_new_credential_data()

bool validate_new_credential_data ( u3c_credential_t * p_credential,
RECEIVE_OPTIONS_TYPE_EX * p_rx_options )

Validates that a new Credential is not a duplicate and that it conforms to the manufacturer's security rules and sends the required reports if these checks fail.

Parameters
[in]p_credentialPointer to the incoming Credential data
[in]p_rx_optionsPointer to the properties of the incoming frame (set to NULL if a response should not be sent)
Returns
true if the Credential passes all checks

◆ validate_new_credential_metadata()

bool validate_new_credential_metadata ( const u3c_credential_metadata_t *const p_metadata)

Validates that a new Credential conforms to the active configuration of the User Credential Command Class.

Parameters
[in]p_metadataPointer to the incoming Credential data
Returns
true if the Credential passes all checks

◆ validate_user_name_encoding()

bool validate_user_name_encoding ( const uint8_t * p_name,
uint8_t p_name_length,
u3c_user_name_encoding p_name_encoding )

Validates user name encoding.

Parameters
[in]p_nameUser name string.
[in]p_name_lengthLength of username in bytes.
[in]p_name_encodingUser name encoding.
Returns
true if user name is valid for the given encoding.