zephr: add mbedtls/library to inclusion directories for RSA encryption
Zephyr's MbedTLS module gives its interface header directory to inclusion
directory list. RSA encryption implementations requires internal header file
which resides in mbedtls/library directory.
This path adds missing inclusion directory path exclusively for
encrypted.c in zephyr-rtos port.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
diff --git a/boot/zephyr/CMakeLists.txt b/boot/zephyr/CMakeLists.txt
index b9bf517..0530a05 100644
--- a/boot/zephyr/CMakeLists.txt
+++ b/boot/zephyr/CMakeLists.txt
@@ -191,6 +191,13 @@
# Use mbedTLS provided by Zephyr for RSA signatures. (Its config file
# is set using Kconfig.)
zephyr_include_directories(include)
+ if(CONFIG_BOOT_ENCRYPT_RSA)
+ set_source_files_properties(
+ ${BOOT_DIR}/bootutil/src/encrypted.c
+ PROPERTIES
+ INCLUDE_DIRECTORIES ${ZEPHYR_MBEDTLS_MODULE_DIR}/library
+ )
+ endif()
elseif(CONFIG_BOOT_SIGNATURE_TYPE_ED25519 OR CONFIG_BOOT_ENCRYPT_X25519)
if(CONFIG_BOOT_USE_TINYCRYPT)
zephyr_library_include_directories(