]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
mbedtls: set debug threshold to 4 (verbose) when MBEDTLS_DEBUG is defined
authorThomas Glanzmann <thomas@glanzmann.de>
Wed, 3 Aug 2016 06:20:16 +0000 (08:20 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 4 Aug 2016 22:23:17 +0000 (00:23 +0200)
In order to make MBEDTLS_DEBUG work, the debug threshold must be unequal
to 0.  This patch also adds a comment how mbedtls must be compiled in
order to make debugging work, and explains the possible debug levels.

lib/vtls/mbedtls.c

index a1e7d23639802bf37ae8bcef2b68bb11ef80b5f4..c04fc0385b60780ff37104e5e188de820179b63e 100644 (file)
@@ -420,7 +420,15 @@ mbed_connect_step1(struct connectdata *conn,
 #endif
 
 #ifdef MBEDTLS_DEBUG
+  /* In order to make that work in mbedtls MBEDTLS_DEBUG_C must be defined. */
   mbedtls_ssl_conf_dbg(&connssl->config, mbed_debug, data);
+  /* - 0 No debug
+   * - 1 Error
+   * - 2 State change
+   * - 3 Informational
+   * - 4 Verbose
+   */
+  mbedtls_debug_set_threshold(4);
 #endif
 
   connssl->connecting_state = ssl_connect_2;