diff --git a/daemon/dtls.c b/daemon/dtls.c index 96f590e63..9badd0953 100644 --- a/daemon/dtls.c +++ b/daemon/dtls.c @@ -890,7 +890,6 @@ int dtls(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) {