Skip to content

Commit

Permalink
Release v3.2.4 (20201017)
Browse files Browse the repository at this point in the history
  • Loading branch information
bryan-hunt committed Oct 22, 2020
1 parent c2b38b2 commit af1ca6b
Show file tree
Hide file tree
Showing 50 changed files with 1,309 additions and 210 deletions.
16 changes: 12 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ cmake_minimum_required(VERSION 2.6.4)
project (cryptoauthlib)

# Set the current release version
set(VERSION "3.2.3")
set(VERSION "3.2.4")
set(VERSION_MAJOR 3)
set(VERSION_MINOR 2)
set(VERSION_PATCH 3)
set(VERSION_PATCH 4)

# Build Options
option(BUILD_TESTS "Create Test Application with library" OFF)
Expand All @@ -21,6 +21,8 @@ if(WIN32)
string(REPLACE "\\" "/" LOCAL_APP_DATA "$ENV{LOCALAPPDATA}/Microchip")
set(DEFAULT_LIB_PATH "${LOCAL_APP_DATA}" CACHE
STRING "The default absolute library path")
set(DEFAULT_INC_PATH "${LOCAL_APP_DATA}/${PROJECT_NAME}" CACHE
STRING "The default include install path")
set(DEFAULT_CONF_PATH "${LOCAL_APP_DATA}" CACHE
STRING "The default location of ${PROJECT_NAME}.conf")
set(DEFAULT_STORE_PATH "${LOCAL_APP_DATA}/${PROJECT_NAME}" CACHE
Expand All @@ -29,6 +31,8 @@ else()
include(GNUInstallDirs)
set(DEFAULT_LIB_PATH "${CMAKE_INSTALL_FULL_LIBDIR}" CACHE
STRING "The default absolute library path")
set(DEFAULT_INC_PATH "${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}" CACHE
STRING "The default include install path")
set(DEFAULT_CONF_PATH "${CMAKE_INSTALL_FULL_SYSCONFDIR}/${PROJECT_NAME}" CACHE
STRING "The default location of ${PROJECT_NAME}.conf")
set(DEFAULT_STORE_PATH "${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/lib/${PROJECT_NAME}" CACHE
Expand Down Expand Up @@ -82,8 +86,12 @@ install(CODE "
DESTINATION ${DEFAULT_CONF_PATH})
endif()
")
install(DIRECTORY DESTINATION ${DEFAULT_STORE_PATH})
install(CODE "execute_process(COMMAND chmod 1777 ${DEFAULT_STORE_PATH})")
install(DIRECTORY DESTINATION ${DEFAULT_STORE_PATH}
DIRECTORY_PERMISSIONS
OWNER_EXECUTE OWNER_WRITE OWNER_READ
GROUP_EXECUTE GROUP_WRITE GROUP_READ
WORLD_EXECUTE WORLD_WRITE WORLD_READ
)
install(CODE "
if(NOT EXISTS ${DEFAULT_STORE_PATH}/slot.conf.tmpl)
file(INSTALL ${PROJECT_SOURCE_DIR}/app/pkcs11/slot.conf.tmpl
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CryptoAuthLib - Microchip CryptoAuthentication Library
CryptoAuthLib - Microchip CryptoAuthentication Library {#mainpage}
====================================================

Introduction
Expand All @@ -10,6 +10,7 @@ device. The family of devices supported currently are:
- [ATECC108A](http://www.microchip.com/ATECC108A)
- [ATECC508A](http://www.microchip.com/ATECC508A)
- [ATECC608A](http://www.microchip.com/ATECC608A)
- [ATECC608B](http://www.microchip.com/ATECC608B)

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

Expand Down
9 changes: 7 additions & 2 deletions app/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
app directory - Purpose
===================
Application Support
========================

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

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

@subpage app_info_ip_prot

@subpage app_info_pkcs11

@subpage app_info_secure_boot
4 changes: 3 additions & 1 deletion app/ip_protection/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
IP Protection with Symmetric Authentication
------------------------
===========================================
@page app_info_ip_prot IP Protection with Symmetric Authentication

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
- **symmetric_authenticate()** - For Performing the authentication between host & device.

Expand Down
5 changes: 4 additions & 1 deletion app/pkcs11/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
PKCS11 Application Information
===========================================
@page app_info_pkcs11 PKCS11 Application Information

# Setting up cryptoauthlib as a PKCS11 Provider for your system (LINUX)

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


6 changes: 4 additions & 2 deletions app/secure_boot/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Secure boot using ATECC608
Secure boot using ATECC608
=========================================================
@page app_info_secure_boot Secure boot using ATECC608

The SecureBoot command is a new feature on the
[ATECC608A](https://www.microchip.com/wwwproducts/en/ATECC608A) device compared
Expand Down Expand Up @@ -80,4 +82,4 @@ Examples
-----------
For more information about secure boot, please see the example implementation
project and documentation at:
https://github.com/MicrochipTech/cryptoauth_usecase_secureboot
https://github.com/MicrochipTech/cryptoauth_usecase_secureboot
5 changes: 4 additions & 1 deletion app/tng/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@ This folder has a number of convenience functions for working with TNG devices
(currently ATECC608A-MAHTN-T).

These devices have standard certificates that can be easily read using the
functions in tng_atcacert_client.h
functions in tng_atcacert_client.h

@ingroup tng_

20 changes: 10 additions & 10 deletions app/tng/tng_atca.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,22 +45,22 @@ typedef struct
static tng_cert_map_element g_tng_cert_def_map[] =
{
#ifdef ATCA_TNG_LEGACY_SUPPORT
{ "wdNxAjae", &g_tngtls_cert_def_2_device },
{ "Rsuy5YJh", &g_tngtls_cert_def_2_device },
{ "BxZvm6q2", &g_tnglora_cert_def_2_device },
{ "wdNxAjae", &g_tngtls_cert_def_2_device },
{ "Rsuy5YJh", &g_tngtls_cert_def_2_device },
{ "BxZvm6q2", &g_tnglora_cert_def_2_device },
#endif
#ifdef ATCA_TFLEX_SUPPORT
{ "MKMwyhP1", &g_tflxtls_cert_def_4_device },
{ "MKMwyhP1", &g_tflxtls_cert_def_4_device },
#endif
#ifdef ATCA_TNGTLS_SUPPORT
{ "KQp2ZkD8", &g_tngtls_cert_def_3_device },
{ "x6tjuZMy", &g_tngtls_cert_def_3_device },
{ "KQp2ZkD8", &g_tngtls_cert_def_3_device },
{ "x6tjuZMy", &g_tngtls_cert_def_3_device },
#endif
#ifdef ATCA_TNGLORA_SUPPORT
{ "jsMu7iYO", &g_tnglora_cert_def_4_device },
{ "09qJNxI3", &g_tnglora_cert_def_4_device },
{ "jsMu7iYO", &g_tnglora_cert_def_4_device },
{ "09qJNxI3", &g_tnglora_cert_def_4_device },
#endif
{ "", NULL }
{ "", NULL }
};

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

return status;
}
}
2 changes: 1 addition & 1 deletion app/tng/tnglora_cert_def_1_signer.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
extern const uint8_t g_tngtls_cert_template_1_signer[];
extern const atcacert_cert_element_t g_tngtls_cert_elements_1_signer[];

const atcacert_def_t g_tnglora_cert_def_1_signer = {
SHARED_LIB_EXPORT const atcacert_def_t g_tnglora_cert_def_1_signer = {
.type = CERTTYPE_X509,
.template_id = 1,
.chain_id = 0,
Expand Down
3 changes: 1 addition & 2 deletions app/tng/tnglora_cert_def_1_signer.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ extern "C" {
/** \ingroup tng_
* @{
*/

extern const atcacert_def_t g_tnglora_cert_def_1_signer;
ATCA_DLL const atcacert_def_t g_tnglora_cert_def_1_signer;

/** @} */

Expand Down
3 changes: 2 additions & 1 deletion app/tng/tnglora_cert_def_2_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,13 @@

#include "atcacert/atcacert_def.h"
#include "tngtls_cert_def_2_device.h"
#include "tngtls_cert_def_1_signer.h"
#include "tnglora_cert_def_1_signer.h"

extern const uint8_t g_tngtls_cert_template_2_device[];
extern const atcacert_cert_element_t g_tngtls_cert_elements_2_device[];

const atcacert_def_t g_tnglora_cert_def_2_device = {
SHARED_LIB_EXPORT const atcacert_def_t g_tnglora_cert_def_2_device = {
.type = CERTTYPE_X509,
.template_id = 2,
.chain_id = 0,
Expand Down
2 changes: 1 addition & 1 deletion app/tng/tnglora_cert_def_2_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ extern "C" {
* @{
*/

extern const atcacert_def_t g_tnglora_cert_def_2_device;
SHARED_LIB_IMPORT const atcacert_def_t g_tnglora_cert_def_2_device;

/** @} */

Expand Down
6 changes: 3 additions & 3 deletions app/tng/tnglora_cert_def_4_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include "tnglora_cert_def_4_device.h"
#include "tnglora_cert_def_1_signer.h"

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

const atcacert_cert_element_t g_tnglora_cert_elements_4_device[] = {
SHARED_LIB_EXPORT const atcacert_cert_element_t g_tnglora_cert_elements_4_device[] = {
{
.id = "SN03",
.device_loc ={
Expand Down Expand Up @@ -124,7 +124,7 @@ const atcacert_cert_element_t g_tnglora_cert_elements_4_device[] = {
}
};

const atcacert_def_t g_tnglora_cert_def_4_device = {
SHARED_LIB_EXPORT const atcacert_def_t g_tnglora_cert_def_4_device = {
.type = CERTTYPE_X509,
.template_id = 4,
.chain_id = 0,
Expand Down
2 changes: 1 addition & 1 deletion app/tng/tnglora_cert_def_4_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ extern "C" {
* @{
*/
#define TNGLORA_CERT_TEMPLATE_4_DEVICE_SIZE 552
extern const atcacert_def_t g_tnglora_cert_def_4_device;
ATCA_DLL const atcacert_def_t g_tnglora_cert_def_4_device;

/** @} */

Expand Down
6 changes: 3 additions & 3 deletions app/tng/tngtls_cert_def_1_signer.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include "atcacert/atcacert_def.h"
#include "tngtls_cert_def_1_signer.h"

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

const atcacert_cert_element_t g_tngtls_cert_elements_1_signer[] = {
SHARED_LIB_EXPORT const atcacert_cert_element_t g_tngtls_cert_elements_1_signer[] = {
{
.id = "subject",
.device_loc ={
Expand All @@ -77,7 +77,7 @@ const atcacert_cert_element_t g_tngtls_cert_elements_1_signer[] = {
}
};

const atcacert_def_t g_tngtls_cert_def_1_signer = {
SHARED_LIB_EXPORT const atcacert_def_t g_tngtls_cert_def_1_signer = {
.type = CERTTYPE_X509,
.template_id = 1,
.chain_id = 0,
Expand Down
6 changes: 3 additions & 3 deletions app/tng/tngtls_cert_def_2_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include "tngtls_cert_def_2_device.h"
#include "tngtls_cert_def_1_signer.h"

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

const atcacert_cert_element_t g_tngtls_cert_elements_2_device[TNGTLS_CERT_ELEMENTS_2_DEVICE_COUNT] = {
SHARED_LIB_EXPORT const atcacert_cert_element_t g_tngtls_cert_elements_2_device[TNGTLS_CERT_ELEMENTS_2_DEVICE_COUNT] = {
{
.id = "SN03",
.device_loc ={
Expand Down Expand Up @@ -103,7 +103,7 @@ const atcacert_cert_element_t g_tngtls_cert_elements_2_device[TNGTLS_CERT_ELEMEN
}
};

const atcacert_def_t g_tngtls_cert_def_2_device = {
SHARED_LIB_EXPORT const atcacert_def_t g_tngtls_cert_def_2_device = {
.type = CERTTYPE_X509,
.template_id = 2,
.chain_id = 0,
Expand Down
2 changes: 1 addition & 1 deletion app/tng/tngtls_cert_def_2_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ extern "C" {

#define TNGTLS_CERT_TEMPLATE_2_DEVICE_SIZE 505
#define TNGTLS_CERT_ELEMENTS_2_DEVICE_COUNT 2
extern const atcacert_def_t g_tngtls_cert_def_2_device;
ATCA_DLL const atcacert_def_t g_tngtls_cert_def_2_device;

/** @} */

Expand Down
6 changes: 3 additions & 3 deletions app/tng/tngtls_cert_def_3_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include "tngtls_cert_def_3_device.h"
#include "tngtls_cert_def_1_signer.h"

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

const atcacert_cert_element_t g_tngtls_cert_elements_3_device[] = {
SHARED_LIB_EXPORT const atcacert_cert_element_t g_tngtls_cert_elements_3_device[] = {
{
.id = "SN03",
.device_loc ={
Expand Down Expand Up @@ -124,7 +124,7 @@ const atcacert_cert_element_t g_tngtls_cert_elements_3_device[] = {
}
};

const atcacert_def_t g_tngtls_cert_def_3_device = {
SHARED_LIB_EXPORT const atcacert_def_t g_tngtls_cert_def_3_device = {
.type = CERTTYPE_X509,
.template_id = 3,
.chain_id = 0,
Expand Down
2 changes: 1 addition & 1 deletion app/tng/tngtls_cert_def_3_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ extern "C" {
* @{
*/
#define TNGTLS_CERT_TEMPLATE_3_DEVICE_SIZE 546
extern const atcacert_def_t g_tngtls_cert_def_3_device;
ATCA_DLL const atcacert_def_t g_tngtls_cert_def_3_device;
/** @} */

#ifdef __cplusplus
Expand Down
Binary file modified cryptoauthlib-manual.pdf
Binary file not shown.
Loading

0 comments on commit af1ca6b

Please sign in to comment.