From 17d2e6ec14985f92abd27a29da47a64b27571674 Mon Sep 17 00:00:00 2001 From: Michal Hajek Date: Thu, 14 Dec 2023 10:11:09 -0500 Subject: [PATCH] MT#55283 leave SRTP keys in place after DTLS shut closes #1772 Change-Id: Iaf80e7314730537ca56112cd5f9e1f9c85ca6e3c (cherry picked from commit afd85a4f9486fa8a6f41a49cc344af92e5fdc54f) --- daemon/dtls.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/daemon/dtls.c b/daemon/dtls.c index cd6eac3e6..1474e80fc 100644 --- a/daemon/dtls.c +++ b/daemon/dtls.c @@ -890,7 +890,6 @@ int dtls(struct stream_fd *sfd, const str *s, const endpoint_t *fsin) { /* call must be locked */ void dtls_shutdown(struct packet_stream *ps) { - if (!ps) return; @@ -919,18 +918,15 @@ void dtls_shutdown(struct packet_stream *ps) { } dtls_connection_cleanup(d); - - crypto_reset(&sfd->crypto); } - if (ps->dtls_cert) { X509_free(ps->dtls_cert); ps->dtls_cert = NULL; } if (had_dtls) - call_stream_crypto_reset(ps); + ilogs(crypto, LOG_DEBUG, "Reuse SRTP crypto key"); } void dtls_connection_cleanup(struct dtls_connection *c) {