Skip to content

Commit

Permalink
Merge pull request #29 from adafruit/tannewt-patch-1
Browse files Browse the repository at this point in the history
Add some newlines to improve debug output
  • Loading branch information
dhalbert authored Nov 5, 2020
2 parents d1a03dd + 3960966 commit f2a0e60
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arduino/libraries/WiFi/src/WiFiSSLClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ int WiFiSSLClient::connect(const char* host, uint16_t port, const char* client_c
_netContext.fd = -1;
_connected = false;

ets_printf("Free internal heap before TLS %u", heap_caps_get_free_size(MALLOC_CAP_8BIT));
ets_printf("Free internal heap before TLS %u\n", heap_caps_get_free_size(MALLOC_CAP_8BIT));

ets_printf("*** connect init\n");
// SSL Client Initialization
Expand Down Expand Up @@ -130,7 +130,7 @@ int WiFiSSLClient::connect(const char* host, uint16_t port, const char* client_c
return 0;
}

ets_printf("Length of certs_data: %d", strlen((char*)certs_data)+1);
ets_printf("Length of certs_data: %d\n", strlen((char*)certs_data)+1);
ets_printf("*** connect crt parse\n");
ret = mbedtls_x509_crt_parse(&_caCrt, certs_data, strlen((char*)certs_data) + 1);
ets_printf("*** connect conf ca chain\n");
Expand Down Expand Up @@ -209,7 +209,7 @@ int WiFiSSLClient::connect(const char* host, uint16_t port, const char* client_c
// ref: https://tls.mbed.org/api/ssl_8h.html#a4a37e497cd08c896870a42b1b618186e
while ((ret = mbedtls_ssl_handshake(&_sslContext)) !=0) {
if (ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE) {
ets_printf("Error performing SSL handshake");
ets_printf("Error performing SSL handshake\n");
}
if((millis() - start_handshake) > _handshake_timeout){
ets_printf("SSL Handshake Timeout\n");
Expand Down

0 comments on commit f2a0e60

Please sign in to comment.