@@ -197,31 +197,33 @@ if(CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256 OR CONFIG_BOOT_ENCRYPT_EC256)
197
197
)
198
198
endif ()
199
199
if (CONFIG_BOOT_USE_TINYCRYPT)
200
- # When using ECDSA signatures, pull in our copy of the tinycrypt library.
201
- zephyr_library_include_directories(
202
- ${BOOT_DIR} /zephyr/include
203
- ${TINYCRYPT_DIR} /include
200
+ # When using ECDSA signatures, pull in our copy of the tinycrypt library.
201
+ zephyr_library_include_directories(
202
+ ${BOOT_DIR} /zephyr/include
203
+ ${TINYCRYPT_DIR} /include
204
204
)
205
- zephyr_include_directories(${TINYCRYPT_DIR} /include )
205
+ zephyr_include_directories(${TINYCRYPT_DIR} /include )
206
206
207
- zephyr_library_sources(
208
- ${TINYCRYPT_DIR} /source /ecc.c
209
- ${TINYCRYPT_DIR} /source /ecc_dsa.c
210
- ${TINYCRYPT_DIR} /source /sha256.c
211
- ${TINYCRYPT_DIR} /source /utils.c
207
+ zephyr_library_sources(
208
+ ${TINYCRYPT_DIR} /source /ecc.c
209
+ ${TINYCRYPT_DIR} /source /ecc_dsa.c
210
+ ${TINYCRYPT_DIR} /source /sha256.c
211
+ ${TINYCRYPT_DIR} /source /utils.c
212
212
)
213
213
elseif (CONFIG_BOOT_USE_NRF_CC310_BL)
214
214
zephyr_library_sources(${NRF_DIR} /cc310_glue.c)
215
215
zephyr_library_include_directories(${NRF_DIR} )
216
216
zephyr_link_libraries(nrfxlib_crypto)
217
217
endif ()
218
218
219
- # Since here we are not using Zephyr's mbedTLS but rather our own, we need
220
- # to set MBEDTLS_CONFIG_FILE ourselves. When using Zephyr's copy, this
221
- # variable is set by its Kconfig in the Zephyr codebase.
222
- zephyr_library_compile_definitions(
223
- MBEDTLS_CONFIG_FILE="${CONFIG_MBEDTLS_CFG_FILE} "
219
+ if (CONFIG_MBEDTLS_CFG_FILE)
220
+ # Since here we are not using Zephyr's mbedTLS but rather our own, we need
221
+ # to set MBEDTLS_CONFIG_FILE ourselves. When using Zephyr's copy, this
222
+ # variable is set by its Kconfig in the Zephyr codebase.
223
+ zephyr_library_compile_definitions(
224
+ MBEDTLS_CONFIG_FILE="${CONFIG_MBEDTLS_CFG_FILE} "
224
225
)
226
+ endif ()
225
227
elseif (CONFIG_BOOT_SIGNATURE_TYPE_NONE)
226
228
zephyr_library_include_directories(
227
229
${BOOT_DIR} /zephyr/include
0 commit comments