mirror of
https://github.com/eledio-devices/thirdparty-AsyncTCPSock.git
synced 2025-10-30 16:15:40 +01:00
Add verbose tracing to cleanup and destructor
This commit is contained in:
@@ -236,14 +236,17 @@ int AsyncTCP_TLS_Context::runSSLHandshake(void)
|
||||
void AsyncTCP_TLS_Context::_deleteHandshakeCerts(void)
|
||||
{
|
||||
if (_have_ca_cert) {
|
||||
log_v("Cleaning CA certificate.");
|
||||
mbedtls_x509_crt_free(&ca_cert);
|
||||
_have_ca_cert = false;
|
||||
}
|
||||
if (_have_client_cert) {
|
||||
log_v("Cleaning client certificate.");
|
||||
mbedtls_x509_crt_free(&client_cert);
|
||||
_have_client_cert = false;
|
||||
}
|
||||
if (_have_client_key) {
|
||||
log_v("Cleaning client certificate key.");
|
||||
mbedtls_pk_free(&client_key);
|
||||
_have_client_key = false;
|
||||
}
|
||||
@@ -253,6 +256,8 @@ AsyncTCP_TLS_Context::~AsyncTCP_TLS_Context()
|
||||
{
|
||||
_deleteHandshakeCerts();
|
||||
|
||||
log_v("Cleaning SSL connection.");
|
||||
|
||||
mbedtls_ssl_free(&ssl_ctx);
|
||||
mbedtls_ssl_config_free(&ssl_conf);
|
||||
mbedtls_ctr_drbg_free(&drbg_ctx);
|
||||
|
||||
Reference in New Issue
Block a user