Declarations for certificates related to ECC CryptoAuthentication devices. These are the definitions required to define a certificate and its various elements with regards to the CryptoAuthentication ECC devices. More...
#include <stddef.h>
#include <stdint.h>
#include "atca_compiler.h"
#include "atcacert.h"
#include "atcacert_date.h"
#include "atca_helpers.h"
#include "crypto/atca_crypto_sw.h"
#include "cal_buffer.h"
Data Structures | |
struct | atcacert_device_loc_s |
struct | atcacert_cert_loc_s |
struct | atcacert_cert_element_s |
struct | atcacert_def_s |
struct | atcacert_build_state_s |
Typedefs | |
typedef enum atcacert_cert_type_e | atcacert_cert_type_t |
typedef enum atcacert_cert_sn_src_e | atcacert_cert_sn_src_t |
typedef enum atcacert_device_zone_e | atcacert_device_zone_t |
typedef enum atcacert_transform_e | atcacert_transform_t |
How to transform the data from the device to the certificate. | |
typedef enum atcacert_std_cert_element_e | atcacert_std_cert_element_t |
typedef struct ATCA_PACKED atcacert_device_loc_s | atcacert_device_loc_t |
typedef struct ATCA_PACKED atcacert_cert_loc_s | atcacert_cert_loc_t |
typedef struct ATCA_PACKED atcacert_cert_element_s | atcacert_cert_element_t |
typedef struct atcacert_def_s | atcacert_def_t |
typedef struct atcacert_build_state_s | atcacert_build_state_t |
Functions | |
ATCA_STATUS | atcacert_get_subject (const atcacert_def_t *cert_def, const uint8_t *cert, size_t cert_size, cal_buffer *cert_subj_buf) |
Gets the subject name from a certificate. | |
ATCA_STATUS | atcacert_get_subj_public_key (const atcacert_def_t *cert_def, const uint8_t *cert, size_t cert_size, cal_buffer *subj_public_key) |
Gets the subject public key from a certificate. | |
ATCA_STATUS | atcacert_get_subj_key_id (const atcacert_def_t *cert_def, const uint8_t *cert, size_t cert_size, uint8_t subj_key_id[20]) |
Gets the subject key ID from a certificate. | |
ATCA_STATUS | atcacert_get_issuer (const atcacert_def_t *cert_def, const uint8_t *cert, size_t cert_size, uint8_t cert_issuer[128]) |
Gets the issuer name of a certificate. | |
ATCA_STATUS | atcacert_get_issue_date (const atcacert_def_t *cert_def, const uint8_t *cert, size_t cert_size, atcacert_tm_utc_t *timestamp) |
Gets the issue date from a certificate. Will be parsed according to the date format specified in the certificate definition. | |
ATCA_STATUS | atcacert_get_expire_date (const atcacert_def_t *cert_def, const uint8_t *cert, size_t cert_size, atcacert_tm_utc_t *timestamp) |
Gets the expire date from a certificate. Will be parsed according to the date format specified in the certificate definition. | |
ATCA_STATUS | atcacert_get_cert_sn (const atcacert_def_t *cert_def, const uint8_t *cert, size_t cert_size, uint8_t *cert_sn, size_t *cert_sn_size) |
Gets the certificate serial number from a certificate. | |
ATCA_STATUS | atcacert_get_auth_key_id (const atcacert_def_t *cert_def, const uint8_t *cert, size_t cert_size, uint8_t auth_key_id[20]) |
Gets the authority key ID from a certificate. | |
int | atcacert_calc_expire_years (const atcacert_def_t *cert_def, const uint8_t *cert, size_t cert_size, int issue_tm_year, uint8_t *expire_years) |
Declarations for certificates related to ECC CryptoAuthentication devices. These are the definitions required to define a certificate and its various elements with regards to the CryptoAuthentication ECC devices.
Only the dynamic elements of a certificate (the parts of the certificate that change from device to device) are stored on the ATECC device. The definitions here describe the form of the certificate, and where the dynamic elements can be found both on the ATECC device itself and in the certificate template.
This also defines utility functions for working with the certificates and their definitions.