|
@@ -51,8 +51,10 @@ mbed_sslctx_init(SSL_CTX *ctx, const char *crt)
|
|
mbedtls_ssl_config_init(conf);
|
|
mbedtls_ssl_config_init(conf);
|
|
|
|
|
|
// set debug level
|
|
// set debug level
|
|
|
|
+#if defined(CONFIG_MBEDTLS_DEBUG)
|
|
mbedtls_debug_set_threshold(2);
|
|
mbedtls_debug_set_threshold(2);
|
|
mbedtls_ssl_conf_dbg(conf, mbed_debug, stdout);
|
|
mbedtls_ssl_conf_dbg(conf, mbed_debug, stdout);
|
|
|
|
+#endif
|
|
mbedtls_pk_init(&ctx->pkey);
|
|
mbedtls_pk_init(&ctx->pkey);
|
|
mbedtls_ctr_drbg_init(&ctx->ctr);
|
|
mbedtls_ctr_drbg_init(&ctx->ctr);
|
|
mbedtls_x509_crt_init(&ctx->cert);
|
|
mbedtls_x509_crt_init(&ctx->cert);
|
|
@@ -175,7 +177,7 @@ static void
|
|
mbed_debug(void *context, int level, const char *file, int line, const char *str)
|
|
mbed_debug(void *context, int level, const char *file, int line, const char *str)
|
|
{
|
|
{
|
|
(void)level;
|
|
(void)level;
|
|
- mbedtls_fprintf((FILE *)context, "file:%s line:%d str:%s\n", file, line, str);
|
|
|
|
|
|
+ mbedtls_fprintf((FILE *)context, "file:%s line:%d str:%s", file, line, str);
|
|
}
|
|
}
|
|
|
|
|
|
#endif /* USE_MBEDTLS */
|
|
#endif /* USE_MBEDTLS */
|