|
@@ -101,6 +101,8 @@ TlsTransport::TlsTransport(variant<shared_ptr<TcpTransport>, shared_ptr<HttpProx
|
|
|
|
|
|
TlsTransport::~TlsTransport() {
|
|
|
stop();
|
|
|
+
|
|
|
+ PLOG_DEBUG << "Destroying TLS transport";
|
|
|
gnutls_deinit(mSession);
|
|
|
}
|
|
|
|
|
@@ -354,7 +356,15 @@ TlsTransport::TlsTransport(variant<shared_ptr<TcpTransport>, shared_ptr<HttpProx
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-TlsTransport::~TlsTransport() {}
|
|
|
+TlsTransport::~TlsTransport() {
|
|
|
+ stop();
|
|
|
+
|
|
|
+ PLOG_DEBUG << "Destroying TLS transport";
|
|
|
+ mbedtls_entropy_free(&mEntropy);
|
|
|
+ mbedtls_ctr_drbg_free(&mDrbg);
|
|
|
+ mbedtls_ssl_free(&mSsl);
|
|
|
+ mbedtls_ssl_config_free(&mConf);
|
|
|
+}
|
|
|
|
|
|
void TlsTransport::start() {
|
|
|
PLOG_DEBUG << "Starting TLS transport";
|
|
@@ -630,6 +640,8 @@ TlsTransport::TlsTransport(variant<shared_ptr<TcpTransport>, shared_ptr<HttpProx
|
|
|
|
|
|
TlsTransport::~TlsTransport() {
|
|
|
stop();
|
|
|
+
|
|
|
+ PLOG_DEBUG << "Destroying TLS transport";
|
|
|
SSL_free(mSsl);
|
|
|
SSL_CTX_free(mCtx);
|
|
|
}
|