mbedtls: Kconfig option to enable/disable debug functions

This introduces a new Kconfig option to switch on/off mbedtls' support
for debug functions.

The idea behind is to inspect TLS traffic with Wireshark for debug
purposes. At the moment, there is no native or 'nice' support for
this, but at
68aea15833
an example implementation can be found which uses the debug functions
of the library. However, this requires to have this debug stuff enabled
in the library, but at the moment it is staticly patched out.

So this patch removes the static part from the configuration patch
and introduces a dynamic config file editing during build.

When enabled, this heavily increases the library size, so I added
a warning in the Kconfig help section.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
This commit is contained in:
Michael Heimpold
2019-01-04 00:00:41 +01:00
committed by Hauke Mehrtens
parent e8f2302516
commit 268b5bec80
2 changed files with 28 additions and 10 deletions

View File

@@ -180,15 +180,6 @@
/**
* \def MBEDTLS_CHACHA20_C
@@ -2120,7 +2120,7 @@
*
* This module provides debugging functions.
*/
-#define MBEDTLS_DEBUG_C
+//#define MBEDTLS_DEBUG_C
/**
* \def MBEDTLS_DES_C
@@ -2149,7 +2149,7 @@
* \warning DES is considered a weak cipher and its use constitutes a
* security risk. We recommend considering stronger ciphers instead.