From 64e63c68c86049c4979df405d6e362e8c9f20598 Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Tue, 25 Aug 2020 17:13:17 +0200 Subject: [PATCH] tls-crypto: Destroy HKDF instance if keys are derived multiple times This will be the case during a retry. --- src/libtls/tls_crypto.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libtls/tls_crypto.c b/src/libtls/tls_crypto.c index 494a6930a..04fe4ef0f 100644 --- a/src/libtls/tls_crypto.c +++ b/src/libtls/tls_crypto.c @@ -1270,6 +1270,7 @@ static void destroy_aeads(private_tls_crypto_t *this) static bool create_ciphers(private_tls_crypto_t *this, suite_algs_t *algs) { destroy_aeads(this); + DESTROY_IF(this->hkdf); DESTROY_IF(this->prf); if (this->tls->get_version_max(this->tls) < TLS_1_3) {