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