CryptoAuthLib
Microchip CryptoAuthentication Library
atcacert_def_s Struct Reference

#include <atcacert_def.h>

Data Fields

atcacert_cert_type_t type
 Certificate type. More...
 
uint8_t template_id
 ID for the this certificate definition (4-bit value). More...
 
uint8_t chain_id
 ID for the certificate chain this definition is a part of (4-bit value). More...
 
uint8_t private_key_slot
 If this is a device certificate template, this is the device slot for the device private key. More...
 
atcacert_cert_sn_src_t sn_source
 Where the certificate serial number comes from (4-bit value). More...
 
atcacert_device_loc_t cert_sn_dev_loc
 Only applies when sn_source is SNSRC_STORED or SNSRC_STORED_DYNAMIC. Describes where to get the certificate serial number on the device. More...
 
atcacert_date_format_t issue_date_format
 Format of the issue date in the certificate. More...
 
atcacert_date_format_t expire_date_format
 format of the expire date in the certificate. More...
 
atcacert_cert_loc_t tbs_cert_loc
 Location in the certificate for the TBS (to be signed) portion. More...
 
uint8_t expire_years
 Number of years the certificate is valid for (5-bit value). 0 means no expiration. More...
 
atcacert_device_loc_t public_key_dev_loc
 Where on the device the public key can be found. More...
 
atcacert_device_loc_t comp_cert_dev_loc
 Where on the device the compressed cert can be found. More...
 
atcacert_cert_loc_t std_cert_elements [STDCERT_NUM_ELEMENTS]
 Where in the certificate template the standard cert elements are inserted. More...
 
const atcacert_cert_element_tcert_elements
 Additional certificate elements outside of the standard certificate contents. More...
 
uint8_t cert_elements_count
 Number of additional certificate elements in cert_elements. More...
 
const uint8_t * cert_template
 Pointer to the actual certificate template data. More...
 
uint16_t cert_template_size
 Size of the certificate template in cert_template in bytes. More...
 
const struct atcacert_def_sca_cert_def
 Certificate definition of the CA certificate. More...
 

Detailed Description

Defines a certificate and all the pieces to work with it.

If any of the standard certificate elements (std_cert_elements) are not a part of the certificate definition, set their count to 0 to indicate their absence.

Field Documentation

◆ ca_cert_def

const struct atcacert_def_s* ca_cert_def

Certificate definition of the CA certificate.

◆ cert_elements

const atcacert_cert_element_t* cert_elements

Additional certificate elements outside of the standard certificate contents.

◆ cert_elements_count

uint8_t cert_elements_count

Number of additional certificate elements in cert_elements.

◆ cert_sn_dev_loc

atcacert_device_loc_t cert_sn_dev_loc

Only applies when sn_source is SNSRC_STORED or SNSRC_STORED_DYNAMIC. Describes where to get the certificate serial number on the device.

◆ cert_template

const uint8_t* cert_template

Pointer to the actual certificate template data.

◆ cert_template_size

uint16_t cert_template_size

Size of the certificate template in cert_template in bytes.

◆ chain_id

uint8_t chain_id

ID for the certificate chain this definition is a part of (4-bit value).

◆ comp_cert_dev_loc

atcacert_device_loc_t comp_cert_dev_loc

Where on the device the compressed cert can be found.

◆ expire_date_format

atcacert_date_format_t expire_date_format

format of the expire date in the certificate.

◆ expire_years

uint8_t expire_years

Number of years the certificate is valid for (5-bit value). 0 means no expiration.

◆ issue_date_format

atcacert_date_format_t issue_date_format

Format of the issue date in the certificate.

◆ private_key_slot

uint8_t private_key_slot

If this is a device certificate template, this is the device slot for the device private key.

◆ public_key_dev_loc

atcacert_device_loc_t public_key_dev_loc

Where on the device the public key can be found.

◆ sn_source

Where the certificate serial number comes from (4-bit value).

◆ std_cert_elements

Where in the certificate template the standard cert elements are inserted.

◆ tbs_cert_loc

atcacert_cert_loc_t tbs_cert_loc

Location in the certificate for the TBS (to be signed) portion.

◆ template_id

uint8_t template_id

ID for the this certificate definition (4-bit value).

◆ type

Certificate type.