src/tls.c:TLSX_KeyShare_GenDhKey(): don't generate a key if one is already set.

This commit is contained in:
Daniel Pouzzner
2021-08-23 14:06:39 -05:00
parent 34e88b0605
commit 54b3f1b252

View File

@@ -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