Fix compile error with IDF and mbedtls debug off

This commit is contained in:
me-no-dev 2017-02-28 23:18:03 +02:00
parent 00c1a65612
commit bcd6dcf5f6
2 changed files with 5 additions and 3 deletions

View File

@ -39,6 +39,7 @@ WiFiClientSecure::WiFiClientSecure()
_CA_cert = NULL; _CA_cert = NULL;
_cert = NULL; _cert = NULL;
_private_key = NULL; _private_key = NULL;
next = NULL;
} }
@ -57,6 +58,7 @@ WiFiClientSecure::WiFiClientSecure(int sock)
_CA_cert = NULL; _CA_cert = NULL;
_cert = NULL; _cert = NULL;
_private_key = NULL; _private_key = NULL;
next = NULL;
} }
WiFiClientSecure::~WiFiClientSecure() WiFiClientSecure::~WiFiClientSecure()

View File

@ -18,7 +18,7 @@
const char *pers = "esp32-tls"; const char *pers = "esp32-tls";
#define DEBUG true //Set false to supress debug messages #define DEBUG //Comment to supress debug messages
#ifdef DEBUG #ifdef DEBUG
#define DEBUG_PRINT(...) printf( __VA_ARGS__ ) #define DEBUG_PRINT(...) printf( __VA_ARGS__ )
@ -26,7 +26,7 @@ const char *pers = "esp32-tls";
#define DEBUG_PRINT(x) #define DEBUG_PRINT(x)
#endif #endif
#ifdef MBEDTLS_DEBUG_C #ifdef CONFIG_MBEDTLS_DEBUG
#define MBEDTLS_DEBUG_LEVEL 4 #define MBEDTLS_DEBUG_LEVEL 4
@ -201,7 +201,7 @@ int start_ssl_client(sslclient_context *ssl_client, uint32_t ipAddress, uint32_t
} }
mbedtls_ssl_conf_rng(&ssl_client->ssl_conf, mbedtls_ctr_drbg_random, &ssl_client->drbg_ctx); mbedtls_ssl_conf_rng(&ssl_client->ssl_conf, mbedtls_ctr_drbg_random, &ssl_client->drbg_ctx);
#ifdef MBEDTLS_DEBUG_C #ifdef CONFIG_MBEDTLS_DEBUG
mbedtls_debug_set_threshold(MBEDTLS_DEBUG_LEVEL); mbedtls_debug_set_threshold(MBEDTLS_DEBUG_LEVEL);
mbedtls_ssl_conf_dbg(&ssl_client->ssl_conf, mbedtls_debug, NULL); mbedtls_ssl_conf_dbg(&ssl_client->ssl_conf, mbedtls_debug, NULL);
#endif #endif