diff --git a/subsys/nrf_security/Kconfig.tls b/subsys/nrf_security/Kconfig.tls index 82dd34c9d02c..844b7f3cb4aa 100644 --- a/subsys/nrf_security/Kconfig.tls +++ b/subsys/nrf_security/Kconfig.tls @@ -164,6 +164,13 @@ config MBEDTLS_DEBUG_LEVEL 3 Information 4 Verbose +config MBEDTLS_MEMORY_DEBUG + bool "mbed TLS memory debug activation" + help + Enable debugging of buffer allocator memory issues. Automatically + prints (to stderr) all (fatal) messages on memory allocation + issues. Enables function for 'debug output' of allocated memory. + config MBEDTLS_SSL_PROTO_DTLS bool "Enable support for DTLS" depends on MBEDTLS_SSL_PROTO_TLS1_2 diff --git a/subsys/nrf_security/cmake/legacy_crypto_config.cmake b/subsys/nrf_security/cmake/legacy_crypto_config.cmake index da7d5412ee6a..8c720d408bc0 100644 --- a/subsys/nrf_security/cmake/legacy_crypto_config.cmake +++ b/subsys/nrf_security/cmake/legacy_crypto_config.cmake @@ -96,6 +96,7 @@ kconfig_check_and_set_base(MBEDTLS_PKCS5_C) kconfig_check_and_set_base(MBEDTLS_PK_PARSE_C) kconfig_check_and_set_base(MBEDTLS_PK_WRITE_C) kconfig_check_and_set_base(MBEDTLS_DEBUG_C) +kconfig_check_and_set_base(MBEDTLS_MEMORY_DEBUG) kconfig_check_and_set_base(MBEDTLS_PSA_CRYPTO_SPM) diff --git a/subsys/nrf_security/configs/legacy_crypto_config.h.template b/subsys/nrf_security/configs/legacy_crypto_config.h.template index 4ac55b07e3c1..6d1a29554bf3 100644 --- a/subsys/nrf_security/configs/legacy_crypto_config.h.template +++ b/subsys/nrf_security/configs/legacy_crypto_config.h.template @@ -1066,7 +1066,7 @@ * * Uncomment this macro to let the buffer allocator print out error messages. */ -//#define MBEDTLS_MEMORY_DEBUG + #cmakedefine MBEDTLS_MEMORY_DEBUG /** * \def MBEDTLS_MEMORY_BACKTRACE