mbedtls: option for MBEDTLS_PLATFORM_ZEROIZE_ALT

Add a Kconfig option for enabling `MBEDTLS_PLATFORM_ZEROIZE_ALT`, which
is required if the mbed backend already provides an implementation.

For example, the Nordic cryptocell precompiled backends.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
This commit is contained in:
Jordan Yates 2023-12-18 13:27:37 +10:00 committed by Henrik Brix Andersen
parent 5dec4fcab8
commit f6c5091563
2 changed files with 10 additions and 0 deletions

View file

@ -224,6 +224,12 @@ config MBEDTLS_ZEPHYR_ENTROPY
for mbed TLS. The entropy source is registered automatically during
system initialization.
config MBEDTLS_ZEROIZE_ALT
bool "mbed TLS alternate mbedtls_platform_zeroize implementation"
help
mbed TLS configuration supplies an alternate implementation of
mbedtls_platform_zeroize.
config APP_LINK_WITH_MBEDTLS
bool "Link 'app' with MBEDTLS"
default y

View file

@ -19,6 +19,10 @@
#define MBEDTLS_PLATFORM_EXIT_ALT
#define MBEDTLS_NO_PLATFORM_ENTROPY
#if defined(CONFIG_MBEDTLS_ZEROIZE_ALT)
#define MBEDTLS_PLATFORM_ZEROIZE_ALT
#endif
#if defined(CONFIG_MBEDTLS_ZEPHYR_ENTROPY)
#define MBEDTLS_ENTROPY_HARDWARE_ALT
#else