Skip to content

Commit

Permalink
[nrf noup] boot: zephyr: Enable zeroize ALT func
Browse files Browse the repository at this point in the history
-This enables the MBEDTLS_PLATFORM_ZEROIZE_ALT
 definition on Mbed TLS build of the MCUBOOT when
 the platform library is enabled. If not defined
 the Mbed TLS will compile the zeroize function
 and it will cause multiple definition errors.
 This is a noup because the configuration
 does not exist outside the sdk-nrf.

Ref: NCSDK-13503

Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
(cherry picked from commit 542f51f)
  • Loading branch information
Vge0rge authored and mbolivar-nordic committed Feb 20, 2023
1 parent 73e1824 commit b9a2382
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions boot/zephyr/include/mcuboot-mbedtls-cfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@
* the simulator build.rs accordingly.
*/

/*
* When the CC3XX_PLATFORM library is enabled we need to
* inform the Mbed TLS library to not compile the
* platform_zeroize function, otherwise we will get
* a multiple definitions error.
*/
#if defined(CONFIG_NRF_CC3XX_PLATFORM)
#define MBEDTLS_PLATFORM_ZEROIZE_ALT
#endif

#if defined(CONFIG_BOOT_SIGNATURE_TYPE_RSA) || defined(CONFIG_BOOT_ENCRYPT_RSA)
#include "config-rsa.h"
#elif defined(CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256) || \
Expand Down

0 comments on commit b9a2382

Please sign in to comment.