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>
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
(cherry picked from commit b9a2382)
(cherry picked from commit ca168fe)
  • Loading branch information
Vge0rge authored and de-nordic committed May 26, 2023
1 parent de0e812 commit d79424c
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 d79424c

Please sign in to comment.