Skip to content

Commit 1ea2652

Browse files
committed
MCU8MASS-521, MCU8MASS-522 Update inject script for cryptoauth lib
This commit changes the inject script to clone cryptoauthlib from github (.gitignore is changed to ignore the repo once cloned). It also fixes proper support for the 48 pin variant with passing mmcu flag from the CMakeList file. F_CPU is also set for compiling cryptoauthlib. This fixes the bug in the hal_driver where a delay had to be done before retrieving messages.
1 parent 1cd8c64 commit 1ea2652

26 files changed

+574
-29
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,7 @@ build/
44
.vscode/c_cpp_properties.json
55
.vscode/arduino.json
66
deploy_sandbox
7-
builds
7+
builds
8+
lib/cryptoauth/cryptoauthlib
9+
lib/cryptoauth/build48
10+
lib/cryptoauth/build64

lib/cryptoauth/CMakeLists.txt

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
cmake_minimum_required(VERSION 3.1.0)
2+
3+
# This is to prevent platform specific rules and includes for UNIX, Windows
4+
# and macOS to trigger in the CMakeLists for the cryptoauthlib which are not
5+
# needed and relevant for AVR
6+
set(CMAKE_SYSTEM_NAME Generic)
7+
8+
# We don't want to compile a dynamic library
9+
set(CMAKE_TRY_COMPILE_TARGET_TYPE "STATIC_LIBRARY")
10+
11+
# Force CMake to use avr-gcc/g++ and their related tools
12+
set(CMAKE_CXX_COMPILER /usr/bin/avr-g++)
13+
set(CMAKE_C_COMPILER /usr/bin/avr-gcc)
14+
set(CMAKE_ADDR2LINE /usr/bin/avr-addr2line)
15+
set(CMAKE_AR /usr/bin/avr-ar)
16+
set(CMAKE_LINKER /usr/bin/avr-ld)
17+
set(CMAKE_NM /usr/bin/avr-nm)
18+
19+
set(CMAKE_CXX_FLAGS "-fdata-sections -B ${CMAKE_CURRENT_SOURCE_DIR} -Os -Wl,--relax,--gc-sections -mmcu=${MCU} -DF_CPU=24000000")
20+
set(CMAKE_C_FLAGS "-fdata-sections -B ${CMAKE_CURRENT_SOURCE_DIR} -Os -Wl,--relax,--gc-sections -mmcu=${MCU} -DF_CPU=24000000")
21+
22+
project(cryptoauth)
23+
24+
# We have to add the subdirectory here to actually initiate the compilation
25+
# of the rest of the chain of the library down in the hierarchy
26+
add_subdirectory(cryptoauthlib)
27+
28+
29+
file(COPY atca_config.h DESTINATION cryptoauthlib/lib)

lib/cryptoauth/atca_config.h

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/* Auto-generated config file atca_config.h */
2+
#ifndef ATCA_CONFIG_H
3+
#define ATCA_CONFIG_H
4+
5+
/* Included HALS */
6+
#define ATCA_HAL_I2C
7+
8+
#define ATCA_ATECC608_SUPPORT
9+
10+
/* \brief How long to wait after an initial wake failure for the POST to
11+
* complete.
12+
* If Power-on self test (POST) is enabled, the self test will run on waking
13+
* from sleep or during power-on, which delays the wake reply.
14+
*/
15+
#ifndef ATCA_POST_DELAY_MSEC
16+
#define ATCA_POST_DELAY_MSEC 25
17+
#endif
18+
19+
/***************** Diagnostic & Test Configuration Section *****************/
20+
21+
/** Enable debug messages */
22+
// #define ATCA_PRINTF
23+
//
24+
25+
/******************** Platform Configuration Section ***********************/
26+
27+
/** Define platform malloc/free */
28+
#define ATCA_PLATFORM_MALLOC malloc
29+
#define ATCA_PLATFORM_FREE free
30+
31+
#define __DELAY_BACKWARD_COMPATIBLE__
32+
33+
#include <util/delay.h>
34+
35+
#define atca_delay_ms _delay_ms
36+
#define atca_delay_us _delay_us
37+
38+
#endif // ATCA_CONFIG_H

