Skip to content

Commit caf67be

Browse files
committed
Release v3.7.7 (20250213)
1 parent dfdeaed commit caf67be

File tree

183 files changed

+12314
-2957
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

183 files changed

+12314
-2957
lines changed

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
cmake_minimum_required(VERSION 3.1.0)
1+
cmake_minimum_required(VERSION 3.10.0)
22
project (cryptoauthlib C)
33

44
# Set the current release version
5-
set(VERSION "3.7.6")
5+
set(VERSION "3.7.7")
66
set(VERSION_MAJOR 3)
77
set(VERSION_MINOR 7)
8-
set(VERSION_PATCH 6)
8+
set(VERSION_PATCH 7)
99

1010
# Build Options
1111
option(BUILD_TESTS "Create Test Application with library" OFF)

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@ device. The family of devices supported currently are:
88

99
|CryptoAuth |CryptoAuth2 |
1010
|-----------------------------------------------:|:-----------------------------------------|
11-
|[ATECC608B](https://www.microchip.com/ATECC608B)|[ECC204](https://www.microchip.com/ECC204)|
12-
|[ATECC608A](http://www.microchip.com/ATECC608A) |[ECC206](https://www.microchip.com/ECC206)|
13-
|[ATECC508A](http://www.microchip.com/ATECC508A) |[SHA104](https://www.microchip.com/SHA104)|
14-
|[ATECC108A](http://www.microchip.com/ATECC108A) |[SHA105](https://www.microchip.com/SHA105)|
15-
|[ATSHA204A](http://www.microchip.com/ATSHA204A) |[SHA106](https://www.microchip.com/SHA106)|
16-
|[ATSHA206A](https://www.microchip.com/ATSHA206A)|[RNG90](https://www.microchip.com/RNG90) |
11+
|[ATECC608C](https://www.microchip.com/ATECC608C)|[ECC204](https://www.microchip.com/ECC204)|
12+
|[ATECC608B](https://www.microchip.com/ATECC608B)|[ECC206](https://www.microchip.com/ECC206)|
13+
|[ATECC608A](http://www.microchip.com/ATECC608A) |[SHA104](https://www.microchip.com/SHA104)|
14+
|[ATECC508A](http://www.microchip.com/ATECC508A) |[SHA105](https://www.microchip.com/SHA105)|
15+
|[ATECC108A](http://www.microchip.com/ATECC108A) |[SHA106](https://www.microchip.com/SHA106)|
16+
|[ATSHA204A](http://www.microchip.com/ATSHA204A) |[RNG90](https://www.microchip.com/RNG90) |
17+
|[ATSHA206A](https://www.microchip.com/ATSHA206A)| |
1718

1819
The best place to start is with the [Microchip Trust Platform](https://www.microchip.com/design-centers/security-ics/trust-platform)
1920

app/tng/tflxtls_cert_def_4_device.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
#include "tngtls_cert_def_1_signer.h"
3030
#include "tflxtls_cert_def_4_device.h"
3131

32+
#if ATCACERT_COMPCERT_EN
33+
3234
const uint8_t g_tflxtls_cert_template_4_device[500] = {
3335
0x30, 0x82, 0x01, 0xF0, 0x30, 0x82, 0x01, 0x97, 0xA0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x10, 0x55,
3436
0xCE, 0x2E, 0x8F, 0xF6, 0x1C, 0x62, 0x50, 0xB7, 0xE1, 0x68, 0x03, 0x54, 0x14, 0x1C, 0x94, 0x30,
@@ -177,3 +179,4 @@ const atcacert_def_t g_tflxtls_cert_def_4_device = {
177179
.cert_template_size = (uint16_t)(sizeof(g_tflxtls_cert_template_4_device)),
178180
.ca_cert_def = &g_tngtls_cert_def_1_signer
179181
};
182+
#endif

app/tng/tng_atca.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#include "tflxtls_cert_def_4_device.h"
3636
#include "atcacert/atcacert_def.h"
3737

38+
#if ATCACERT_COMPCERT_EN
3839

3940
typedef struct
4041
{
@@ -129,3 +130,5 @@ ATCA_STATUS tng_get_device_pubkey(uint8_t *public_key)
129130

130131
return status;
131132
}
133+
134+
#endif

app/tng/tng_atca.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ extern "C" {
3737

3838
#define ATCA_OTP_CODE_SIZE (8u)
3939

40+
#if ((defined(ATCA_TNG_LEGACY_SUPPORT) || defined(ATCA_TFLEX_SUPPORT) || \
41+
defined(ATCA_TNGTLS_SUPPORT) || defined(ATCA_TNGLORA_SUPPORT)) && !ATCACERT_COMPCERT_EN)
42+
#error "Enable ATCACERT_COMPCERT_EN to handle TNG"
43+
#endif
44+
4045
/** \defgroup tng_ TNG API (tng_)
4146
*
4247
* \brief These methods provide some convenience functions (mostly around

app/tng/tng_atcacert_client.c

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
#include "tng_root_cert.h"
3333
#include <limits.h>
3434

35+
#if ATCACERT_COMPCERT_EN
36+
3537
int tng_atcacert_max_device_cert_size(size_t* max_cert_size)
3638
{
3739
int ret = ATCACERT_E_WRONG_CERT_DEF;
@@ -48,10 +50,14 @@ int tng_atcacert_max_device_cert_size(size_t* max_cert_size)
4850
if (NULL != cert_def)
4951
{
5052
ret = atcacert_max_cert_size(cert_def, &cert_size);
51-
if (cert_size > *max_cert_size)
53+
if (ATCACERT_E_SUCCESS == ret)
5254
{
5355
*max_cert_size = cert_size;
5456
}
57+
else
58+
{
59+
break;
60+
}
5561

5662
if (index < INT_MAX)
5763
{
@@ -110,7 +116,7 @@ int tng_atcacert_read_device_cert(uint8_t* cert, size_t* cert_size, const uint8_
110116
}
111117
}
112118

113-
return atcacert_read_cert(cert_def, ca_public_key, cert, cert_size);
119+
return atcacert_read_cert(cert_def, &ca_pubkey, cert, cert_size);
114120
}
115121

116122
int tng_atcacert_device_public_key(uint8_t* public_key, uint8_t* cert)
@@ -159,7 +165,8 @@ int tng_atcacert_read_signer_cert(uint8_t* cert, size_t* cert_size)
159165
{
160166
int ret;
161167
const atcacert_def_t* cert_def = NULL;
162-
const uint8_t* ca_public_key = NULL;
168+
uint8_t* ca_public_key = NULL;
169+
cal_buffer ca_pubkey = CAL_BUF_INIT(ATCA_ECCP256_PUBKEY_SIZE, NULL);
163170

164171
ret = tng_get_device_cert_def(&cert_def);
165172
if (ATCA_SUCCESS == ret)
@@ -169,7 +176,8 @@ int tng_atcacert_read_signer_cert(uint8_t* cert, size_t* cert_size)
169176
// Get the CA (root) public key
170177
ca_public_key = &g_cryptoauth_root_ca_002_cert[CRYPTOAUTH_ROOT_CA_002_PUBLIC_KEY_OFFSET];
171178

172-
ret = atcacert_read_cert(cert_def, ca_public_key, cert, cert_size);
179+
ca_pubkey.buf = ca_public_key;
180+
ret = atcacert_read_cert(cert_def, &ca_pubkey, cert, cert_size);
173181
}
174182

175183
return ret;
@@ -263,3 +271,5 @@ int tng_atcacert_root_public_key(uint8_t* public_key)
263271

264272
return ATCACERT_E_SUCCESS;
265273
}
274+
275+
#endif

app/tng/tnglora_cert_def_1_signer.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
#include "tngtls_cert_def_1_signer.h"
3030
#include "tnglora_cert_def_1_signer.h"
3131

32+
#if ATCACERT_COMPCERT_EN
33+
3234
SHARED_LIB_EXPORT const atcacert_def_t g_tnglora_cert_def_1_signer = {
3335
.type = CERTTYPE_X509,
3436
.template_id = 1,
@@ -103,3 +105,5 @@ SHARED_LIB_EXPORT const atcacert_def_t g_tnglora_cert_def_1_signer = {
103105
.cert_template_size = TNGTLS_CERT_TEMPLATE_1_SIGNER_SIZE,
104106
.ca_cert_def = NULL
105107
};
108+
109+
#endif

app/tng/tnglora_cert_def_2_device.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
#include "tnglora_cert_def_1_signer.h"
3232
#include "tnglora_cert_def_2_device.h"
3333

34+
#if ATCACERT_COMPCERT_EN
35+
3436
SHARED_LIB_EXPORT const atcacert_def_t g_tnglora_cert_def_2_device = {
3537
.type = CERTTYPE_X509,
3638
.template_id = 2,
@@ -105,3 +107,5 @@ SHARED_LIB_EXPORT const atcacert_def_t g_tnglora_cert_def_2_device = {
105107
.cert_template_size = TNGTLS_CERT_TEMPLATE_2_DEVICE_SIZE,
106108
.ca_cert_def = &g_tnglora_cert_def_1_signer
107109
};
110+
111+
#endif

app/tng/tnglora_cert_def_4_device.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
#include "tnglora_cert_def_4_device.h"
3030
#include "tnglora_cert_def_1_signer.h"
3131

32+
#if ATCACERT_COMPCERT_EN
33+
3234
SHARED_LIB_EXPORT const uint8_t g_tnglora_cert_template_4_device[TNGLORA_CERT_TEMPLATE_4_DEVICE_SIZE] = {
3335
0x30, 0x82, 0x02, 0x24, 0x30, 0x82, 0x01, 0xc9, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x10, 0x55,
3436
0xce, 0x2e, 0x8f, 0xf6, 0x1c, 0x62, 0x50, 0xb7, 0xe1, 0x68, 0x03, 0x54, 0x14, 0x1c, 0x94, 0x30,
@@ -198,3 +200,5 @@ SHARED_LIB_EXPORT const atcacert_def_t g_tnglora_cert_def_4_device = {
198200
.cert_template_size = (uint16_t)(sizeof(g_tnglora_cert_template_4_device)),
199201
.ca_cert_def = &g_tnglora_cert_def_1_signer
200202
};
203+
204+
#endif

app/tng/tngtls_cert_def_1_signer.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
#include "atcacert/atcacert_def.h"
2929
#include "tngtls_cert_def_1_signer.h"
3030

31+
#if ATCACERT_COMPCERT_EN
32+
3133
SHARED_LIB_EXPORT const uint8_t g_tngtls_cert_template_1_signer[TNGTLS_CERT_TEMPLATE_1_SIGNER_SIZE] = {
3234
0x30, 0x82, 0x02, 0x04, 0x30, 0x82, 0x01, 0xaa, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x10, 0x44,
3335
0x0e, 0xe4, 0x17, 0x0c, 0xb5, 0x45, 0xce, 0x59, 0x69, 0x8e, 0x30, 0x56, 0x99, 0x0a, 0x5d, 0x30,
@@ -151,3 +153,5 @@ SHARED_LIB_EXPORT const atcacert_def_t g_tngtls_cert_def_1_signer = {
151153
.cert_template_size = (uint16_t)(sizeof(g_tngtls_cert_template_1_signer)),
152154
.ca_cert_def = NULL
153155
};
156+
157+
#endif

0 commit comments

Comments
 (0)