mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-21 10:26:06 +03:00
Fix error when debug enabled but no port chosen (#7648)
When the debug level for the device includes SSL but the debug port is chosen as "None," don't attempt to write debug messages. Fixes #7638
This commit is contained in:
parent
bc2b13ae16
commit
200e47fc7b
@ -21,7 +21,7 @@
|
||||
#include <memory>
|
||||
|
||||
|
||||
#ifdef DEBUG_ESP_SSL
|
||||
#if defined(DEBUG_ESP_SSL) && defined(DEBUG_ESP_PORT)
|
||||
#define DEBUG_BSSL(fmt, ...) DEBUG_ESP_PORT.printf_P((PGM_P)PSTR( "BSSL:" fmt), ## __VA_ARGS__)
|
||||
#else
|
||||
#define DEBUG_BSSL(...)
|
||||
|
@ -59,7 +59,7 @@ extern "C" {
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_ESP_SSL
|
||||
#if defined(DEBUG_ESP_SSL) && defined(DEBUG_ESP_PORT)
|
||||
#define DEBUG_BSSL(fmt, ...) DEBUG_ESP_PORT.printf_P((PGM_P)PSTR( "BSSL:" fmt), ## __VA_ARGS__)
|
||||
#else
|
||||
#define DEBUG_BSSL(...)
|
||||
@ -664,7 +664,7 @@ extern "C" {
|
||||
if (!xc->done_cert) {
|
||||
br_sha1_update(&xc->sha1_cert, buf, len);
|
||||
br_x509_decoder_push(&xc->ctx, (const void*)buf, len);
|
||||
#ifdef DEBUG_ESP_SSL
|
||||
#if defined(DEBUG_ESP_SSL) && defined(DEBUG_ESP_PORT)
|
||||
DEBUG_BSSL("CERT: ");
|
||||
for (size_t i=0; i<len; i++) {
|
||||
DEBUG_ESP_PORT.printf_P(PSTR("%02x "), buf[i] & 0xff);
|
||||
|
Loading…
x
Reference in New Issue
Block a user