Skip to content

Commit 7f00156

Browse files
committed
Release v3.7.9 (20250916)
1 parent 788acf6 commit 7f00156

File tree

99 files changed

+2936
-765
lines changed

Some content is hidden

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

99 files changed

+2936
-765
lines changed

CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ cmake_minimum_required(VERSION 3.20.0)
22
project (cryptoauthlib C)
33

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

1010
# Build Options
1111
option(BUILD_TESTS "Create Test Application with library" OFF)
@@ -16,8 +16,8 @@ else()
1616
set(SETUP_INSTALLER OFF CACHE INTERNAL "Disabling installation on this platform")
1717
endif()
1818

19-
# Default install root which is normally /usr/local/
20-
set(CMAKE_INSTALL_PREFIX "/" CACHE INTERNAL "")
19+
# Use -DCMAKE_INSTALL_PREFIX to override default make install to /usr/local
20+
# set(CMAKE_INSTALL_PREFIX "/" CACHE INTERNAL "")
2121

2222
# If including certificate definitions into the library then include them as ATCACERT_DEF_SRC
2323
#file(GLOB ATCACERT_DEF_SRC ABSOLUTE "app/*.c")

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ CryptoAuthLib - Microchip CryptoAuthentication Library {#mainpage}
44
Introduction
55
------------------------
66
This library implements the APIs required to communicate with Microchip Security
7-
device. The family of devices supported currently are:
7+
devices. The family of devices supported currently are:
88

99
|CryptoAuth |CryptoAuth2 |
1010
|-----------------------------------------------:|:-----------------------------------------|
@@ -52,11 +52,13 @@ Examples
5252

5353
Configuration
5454
-----------
55-
In order to properly configured the library there must be a header file in your
55+
In order to properly configure the library there must be a header file in your
5656
project named `atca_config.h` at minimum this needs to contain defines for the
57-
hal and device types being used. Most integrations have an configuration mechanism
57+
hal and device types being used. Most integrations have a configuration mechanism
5858
for generating this file. See the [atca_config.h.in](lib/atca_config.h.in) template
59-
which is configured by CMake for Linux, MacOS, & Windows projects.
59+
which is configured by CMake for Linux, MacOS, & Windows projects. This file also
60+
contains some specific options that are fully documented where the desired features
61+
can be selected.
6062

6163
An example of the configuration:
6264

@@ -95,9 +97,7 @@ There are two major compiler defines that affect the operation of the library.
9597
changes required. The lower-level API will no longer use the new/delete
9698
functions and the init/release functions should be used directly.
9799

98-
Some specific options are available in the fully documented configuration files `lib/calib/calib_config.h`,
99-
`atca_configuration.h`, `lib/crypto/crypto_config.h`, `lib/host/atca_host_config.h` which is also the place where features can be selected.
100-
We provide some configurations focused on specific use cases and the checks are enabled by default.
100+
101101

102102
Release notes
103103
-----------
@@ -188,6 +188,7 @@ Edit the mchp-cryptoauth.rules file and add the following line to the file:
188188
```text
189189
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2312", MODE="0666"
190190
```
191+
191192
Updating *X.509 compressed certificate format* to support extended years
192193
===========================================
193194

app/kit_host/ascii_kit_host.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -432,11 +432,11 @@ static ATCA_STATUS kit_host_ta_send(ascii_kit_host_context_t* ctx, int argc, cha
432432
size_t plen = sizeof(ctx->buffer) - 2;
433433
atcab_hex2bin(argv[0], strlen(argv[0]), ctx->buffer, &plen);
434434

435-
uint8_t address = atgetifacecfg(&ctx->device->mIface)->atcai2c.address;
435+
uint8_t word_address = ctx->buffer[0];
436436

437437
(void)atcontrol(&ctx->device->mIface, ATCA_HAL_CONTROL_SELECT, NULL, 0);
438438

439-
status = atsend(&ctx->device->mIface, address, ctx->buffer, plen);
439+
status = atsend(&ctx->device->mIface, word_address, &(ctx->buffer[1]), plen-1);
440440

441441
(void)atcontrol(&ctx->device->mIface, ATCA_HAL_CONTROL_DESELECT, NULL, 0);
442442
*rlen = 0;
@@ -465,7 +465,7 @@ static ATCA_STATUS kit_host_ta_receive(ascii_kit_host_context_t* ctx, int argc,
465465

466466
(void)atcontrol(&ctx->device->mIface, ATCA_HAL_CONTROL_SELECT, NULL, 0);
467467

468-
if (ATCA_SUCCESS != (status = atsend(&ctx->device->mIface, address, &word_address, sizeof(word_address))))
468+
if (ATCA_SUCCESS != (status = atsend(&ctx->device->mIface, word_address, NULL, 0)))
469469
{
470470
return status;
471471
}

app/pkcs11/trust_pkcs11_config.c

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -170,17 +170,14 @@ CK_RV pkcs11_trust_load_objects(pkcs11_slot_ctx_ptr pSlot)
170170
return CKR_ARGUMENTS_BAD;
171171
}
172172

173-
if (CKR_OK == rv)
173+
rv = pkcs11_object_alloc(pSlot->slot_id, &pObject);
174+
if (NULL != pObject)
174175
{
175-
rv = pkcs11_object_alloc(pSlot->slot_id, &pObject);
176-
if (NULL != pObject)
177-
{
178-
/* Slot 0 - Device Private Key */
179-
(void)pkcs11_config_init_private(pObject, pkcs11_trust_device_private_key_label, strlen(pkcs11_trust_device_private_key_label));
180-
pObject->slot = 0;
181-
pObject->flags |= PKCS11_OBJECT_FLAG_TRUST_TYPE;
182-
pObject->config = &pSlot->cfg_zone;
183-
}
176+
/* Slot 0 - Device Private Key */
177+
(void)pkcs11_config_init_private(pObject, pkcs11_trust_device_private_key_label, strlen(pkcs11_trust_device_private_key_label));
178+
pObject->slot = 0;
179+
pObject->flags |= PKCS11_OBJECT_FLAG_TRUST_TYPE;
180+
pObject->config = &pSlot->cfg_zone;
184181
}
185182

186183
if (CKR_OK == rv)

app/wpc/wpccert_client.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@ ATCA_STATUS wpccert_read_cert(
359359
}
360360

361361
// set signature
362+
buf.len = TA_SIGN_P256_SIG_SIZE;
362363
if (ATCA_SUCCESS != (status = atcacert_set_signature(cert_def, cert, cert_size, max_cert_size, &buf)))
363364
{
364365
status = ATCA_TRACE(status, "set signature failed");

cmake/check_environment.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ if(_GNU_SOURCE)
2020
endif()
2121

2222
# Check and configure packaging options
23-
set(DEFAULT_LIB_PATH "${CMAKE_INSTALL_FULL_LIBDIR}" CACHE
23+
set(DEFAULT_LIB_PATH "${CMAKE_INSTALL_LIBDIR}" CACHE
2424
STRING "The default absolute library path")
2525
set(DEFAULT_INC_PATH "${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}" CACHE
2626
STRING "The default include install path")
27-
set(DEFAULT_CONF_PATH "${CMAKE_INSTALL_FULL_SYSCONFDIR}/${PROJECT_NAME}" CACHE
27+
set(DEFAULT_CONF_PATH "${CMAKE_INSTALL_SYSCONFDIR}/${PROJECT_NAME}" CACHE
2828
STRING "The default location of ${PROJECT_NAME}.conf")
29-
set(DEFAULT_STORE_PATH "${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/lib/${PROJECT_NAME}" CACHE
29+
set(DEFAULT_STORE_PATH "${CMAKE_INSTALL_LOCALSTATEDIR}/lib/${PROJECT_NAME}" CACHE
3030
STRING "The default location of the filestore directory")
3131
set(DEFAULT_CONF_FILE_NAME "${PROJECT_NAME}.conf" CACHE
3232
STRING "The default file for library configuration")

cmake/config_install.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@ endif()
2828

2929
if (UNIX)
3030
configure_file(cmake/libcryptoauth.pc.in libcryptoauth.pc @ONLY)
31-
install(FILES ${CMAKE_BINARY_DIR}/libcryptoauth.pc DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}/pkgconfig")
31+
install(FILES ${CMAKE_BINARY_DIR}/libcryptoauth.pc DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
3232
endif (UNIX)

cmake/libcryptoauth.pc.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
libdir=@CMAKE_INSTALL_FULL_LIBDIR@
2-
includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
1+
libdir=@CMAKE_INSTALL_LIBDIR@
2+
includedir=@CMAKE_INSTALL_INCLUDEDIR@
33

44
Name: libcryptoauth
55
Version: @PROJECT_VERSION@

cryptoauthlib-manual.pdf

8.77 KB
Binary file not shown.

0 commit comments

Comments
 (0)