From 49c59ec519cc8b49dd58978d1bc80b7ae7ba88d0 Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 14 Feb 2024 20:03:17 +0100 Subject: [PATCH] [mbedtls] make debug logging independent from builtin (#9848) Currently mbedtls debug logging can only be set for builtin mbedtls. With an external mbedtls the log level does not get configured. This commit removes the builtin requirement. --- src/core/crypto/mbedtls.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/crypto/mbedtls.cpp b/src/core/crypto/mbedtls.cpp index f8c1c5319..dc1894921 100644 --- a/src/core/crypto/mbedtls.cpp +++ b/src/core/crypto/mbedtls.cpp @@ -53,11 +53,11 @@ namespace Crypto { MbedTls::MbedTls(void) { -#if OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS_MANAGEMENT #ifdef MBEDTLS_DEBUG_C // mbedTLS's debug level is almost the same as OpenThread's mbedtls_debug_set_threshold(OPENTHREAD_CONFIG_LOG_LEVEL); #endif +#if OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS_MANAGEMENT mbedtls_platform_set_calloc_free(Heap::CAlloc, Heap::Free); #endif // OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS_MANAGEMENT }