Skip to content
This repository was archived by the owner on Jan 20, 2025. It is now read-only.

Commit 10eac70

Browse files
committed
Add verbose tracing to cleanup and destructor
1 parent 081e750 commit 10eac70

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/AsyncTCP_TLS_Context.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,14 +236,17 @@ int AsyncTCP_TLS_Context::runSSLHandshake(void)
236236
void AsyncTCP_TLS_Context::_deleteHandshakeCerts(void)
237237
{
238238
if (_have_ca_cert) {
239+
log_v("Cleaning CA certificate.");
239240
mbedtls_x509_crt_free(&ca_cert);
240241
_have_ca_cert = false;
241242
}
242243
if (_have_client_cert) {
244+
log_v("Cleaning client certificate.");
243245
mbedtls_x509_crt_free(&client_cert);
244246
_have_client_cert = false;
245247
}
246248
if (_have_client_key) {
249+
log_v("Cleaning client certificate key.");
247250
mbedtls_pk_free(&client_key);
248251
_have_client_key = false;
249252
}
@@ -253,6 +256,8 @@ AsyncTCP_TLS_Context::~AsyncTCP_TLS_Context()
253256
{
254257
_deleteHandshakeCerts();
255258

259+
log_v("Cleaning SSL connection.");
260+
256261
mbedtls_ssl_free(&ssl_ctx);
257262
mbedtls_ssl_config_free(&ssl_conf);
258263
mbedtls_ctr_drbg_free(&drbg_ctx);

0 commit comments

Comments
 (0)