Skip to content

Commit

Permalink
mbedtls: make debugging work again
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathaniel Wesley Filardo committed Dec 29, 2017
1 parent ad516a6 commit b382291
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 deletions.
13 changes: 0 additions & 13 deletions app/include/mbedtls/mbedtls_debug.h

This file was deleted.

8 changes: 7 additions & 1 deletion app/mbedtls/app/espconn_mbedtls.c
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,12 @@ static bool mbedtls_msg_info_load(mbedtls_msg *msg, mbedtls_auth_info *auth_info
}
}

static void
mbedtls_dbg(void *p, int level, const char *file, int line, const char *str)
{
os_printf("TLS<%d>: %s:%d %s", level, file, line, str);
}

static bool mbedtls_msg_config(mbedtls_msg *msg)
{
const char *pers = NULL;
Expand Down Expand Up @@ -784,7 +790,7 @@ static bool mbedtls_msg_config(mbedtls_msg *msg)
mbedtls_ssl_conf_authmode(&msg->conf, MBEDTLS_SSL_VERIFY_NONE);
}
mbedtls_ssl_conf_rng(&msg->conf, mbedtls_ctr_drbg_random, &msg->ctr_drbg);
mbedtls_ssl_conf_dbg(&msg->conf, NULL, NULL);
mbedtls_ssl_conf_dbg(&msg->conf, mbedtls_dbg, NULL);

ret = mbedtls_ssl_setup(&msg->ssl, &msg->conf);
lwIP_REQUIRE_NOERROR(ret, exit);
Expand Down

0 comments on commit b382291

Please sign in to comment.