Skip to content

Commit af1ca6b

Browse files
committed
Release v3.2.4 (20201017)
1 parent c2b38b2 commit af1ca6b

Some content is hidden

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

50 files changed

+1309
-210
lines changed

CMakeLists.txt

+12-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ cmake_minimum_required(VERSION 2.6.4)
22
project (cryptoauthlib)
33

44
# Set the current release version
5-
set(VERSION "3.2.3")
5+
set(VERSION "3.2.4")
66
set(VERSION_MAJOR 3)
77
set(VERSION_MINOR 2)
8-
set(VERSION_PATCH 3)
8+
set(VERSION_PATCH 4)
99

1010
# Build Options
1111
option(BUILD_TESTS "Create Test Application with library" OFF)
@@ -21,6 +21,8 @@ if(WIN32)
2121
string(REPLACE "\\" "/" LOCAL_APP_DATA "$ENV{LOCALAPPDATA}/Microchip")
2222
set(DEFAULT_LIB_PATH "${LOCAL_APP_DATA}" CACHE
2323
STRING "The default absolute library path")
24+
set(DEFAULT_INC_PATH "${LOCAL_APP_DATA}/${PROJECT_NAME}" CACHE
25+
STRING "The default include install path")
2426
set(DEFAULT_CONF_PATH "${LOCAL_APP_DATA}" CACHE
2527
STRING "The default location of ${PROJECT_NAME}.conf")
2628
set(DEFAULT_STORE_PATH "${LOCAL_APP_DATA}/${PROJECT_NAME}" CACHE
@@ -29,6 +31,8 @@ else()
2931
include(GNUInstallDirs)
3032
set(DEFAULT_LIB_PATH "${CMAKE_INSTALL_FULL_LIBDIR}" CACHE
3133
STRING "The default absolute library path")
34+
set(DEFAULT_INC_PATH "${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}" CACHE
35+
STRING "The default include install path")
3236
set(DEFAULT_CONF_PATH "${CMAKE_INSTALL_FULL_SYSCONFDIR}/${PROJECT_NAME}" CACHE
3337
STRING "The default location of ${PROJECT_NAME}.conf")
3438
set(DEFAULT_STORE_PATH "${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/lib/${PROJECT_NAME}" CACHE
@@ -82,8 +86,12 @@ install(CODE "
8286
DESTINATION ${DEFAULT_CONF_PATH})
8387
endif()
8488
")
85-
install(DIRECTORY DESTINATION ${DEFAULT_STORE_PATH})
86-
install(CODE "execute_process(COMMAND chmod 1777 ${DEFAULT_STORE_PATH})")
89+
install(DIRECTORY DESTINATION ${DEFAULT_STORE_PATH}
90+
DIRECTORY_PERMISSIONS
91+
OWNER_EXECUTE OWNER_WRITE OWNER_READ
92+
GROUP_EXECUTE GROUP_WRITE GROUP_READ
93+
WORLD_EXECUTE WORLD_WRITE WORLD_READ
94+
)
8795
install(CODE "
8896
if(NOT EXISTS ${DEFAULT_STORE_PATH}/slot.conf.tmpl)
8997
file(INSTALL ${PROJECT_SOURCE_DIR}/app/pkcs11/slot.conf.tmpl

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CryptoAuthLib - Microchip CryptoAuthentication Library
1+
CryptoAuthLib - Microchip CryptoAuthentication Library {#mainpage}
22
====================================================
33

44
Introduction
@@ -10,6 +10,7 @@ device. The family of devices supported currently are:
1010
- [ATECC108A](http://www.microchip.com/ATECC108A)
1111
- [ATECC508A](http://www.microchip.com/ATECC508A)
1212
- [ATECC608A](http://www.microchip.com/ATECC608A)
13+
- [ATECC608B](http://www.microchip.com/ATECC608B)
1314

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

app/README.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1-
app directory - Purpose
2-
===================
1+
Application Support
2+
========================
33

44
This directory is for application specific implementation of various use cases.
55

66
Methods in this directory provide a simple API to perform potentially complex
77
combinations of calls to the main library or API.
88

9+
@subpage app_info_ip_prot
10+
11+
@subpage app_info_pkcs11
12+
13+
@subpage app_info_secure_boot

app/ip_protection/README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
IP Protection with Symmetric Authentication
2-
------------------------
2+
===========================================
3+
@page app_info_ip_prot IP Protection with Symmetric Authentication
4+
35
The IP protection can be easily integrated to the existing projects.The user project should include symmetric_authentication.c & symmetric_authentication.h files which contains the api
46
- **symmetric_authenticate()** - For Performing the authentication between host & device.
57

app/pkcs11/README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
PKCS11 Application Information
2+
===========================================
3+
@page app_info_pkcs11 PKCS11 Application Information
4+
15
# Setting up cryptoauthlib as a PKCS11 Provider for your system (LINUX)
26

37
These instructions are for building, installing and configuring cryptoauthlib as a pkcs11
@@ -341,4 +345,3 @@ $ p11tool --provider=/usr/lib/libcryptoauth.so
341345
6e:bf:00:e2:61:f2:7c:82:10:d6:87:d8:06:0f:10:3b:d8:d9
342346
```
343347

344-

app/secure_boot/README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# Secure boot using ATECC608
1+
Secure boot using ATECC608
2+
=========================================================
3+
@page app_info_secure_boot Secure boot using ATECC608
24

35
The SecureBoot command is a new feature on the
46
[ATECC608A](https://www.microchip.com/wwwproducts/en/ATECC608A) device compared
@@ -80,4 +82,4 @@ Examples
8082
-----------
8183
For more information about secure boot, please see the example implementation
8284
project and documentation at:
83-
https://github.com/MicrochipTech/cryptoauth_usecase_secureboot
85+
https://github.com/MicrochipTech/cryptoauth_usecase_secureboot

app/tng/readme.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,7 @@ This folder has a number of convenience functions for working with TNG devices
44
(currently ATECC608A-MAHTN-T).
55

66
These devices have standard certificates that can be easily read using the
7-
functions in tng_atcacert_client.h
7+
functions in tng_atcacert_client.h
8+
9+
@ingroup tng_
10+

app/tng/tng_atca.c

+10-10
Original file line numberDiff line numberDiff line change
@@ -45,22 +45,22 @@ typedef struct
4545
static tng_cert_map_element g_tng_cert_def_map[] =
4646
{
4747
#ifdef ATCA_TNG_LEGACY_SUPPORT
48-
{ "wdNxAjae", &g_tngtls_cert_def_2_device },
49-
{ "Rsuy5YJh", &g_tngtls_cert_def_2_device },
50-
{ "BxZvm6q2", &g_tnglora_cert_def_2_device },
48+
{ "wdNxAjae", &g_tngtls_cert_def_2_device },
49+
{ "Rsuy5YJh", &g_tngtls_cert_def_2_device },
50+
{ "BxZvm6q2", &g_tnglora_cert_def_2_device },
5151
#endif
5252
#ifdef ATCA_TFLEX_SUPPORT
53-
{ "MKMwyhP1", &g_tflxtls_cert_def_4_device },
53+
{ "MKMwyhP1", &g_tflxtls_cert_def_4_device },
5454
#endif
5555
#ifdef ATCA_TNGTLS_SUPPORT
56-
{ "KQp2ZkD8", &g_tngtls_cert_def_3_device },
57-
{ "x6tjuZMy", &g_tngtls_cert_def_3_device },
56+
{ "KQp2ZkD8", &g_tngtls_cert_def_3_device },
57+
{ "x6tjuZMy", &g_tngtls_cert_def_3_device },
5858
#endif
5959
#ifdef ATCA_TNGLORA_SUPPORT
60-
{ "jsMu7iYO", &g_tnglora_cert_def_4_device },
61-
{ "09qJNxI3", &g_tnglora_cert_def_4_device },
60+
{ "jsMu7iYO", &g_tnglora_cert_def_4_device },
61+
{ "09qJNxI3", &g_tnglora_cert_def_4_device },
6262
#endif
63-
{ "", NULL }
63+
{ "", NULL }
6464
};
6565

6666
static const size_t g_tng_cert_def_cnt = sizeof(g_tng_cert_def_map) / sizeof(tng_cert_map_element) - 1;
@@ -122,4 +122,4 @@ ATCA_STATUS tng_get_device_pubkey(uint8_t *public_key)
122122
}
123123

124124
return status;
125-
}
125+
}

app/tng/tnglora_cert_def_1_signer.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
extern const uint8_t g_tngtls_cert_template_1_signer[];
3232
extern const atcacert_cert_element_t g_tngtls_cert_elements_1_signer[];
3333

34-
const atcacert_def_t g_tnglora_cert_def_1_signer = {
34+
SHARED_LIB_EXPORT const atcacert_def_t g_tnglora_cert_def_1_signer = {
3535
.type = CERTTYPE_X509,
3636
.template_id = 1,
3737
.chain_id = 0,

app/tng/tnglora_cert_def_1_signer.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ extern "C" {
3737
/** \ingroup tng_
3838
* @{
3939
*/
40-
41-
extern const atcacert_def_t g_tnglora_cert_def_1_signer;
40+
ATCA_DLL const atcacert_def_t g_tnglora_cert_def_1_signer;
4241

4342
/** @} */
4443

app/tng/tnglora_cert_def_2_device.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,13 @@
2727

2828
#include "atcacert/atcacert_def.h"
2929
#include "tngtls_cert_def_2_device.h"
30+
#include "tngtls_cert_def_1_signer.h"
3031
#include "tnglora_cert_def_1_signer.h"
3132

3233
extern const uint8_t g_tngtls_cert_template_2_device[];
3334
extern const atcacert_cert_element_t g_tngtls_cert_elements_2_device[];
3435

35-
const atcacert_def_t g_tnglora_cert_def_2_device = {
36+
SHARED_LIB_EXPORT const atcacert_def_t g_tnglora_cert_def_2_device = {
3637
.type = CERTTYPE_X509,
3738
.template_id = 2,
3839
.chain_id = 0,

app/tng/tnglora_cert_def_2_device.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ extern "C" {
3838
* @{
3939
*/
4040

41-
extern const atcacert_def_t g_tnglora_cert_def_2_device;
41+
SHARED_LIB_IMPORT const atcacert_def_t g_tnglora_cert_def_2_device;
4242

4343
/** @} */
4444

app/tng/tnglora_cert_def_4_device.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#include "tnglora_cert_def_4_device.h"
3030
#include "tnglora_cert_def_1_signer.h"
3131

32-
const uint8_t g_tnglora_cert_template_4_device[TNGLORA_CERT_TEMPLATE_4_DEVICE_SIZE] = {
32+
SHARED_LIB_EXPORT const uint8_t g_tnglora_cert_template_4_device[TNGLORA_CERT_TEMPLATE_4_DEVICE_SIZE] = {
3333
0x30, 0x82, 0x02, 0x24, 0x30, 0x82, 0x01, 0xc9, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x10, 0x55,
3434
0xce, 0x2e, 0x8f, 0xf6, 0x1c, 0x62, 0x50, 0xb7, 0xe1, 0x68, 0x03, 0x54, 0x14, 0x1c, 0x94, 0x30,
3535
0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x30, 0x4f, 0x31, 0x21, 0x30,
@@ -67,7 +67,7 @@ const uint8_t g_tnglora_cert_template_4_device[TNGLORA_CERT_TEMPLATE_4_DEVICE_SI
6767
0x22, 0x7f, 0x91, 0x9c, 0xd2, 0x63, 0x34, 0x82
6868
};
6969

70-
const atcacert_cert_element_t g_tnglora_cert_elements_4_device[] = {
70+
SHARED_LIB_EXPORT const atcacert_cert_element_t g_tnglora_cert_elements_4_device[] = {
7171
{
7272
.id = "SN03",
7373
.device_loc ={
@@ -124,7 +124,7 @@ const atcacert_cert_element_t g_tnglora_cert_elements_4_device[] = {
124124
}
125125
};
126126

127-
const atcacert_def_t g_tnglora_cert_def_4_device = {
127+
SHARED_LIB_EXPORT const atcacert_def_t g_tnglora_cert_def_4_device = {
128128
.type = CERTTYPE_X509,
129129
.template_id = 4,
130130
.chain_id = 0,

app/tng/tnglora_cert_def_4_device.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ extern "C" {
3838
* @{
3939
*/
4040
#define TNGLORA_CERT_TEMPLATE_4_DEVICE_SIZE 552
41-
extern const atcacert_def_t g_tnglora_cert_def_4_device;
41+
ATCA_DLL const atcacert_def_t g_tnglora_cert_def_4_device;
4242

4343
/** @} */
4444

app/tng/tngtls_cert_def_1_signer.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#include "atcacert/atcacert_def.h"
2929
#include "tngtls_cert_def_1_signer.h"
3030

31-
const uint8_t g_tngtls_cert_template_1_signer[TNGTLS_CERT_TEMPLATE_1_SIGNER_SIZE] = {
31+
SHARED_LIB_EXPORT const uint8_t g_tngtls_cert_template_1_signer[TNGTLS_CERT_TEMPLATE_1_SIGNER_SIZE] = {
3232
0x30, 0x82, 0x02, 0x04, 0x30, 0x82, 0x01, 0xaa, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x10, 0x44,
3333
0x0e, 0xe4, 0x17, 0x0c, 0xb5, 0x45, 0xce, 0x59, 0x69, 0x8e, 0x30, 0x56, 0x99, 0x0a, 0x5d, 0x30,
3434
0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x30, 0x4f, 0x31, 0x21, 0x30,
@@ -64,7 +64,7 @@ const uint8_t g_tngtls_cert_template_1_signer[TNGTLS_CERT_TEMPLATE_1_SIGNER_SIZE
6464
0xbf, 0x3b, 0x22, 0x78, 0x8e, 0x75, 0x41, 0x86
6565
};
6666

67-
const atcacert_cert_element_t g_tngtls_cert_elements_1_signer[] = {
67+
SHARED_LIB_EXPORT const atcacert_cert_element_t g_tngtls_cert_elements_1_signer[] = {
6868
{
6969
.id = "subject",
7070
.device_loc ={
@@ -77,7 +77,7 @@ const atcacert_cert_element_t g_tngtls_cert_elements_1_signer[] = {
7777
}
7878
};
7979

80-
const atcacert_def_t g_tngtls_cert_def_1_signer = {
80+
SHARED_LIB_EXPORT const atcacert_def_t g_tngtls_cert_def_1_signer = {
8181
.type = CERTTYPE_X509,
8282
.template_id = 1,
8383
.chain_id = 0,

app/tng/tngtls_cert_def_2_device.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#include "tngtls_cert_def_2_device.h"
3030
#include "tngtls_cert_def_1_signer.h"
3131

32-
const uint8_t g_tngtls_cert_template_2_device[TNGTLS_CERT_TEMPLATE_2_DEVICE_SIZE] = {
32+
SHARED_LIB_EXPORT const uint8_t g_tngtls_cert_template_2_device[TNGTLS_CERT_TEMPLATE_2_DEVICE_SIZE] = {
3333
0x30, 0x82, 0x01, 0xf5, 0x30, 0x82, 0x01, 0x9b, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x10, 0x55,
3434
0xce, 0x2e, 0x8f, 0xf6, 0x1c, 0x62, 0x50, 0xb7, 0xe1, 0x68, 0x03, 0x54, 0x14, 0x1c, 0x94, 0x30,
3535
0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x30, 0x4f, 0x31, 0x21, 0x30,
@@ -64,7 +64,7 @@ const uint8_t g_tngtls_cert_template_2_device[TNGTLS_CERT_TEMPLATE_2_DEVICE_SIZE
6464
0xd3, 0x9f, 0x3d, 0xf6, 0x3e, 0xe5, 0xb3, 0x7a, 0x19
6565
};
6666

67-
const atcacert_cert_element_t g_tngtls_cert_elements_2_device[TNGTLS_CERT_ELEMENTS_2_DEVICE_COUNT] = {
67+
SHARED_LIB_EXPORT const atcacert_cert_element_t g_tngtls_cert_elements_2_device[TNGTLS_CERT_ELEMENTS_2_DEVICE_COUNT] = {
6868
{
6969
.id = "SN03",
7070
.device_loc ={
@@ -103,7 +103,7 @@ const atcacert_cert_element_t g_tngtls_cert_elements_2_device[TNGTLS_CERT_ELEMEN
103103
}
104104
};
105105

106-
const atcacert_def_t g_tngtls_cert_def_2_device = {
106+
SHARED_LIB_EXPORT const atcacert_def_t g_tngtls_cert_def_2_device = {
107107
.type = CERTTYPE_X509,
108108
.template_id = 2,
109109
.chain_id = 0,

app/tng/tngtls_cert_def_2_device.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ extern "C" {
4040

4141
#define TNGTLS_CERT_TEMPLATE_2_DEVICE_SIZE 505
4242
#define TNGTLS_CERT_ELEMENTS_2_DEVICE_COUNT 2
43-
extern const atcacert_def_t g_tngtls_cert_def_2_device;
43+
ATCA_DLL const atcacert_def_t g_tngtls_cert_def_2_device;
4444

4545
/** @} */
4646

app/tng/tngtls_cert_def_3_device.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#include "tngtls_cert_def_3_device.h"
3030
#include "tngtls_cert_def_1_signer.h"
3131

32-
const uint8_t g_tngtls_cert_template_3_device[TNGTLS_CERT_TEMPLATE_3_DEVICE_SIZE] = {
32+
SHARED_LIB_EXPORT const uint8_t g_tngtls_cert_template_3_device[TNGTLS_CERT_TEMPLATE_3_DEVICE_SIZE] = {
3333
0x30, 0x82, 0x02, 0x1e, 0x30, 0x82, 0x01, 0xc5, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x10, 0x55,
3434
0xce, 0x2e, 0x8f, 0xf6, 0x1c, 0x62, 0x50, 0xb7, 0xe1, 0x68, 0x03, 0x54, 0x14, 0x1c, 0x94, 0x30,
3535
0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x30, 0x4f, 0x31, 0x21, 0x30,
@@ -67,7 +67,7 @@ const uint8_t g_tngtls_cert_template_3_device[TNGTLS_CERT_TEMPLATE_3_DEVICE_SIZE
6767
0x15, 0xe2
6868
};
6969

70-
const atcacert_cert_element_t g_tngtls_cert_elements_3_device[] = {
70+
SHARED_LIB_EXPORT const atcacert_cert_element_t g_tngtls_cert_elements_3_device[] = {
7171
{
7272
.id = "SN03",
7373
.device_loc ={
@@ -124,7 +124,7 @@ const atcacert_cert_element_t g_tngtls_cert_elements_3_device[] = {
124124
}
125125
};
126126

127-
const atcacert_def_t g_tngtls_cert_def_3_device = {
127+
SHARED_LIB_EXPORT const atcacert_def_t g_tngtls_cert_def_3_device = {
128128
.type = CERTTYPE_X509,
129129
.template_id = 3,
130130
.chain_id = 0,

app/tng/tngtls_cert_def_3_device.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ extern "C" {
3838
* @{
3939
*/
4040
#define TNGTLS_CERT_TEMPLATE_3_DEVICE_SIZE 546
41-
extern const atcacert_def_t g_tngtls_cert_def_3_device;
41+
ATCA_DLL const atcacert_def_t g_tngtls_cert_def_3_device;
4242
/** @} */
4343

4444
#ifdef __cplusplus

cryptoauthlib-manual.pdf

-373 KB
Binary file not shown.

0 commit comments

Comments
 (0)