Skip to content

Commit

Permalink
freertos-libs-test: Fix OTA PAL app signing key specification
Browse files Browse the repository at this point in the history
For the integration test app, select the code signing public key .Pem
file within test directory of `FreeRTOS-Libraries-Integration-Tests`
for generating the credentials header file.

This static public key is necessary to verify the test signature
using the same key pair used to generate the signature during
provisioning.

Signed-off-by: Ahmed Ismail <[email protected]>
  • Loading branch information
AhmedIsmail02 committed Feb 6, 2024
1 parent 84916a8 commit 7bfc1d7
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion applications/helpers/provisioning/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,18 @@ target_link_libraries(provisioning_data PRIVATE

ExternalProject_Get_Property(trusted_firmware-m-build BINARY_DIR)

if(INTEGRATION_TESTS EQUAL 1)
set(
CODE_SIGNING_PUBLIC_KEY_PEM_PATH
${freertos_libraries_integration_tests_SOURCE_DIR}/src/ota/test_files/tfm-rsa-sha256-signer.crt.pem
)
else()
set(
CODE_SIGNING_PUBLIC_KEY_PEM_PATH
${BINARY_DIR}/api_ns/image_signing/keys/image_ns_signing_public_key.pem
)
endif()

add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/aws_clientcredential_keys.h
DEPENDS ${AWS_CLIENT_PRIVATE_KEY_PEM_PATH}
DEPENDS ${AWS_CLIENT_CERTIFICATE_PEM_PATH}
Expand All @@ -36,7 +48,7 @@ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/aws_clientcredential_keys.
${CMAKE_CURRENT_BINARY_DIR}
--path-to-client-private-key-pem ${AWS_CLIENT_PRIVATE_KEY_PEM_PATH}
--path-to-client-certificate-pem ${AWS_CLIENT_CERTIFICATE_PEM_PATH}
--path-to-code-signing-public-key-pem ${BINARY_DIR}/api_ns/image_signing/keys/image_ns_signing_public_key.pem
--path-to-code-signing-public-key-pem ${CODE_SIGNING_PUBLIC_KEY_PEM_PATH}
)

add_custom_target(aws_clientcredential_keys_header
Expand Down

0 comments on commit 7bfc1d7

Please sign in to comment.