lib/cryptoauth/cert_def_1_signer.c

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
#include "atcacert/atcacert_def.h"
2+
3+
const uint8_t g_cert_template_1_signer[520] = {
4+
0x30, 0x82, 0x02, 0x04, 0x30, 0x82, 0x01, 0xaa, 0xa0, 0x03, 0x02, 0x01,
5+
0x02, 0x02, 0x10, 0x44, 0x0e, 0xe4, 0x17, 0x0c, 0xb5, 0x45, 0xce, 0x59,
6+
0x69, 0x8e, 0x30, 0x56, 0x99, 0x0a, 0x5d, 0x30, 0x0a, 0x06, 0x08, 0x2a,
7+
0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x30, 0x4f, 0x31, 0x21, 0x30,
8+
0x1f, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x18, 0x4d, 0x69, 0x63, 0x72,
9+
0x6f, 0x63, 0x68, 0x69, 0x70, 0x20, 0x54, 0x65, 0x63, 0x68, 0x6e, 0x6f,
10+
0x6c, 0x6f, 0x67, 0x79, 0x20, 0x49, 0x6e, 0x63, 0x31, 0x2a, 0x30, 0x28,
11+
0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x21, 0x43, 0x72, 0x79, 0x70, 0x74,
12+
0x6f, 0x20, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61,
13+
0x74, 0x69, 0x6f, 0x6e, 0x20, 0x52, 0x6f, 0x6f, 0x74, 0x20, 0x43, 0x41,
14+
0x20, 0x30, 0x30, 0x32, 0x30, 0x20, 0x17, 0x0d, 0x31, 0x38, 0x31, 0x31,
15+
0x30, 0x38, 0x30, 0x34, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x18, 0x0f, 0x32,
16+
0x30, 0x34, 0x39, 0x31, 0x31, 0x30, 0x38, 0x30, 0x34, 0x30, 0x30, 0x30,
17+
0x30, 0x5a, 0x30, 0x4f, 0x31, 0x21, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x04,
18+
0x0a, 0x0c, 0x18, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x63, 0x68, 0x69, 0x70,
19+
0x20, 0x54, 0x65, 0x63, 0x68, 0x6e, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x20,
20+
0x49, 0x6e, 0x63, 0x31, 0x2a, 0x30, 0x28, 0x06, 0x03, 0x55, 0x04, 0x03,
21+
0x0c, 0x21, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x20, 0x41, 0x75, 0x74,
22+
0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20,
23+
0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x20, 0x46, 0x46, 0x46, 0x46, 0x30,
24+
0x59, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02, 0x01,
25+
0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42,
26+
0x00, 0x04, 0x84, 0x98, 0x44, 0x0a, 0x31, 0x9b, 0x3f, 0x71, 0xe2, 0x5d,
27+
0x52, 0x26, 0x00, 0x90, 0x00, 0xc7, 0x56, 0xbd, 0x5c, 0x0f, 0xae, 0x4a,
28+
0x1b, 0x84, 0x1a, 0xd4, 0xa3, 0x3f, 0x21, 0xab, 0xa0, 0x9a, 0x48, 0x10,
29+
0x1c, 0x75, 0xc8, 0x28, 0x24, 0x90, 0xb3, 0xb6, 0x5a, 0x52, 0x80, 0x27,
30+
0x29, 0xbd, 0x3a, 0x75, 0x2c, 0x3d, 0xf0, 0xdd, 0x1b, 0x04, 0xa2, 0xa1,
31+
0xb5, 0x7e, 0x0c, 0x92, 0x24, 0x47, 0xa3, 0x66, 0x30, 0x64, 0x30, 0x0e,
32+
0x06, 0x03, 0x55, 0x1d, 0x0f, 0x01, 0x01, 0xff, 0x04, 0x04, 0x03, 0x02,
33+
0x01, 0x86, 0x30, 0x12, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff,
34+
0x04, 0x08, 0x30, 0x06, 0x01, 0x01, 0xff, 0x02, 0x01, 0x00, 0x30, 0x1d,
35+
0x06, 0x03, 0x55, 0x1d, 0x0e, 0x04, 0x16, 0x04, 0x14, 0xbc, 0xd4, 0xfd,
36+
0xe8, 0x80, 0x8a, 0x2d, 0xc9, 0x0b, 0x6d, 0x01, 0xa8, 0xc5, 0xb9, 0xb2,
37+
0x47, 0x33, 0x7e, 0xbd, 0xda, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x1d, 0x23,
38+
0x04, 0x18, 0x30, 0x16, 0x80, 0x14, 0x7a, 0xed, 0x7d, 0x6d, 0xc6, 0xb7,
39+
0x78, 0x9d, 0xb2, 0x38, 0x01, 0xa5, 0xe8, 0x4a, 0x8c, 0xb0, 0xa4, 0x0e,
40+
0x2a, 0x8c, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04,
41+
0x03, 0x02, 0x03, 0x48, 0x00, 0x30, 0x45, 0x02, 0x21, 0x00, 0xc5, 0x07,
42+
0xb8, 0x2a, 0x7b, 0xf9, 0xa3, 0x3a, 0x1b, 0x78, 0xdc, 0xeb, 0x01, 0xc9,
43+
0x26, 0x92, 0x9e, 0xf3, 0x78, 0x3d, 0x46, 0x8e, 0x69, 0xa2, 0x84, 0xd3,
44+
0x6a, 0xba, 0xb9, 0x25, 0x1b, 0xef, 0x02, 0x20, 0x0e, 0x6d, 0x7f, 0x76,
45+
0x8d, 0x65, 0xa7, 0x49, 0xfa, 0x71, 0x2d, 0xda, 0x2b, 0x69, 0x25, 0x35,
46+
0xcd, 0x57, 0x7d, 0x65, 0x01, 0x96, 0xa3, 0xd2, 0xbf, 0x3b, 0x22, 0x78,
47+
0x8e, 0x75, 0x41, 0x86};
48+
49+
const uint8_t g_cert_ca_public_key_1_signer[64] = {
50+
0xbd, 0x54, 0xe6, 0x6d, 0xe3, 0x87, 0x54, 0x84, 0x00, 0x6b, 0x53,
51+
0xae, 0x15, 0x80, 0xd5, 0x0a, 0xa0, 0x69, 0xe7, 0x8a, 0xdf, 0x55,
52+
0x78, 0xd8, 0x5c, 0xe2, 0xd5, 0x4d, 0xd5, 0xb8, 0x30, 0x29, 0x6b,
53+
0xff, 0xdd, 0x6e, 0x6f, 0x72, 0x56, 0xfb, 0xd9, 0x9e, 0xf1, 0xa1,
54+
0x16, 0xb1, 0x1d, 0x33, 0xad, 0x49, 0x10, 0x3a, 0xa1, 0x85, 0x87,
55+
0x39, 0xdc, 0xfa, 0xe4, 0x37, 0xe1, 0x9d, 0x63, 0x4e};
56+
57+
const atcacert_def_t g_cert_def_1_signer = {
58+
.type = CERTTYPE_X509,
59+
.template_id = 1,
60+
.chain_id = 0,
61+
.private_key_slot = 0,
62+
.sn_source = SNSRC_PUB_KEY_HASH,
63+
.cert_sn_dev_loc = {.zone = DEVZONE_NONE,
64+
.slot = 0,
65+
.is_genkey = 0,
66+
.offset = 0,
67+
.count = 0},
68+
.issue_date_format = DATEFMT_RFC5280_UTC,
69+
.expire_date_format = DATEFMT_RFC5280_GEN,
70+
.tbs_cert_loc = {.offset = 4, .count = 430},
71+
.expire_years = 31,
72+
.public_key_dev_loc = {.zone = DEVZONE_DATA,
73+
.slot = 11,
74+
.is_genkey = 0,
75+
.offset = 0,
76+
.count = 72},
77+
.comp_cert_dev_loc = {.zone = DEVZONE_DATA,
78+
.slot = 12,
79+
.is_genkey = 0,
80+
.offset = 0,
81+
.count = 72},
82+
.std_cert_elements = {{// STDCERT_PUBLIC_KEY
83+
.offset = 266,
84+
.count = 64},
85+
{// STDCERT_SIGNATURE
86+
.offset = 446,
87+
.count = 64},
88+
{// STDCERT_ISSUE_DATE
89+
.offset = 128,
90+
.count = 13},
91+
{// STDCERT_EXPIRE_DATE
92+
.offset = 143,
93+
.count = 15},
94+
{// STDCERT_SIGNER_ID
95+
.offset = 235,
96+
.count = 4},
97+
{// STDCERT_CERT_SN
98+
.offset = 15,
99+
.count = 16},
100+
{// STDCERT_AUTH_KEY_ID
101+
.offset = 414,
102+
.count = 20},
103+
{// STDCERT_SUBJ_KEY_ID
104+
.offset = 381,
105+
.count = 20}},
106+
.cert_elements = NULL,
107+
.cert_elements_count = 0,
108+
.cert_template = g_cert_template_1_signer,
109+
.cert_template_size = sizeof(g_cert_template_1_signer)};

