CryptoAuthLib
Microchip CryptoAuthentication Library
atcacert_client.h
Go to the documentation of this file.
1 
31 #ifndef ATCACERT_CLIENT_H
32 #define ATCACERT_CLIENT_H
33 
34 #include <stddef.h>
35 #include <stdint.h>
36 #include "atcacert_def.h"
37 
38 // Inform function naming when compiling in C++
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42 
73 int atcacert_read_cert(const atcacert_def_t* cert_def,
74  const uint8_t ca_public_key[64],
75  uint8_t* cert,
76  size_t* cert_size);
77 
89 int atcacert_write_cert(const atcacert_def_t* cert_def,
90  const uint8_t* cert,
91  size_t cert_size);
92 
104 int atcacert_create_csr(const atcacert_def_t* csr_def, uint8_t* csr, size_t* csr_size);
105 
117 int atcacert_create_csr_pem(const atcacert_def_t* csr_def, char* csr, size_t* csr_size);
118 
133 int atcacert_get_response(uint8_t device_private_key_slot,
134  const uint8_t challenge[32],
135  uint8_t response[64]);
136 
138 #ifdef __cplusplus
139 }
140 #endif
141 
142 #endif
int atcacert_create_csr(const atcacert_def_t *csr_def, uint8_t *csr, size_t *csr_size)
Creates a CSR specified by the CSR definition from the ATECC508A device. This process involves readin...
Definition: atcacert_client.c:218
int atcacert_get_response(uint8_t device_private_key_slot, const uint8_t challenge[32], uint8_t response[64])
Calculates the response to a challenge sent from the host.
Definition: atcacert_client.c:38
int atcacert_read_cert(const atcacert_def_t *cert_def, const uint8_t ca_public_key[64], uint8_t *cert, size_t *cert_size)
Reads the certificate specified by the certificate definition from the ATECC508A device.
Definition: atcacert_client.c:50
int atcacert_create_csr_pem(const atcacert_def_t *csr_def, char *csr, size_t *csr_size)
Creates a CSR specified by the CSR definition from the ATECC508A device. This process involves readin...
Definition: atcacert_client.c:182
Declarations for certificates related to ECC CryptoAuthentication devices. These are the definitions ...
int atcacert_write_cert(const atcacert_def_t *cert_def, const uint8_t *cert, size_t cert_size)
Take a full certificate and write it to the ATECC508A device according to the certificate definition...
Definition: atcacert_client.c:125
Definition: atcacert_def.h:149