Skip to content

Commit

Permalink
[mbedtls] make debug logging independent from builtin (#9848)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
thcu-gp committed Feb 14, 2024
1 parent 9b36a42 commit 49c59ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/crypto/mbedtls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 49c59ec

Please sign in to comment.