Skip to content

Commit

Permalink
apps: Share dev_mode_key_provisioning.* files (#28)
Browse files Browse the repository at this point in the history
The files will be identical for all apps to be added.

Signed-off-by: Hugues Kamba-Mpiana <[email protected]>
  • Loading branch information
hugueskamba authored Jan 5, 2024
1 parent 2d615de commit 75f27d4
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 7 deletions.
10 changes: 4 additions & 6 deletions applications/aws_iot_example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,8 @@ add_subdirectory(../helpers ${CMAKE_BINARY_DIR}/helpers)

# Add main application executable
add_executable(aws-iot-example
dev_mode_key_provisioning.c
main.c
mqtt_demo_pub_sub.c
${corepkcs11_SOURCE_DIR}/source/dependency/3rdparty/mbedtls_utils/mbedtls_utils.c
main.c
)
target_include_directories(aws-iot-example
PUBLIC
Expand Down Expand Up @@ -121,6 +119,7 @@ target_link_libraries(aws-iot-example
mbedtls
mbedtls-threading-freertos
ota-for-aws-iot-embedded-sdk
provisioning-lib
tfm-ns-interface
toolchain-override
)
Expand Down Expand Up @@ -199,10 +198,8 @@ target_link_libraries(freertos-libraries-integration-tests-config

# Add FreeRTOS Libraries Integration Tests application executable
add_executable(aws-iot-example-tests
dev_mode_key_provisioning.c
main.c
mqtt_demo_pub_sub.c
${corepkcs11_SOURCE_DIR}/source/dependency/3rdparty/mbedtls_utils/mbedtls_utils.c
main.c
)
target_include_directories(aws-iot-example-tests
PUBLIC
Expand Down Expand Up @@ -233,6 +230,7 @@ target_link_libraries(aws-iot-example-tests
fri-bsp
helpers-events
ota-for-aws-iot-embedded-sdk
provisioning-lib
mbedtls
mbedtls-threading-freertos
tfm-ns-interface
Expand Down
11 changes: 11 additions & 0 deletions applications/helpers/provisioning/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,14 @@ target_elf_to_bin(provisioning_data provisioning_data)
add_custom_target(provisioning_data_bin ALL
SOURCES provisioning_data.bin
)

add_library(provisioning-lib
dev_mode_key_provisioning.c
${corepkcs11_SOURCE_DIR}/source/dependency/3rdparty/mbedtls_utils/mbedtls_utils.c
)

target_link_libraries(provisioning-lib
corepkcs11
freertos_kernel
mbedtls
)
Original file line number Diff line number Diff line change
Expand Up @@ -1342,7 +1342,7 @@ int xOtaProvisionCodeSigningKey( psa_key_handle_t * pxKeyHandle,
{
uint8_t pucPubKeyDerFormatBuffer[ DER_FORMAT_BUFFER_LENGTH ];
size_t xPubKeyDerLength = DER_FORMAT_BUFFER_LENGTH;
size_t xPubKeyPemLength = strlen( pxProvisioningParamsBundle->codeSigningPublicKey );
size_t xPubKeyPemLength = strlen( ( const char * ) pxProvisioningParamsBundle->codeSigningPublicKey );
int result = 0;
psa_status_t status = PSA_SUCCESS;
psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
Expand Down
1 change: 1 addition & 0 deletions release_changes/202401041521.change
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
provisioning: Share files between apps

0 comments on commit 75f27d4

Please sign in to comment.