lib/cryptoauth/cert_def_1_signer.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#ifndef CERT_DEF_1_SIGNER_H
2+
#define CERT_DEF_1_SIGNER_H
3+
4+
#include "atcacert/atcacert_def.h"
5+
6+
extern const atcacert_def_t g_cert_def_1_signer;
7+
extern const uint8_t g_cert_ca_public_key_1_signer[];
8+
9+
#endif

lib/cryptoauth/cert_def_3_device.c

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
#include "atcacert/atcacert_def.h"
2+
3+
const uint8_t g_cert_template_3_device[500] = {
4+
0x30, 0x82, 0x01, 0xf0, 0x30, 0x82, 0x01, 0x97, 0xa0, 0x03, 0x02, 0x01,
5+
0x02, 0x02, 0x10, 0x55, 0xce, 0x2e, 0x8f, 0xf6, 0x1c, 0x62, 0x50, 0xb7,
6+
0xe1, 0x68, 0x03, 0x54, 0x14, 0x1c, 0x94, 0x30, 0x0a, 0x06, 0x08, 0x2a,
7+
0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x30, 0x4f, 0x31, 0x21, 0x30,
8+
0x1f, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x18, 0x4d, 0x69, 0x63, 0x72,
9+
0x6f, 0x63, 0x68, 0x69, 0x70, 0x20, 0x54, 0x65, 0x63, 0x68, 0x6e, 0x6f,
10+
0x6c, 0x6f, 0x67, 0x79, 0x20, 0x49, 0x6e, 0x63, 0x31, 0x2a, 0x30, 0x28,
11+
0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x21, 0x43, 0x72, 0x79, 0x70, 0x74,
12+
0x6f, 0x20, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61,
13+
0x74, 0x69, 0x6f, 0x6e, 0x20, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x20,
14+
0x46, 0x46, 0x46, 0x46, 0x30, 0x20, 0x17, 0x0d, 0x31, 0x38, 0x31, 0x31,
15+
0x30, 0x38, 0x30, 0x35, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x18, 0x0f, 0x32,
16+
0x30, 0x34, 0x36, 0x31, 0x31, 0x30, 0x38, 0x30, 0x35, 0x30, 0x30, 0x30,
17+
0x30, 0x5a, 0x30, 0x42, 0x31, 0x21, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x04,
18+
0x0a, 0x0c, 0x18, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x63, 0x68, 0x69, 0x70,
19+
0x20, 0x54, 0x65, 0x63, 0x68, 0x6e, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x20,
20+
0x49, 0x6e, 0x63, 0x31, 0x1d, 0x30, 0x1b, 0x06, 0x03, 0x55, 0x04, 0x03,
21+
0x0c, 0x14, 0x73, 0x6e, 0x30, 0x31, 0x32, 0x33, 0x30, 0x31, 0x30, 0x32,
22+
0x30, 0x33, 0x30, 0x34, 0x30, 0x35, 0x30, 0x36, 0x30, 0x31, 0x30, 0x59,
23+
0x30, 0x13, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02, 0x01, 0x06,
24+
0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00,
25+
0x04, 0x71, 0xf1, 0xa7, 0x0d, 0xa3, 0x79, 0xa3, 0xfd, 0xed, 0x6b, 0x50,
26+
0x10, 0xbd, 0xad, 0x6e, 0x1f, 0xb9, 0xe8, 0xeb, 0xa7, 0xdf, 0x2c, 0x4b,
27+
0x5c, 0x67, 0xd3, 0x5e, 0xba, 0x84, 0xda, 0x09, 0xe7, 0x7a, 0xe8, 0xdb,
28+
0x2c, 0xcb, 0x96, 0x28, 0xee, 0xeb, 0x85, 0xcd, 0xaa, 0xb3, 0x5c, 0x92,
29+
0xe5, 0x3e, 0x1c, 0x44, 0xd5, 0x5a, 0x2b, 0xa7, 0xa0, 0x24, 0xaa, 0x92,
30+
0x60, 0x3b, 0x68, 0x94, 0x8a, 0xa3, 0x60, 0x30, 0x5e, 0x30, 0x0c, 0x06,
31+
0x03, 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x02, 0x30, 0x00, 0x30,
32+
0x0e, 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x01, 0x01, 0xff, 0x04, 0x04, 0x03,
33+
0x02, 0x03, 0x88, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d, 0x0e, 0x04, 0x16,
34+
0x04, 0x14, 0x1a, 0x90, 0xb2, 0x22, 0x37, 0xa4, 0x51, 0xb7, 0x57, 0xdd,
35+
0x36, 0xd1, 0x3a, 0x85, 0x2b, 0xe1, 0x3d, 0x2e, 0xf2, 0xca, 0x30, 0x1f,
36+
0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x18, 0x30, 0x16, 0x80, 0x14, 0xbc,
37+
0xd4, 0xfd, 0xe8, 0x80, 0x8a, 0x2d, 0xc9, 0x0b, 0x6d, 0x01, 0xa8, 0xc5,
38+
0xb9, 0xb2, 0x47, 0x33, 0x7e, 0xbd, 0xda, 0x30, 0x0a, 0x06, 0x08, 0x2a,
39+
0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x03, 0x47, 0x00, 0x30, 0x44,
40+
0x02, 0x20, 0x56, 0x73, 0x96, 0xe4, 0x9c, 0x0a, 0xa7, 0x4e, 0x61, 0x60,
41+
0x12, 0xe3, 0x8a, 0x60, 0xc3, 0xa8, 0x11, 0x09, 0x7d, 0x9c, 0x5d, 0xa4,
42+
0xcd, 0x37, 0x89, 0xc3, 0x62, 0x96, 0x88, 0x7e, 0x2a, 0x0c, 0x02, 0x20,
43+
0x1e, 0x69, 0xb2, 0xaf, 0x0a, 0xd6, 0xc6, 0x7e, 0xe1, 0x2d, 0x5d, 0xbe,
44+
0x5a, 0x44, 0x5a, 0xd9, 0x1d, 0xf1, 0xa5, 0x98, 0x35, 0x8e, 0xd0, 0x69,
45+
0xd9, 0x8b, 0xd7, 0xdb, 0xb2, 0x99, 0xcc, 0x34};
46+
47+
const atcacert_cert_element_t g_cert_elements_3_device[] = {
48+
{.id = "SN03",
49+
.device_loc = {.zone = DEVZONE_CONFIG,
50+
.slot = 0,
51+
.is_genkey = 0,
52+
.offset = 0,
53+
.count = 4},
54+
.cert_loc = {.offset = 208, .count = 8},
55+
.transforms = {TF_BIN2HEX_UC, TF_NONE}},
56+
{.id = "SN48",
57+
.device_loc = {.zone = DEVZONE_CONFIG,
58+
.slot = 0,
59+
.is_genkey = 0,
60+
.offset = 8,
61+
.count = 5},
62+
.cert_loc = {.offset = 216, .count = 10},
63+
.transforms = {TF_BIN2HEX_UC, TF_NONE}}};
64+
65+
const atcacert_def_t g_cert_def_3_device = {
66+
.type = CERTTYPE_X509,
67+
.template_id = 3,
68+
.chain_id = 0,
69+
.private_key_slot = 0,
70+
.sn_source = SNSRC_PUB_KEY_HASH,
71+
.cert_sn_dev_loc = {.zone = DEVZONE_NONE,
72+
.slot = 0,
73+
.is_genkey = 0,
74+
.offset = 0,
75+
.count = 0},
76+
.issue_date_format = DATEFMT_RFC5280_UTC,
77+
.expire_date_format = DATEFMT_RFC5280_GEN,
78+
.tbs_cert_loc = {.offset = 4, .count = 411},
79+
.expire_years = 28,
80+
.public_key_dev_loc = {.zone = DEVZONE_DATA,
81+
.slot = 0,
82+
.is_genkey = 1,
83+
.offset = 0,
84+
.count = 64},
85+
.comp_cert_dev_loc = {.zone = DEVZONE_DATA,
86+
.slot = 10,
87+
.is_genkey = 0,
88+
.offset = 0,
89+
.count = 72},
90+
.std_cert_elements = {{// STDCERT_PUBLIC_KEY
91+
.offset = 253,
92+
.count = 64},
93+
{// STDCERT_SIGNATURE
94+
.offset = 427,
95+
.count = 64},
96+
{// STDCERT_ISSUE_DATE
97+
.offset = 128,
98+
.count = 13},
99+
{// STDCERT_EXPIRE_DATE
100+
.offset = 143,
101+
.count = 15},
102+
{// STDCERT_SIGNER_ID
103+
.offset = 120,
104+
.count = 4},
105+
{// STDCERT_CERT_SN
106+
.offset = 15,
107+
.count = 16},
108+
{// STDCERT_AUTH_KEY_ID
109+
.offset = 395,
110+
.count = 20},
111+
{// STDCERT_SUBJ_KEY_ID
112+
.offset = 362,
113+
.count = 20}},
114+
.cert_elements = g_cert_elements_3_device,
115+
.cert_elements_count =
116+
sizeof(g_cert_elements_3_device) / sizeof(g_cert_elements_3_device[0]),
117+
.cert_template = g_cert_template_3_device,
118+
.cert_template_size = sizeof(g_cert_template_3_device)};

lib/cryptoauth/cert_def_3_device.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#ifndef CERT_DEF_3_DEVICE_H
2+
#define CERT_DEF_3_DEVICE_H
3+
4+
#include "atcacert/atcacert_def.h"
5+
6+
extern const atcacert_def_t g_cert_def_3_device;
7+
8+
#endif

0 commit comments

Comments
 (0)