summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Salzman <daniel.salzman@nic.cz>2024-12-20 15:50:46 +0100
committerDaniel Salzman <daniel.salzman@nic.cz>2025-01-03 11:35:36 +0100
commitc29e79178a4ce0db95b381bfd3ed8931443e971d (patch)
tree531d7db39552bc7abdb27ad08f8496b991fe5f76
parentknotd: avoid crash on crafted CTL payload (diff)
downloadknot-c29e79178a4ce0db95b381bfd3ed8931443e971d.tar.xz
knot-c29e79178a4ce0db95b381bfd3ed8931443e971d.zip
tls: call gnutls_bye() when closing a TLS connection
-rw-r--r--src/libknot/quic/tls.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libknot/quic/tls.c b/src/libknot/quic/tls.c
index 869446c49..1ca598dde 100644
--- a/src/libknot/quic/tls.c
+++ b/src/libknot/quic/tls.c
@@ -102,6 +102,7 @@ _public_
void knot_tls_conn_del(knot_tls_conn_t *conn)
{
if (conn != NULL && conn->fd_clones_count-- < 1) {
+ (void)gnutls_bye(conn->session, GNUTLS_SHUT_WR);
gnutls_deinit(conn->session);
free(conn);
}