From 54b3f1b2526f5c2719494ea8208121e78793d919 Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Mon, 23 Aug 2021 14:06:39 -0500 Subject: [PATCH] src/tls.c:TLSX_KeyShare_GenDhKey(): don't generate a key if one is already set. --- src/tls.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/tls.c b/src/tls.c index 4e052d5fe..cdd899530 100644 --- a/src/tls.c +++ b/src/tls.c @@ -6096,6 +6096,9 @@ static int TLSX_KeyShare_GenDhKey(WOLFSSL *ssl, KeyShareEntry* kse) word32 p_len; #endif + if (kse->key != NULL) + return 0; + /* TODO: [TLS13] The key size should come from wolfcrypt. */ /* Pick the parameters from the named group. */ #ifdef HAVE_PUBLIC_FFDHE