Skip to content

Commit

Permalink
Merge pull request #8417 from SparkiDev/tls13_hrr_keyshare_comments
Browse files Browse the repository at this point in the history
TLS 1.3 HRR KeyShare: Improve comments
  • Loading branch information
dgarske authored Feb 4, 2025
2 parents eb15a12 + 92491e6 commit 93cb9c4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -9270,13 +9270,15 @@ int TLSX_KeyShare_Parse(WOLFSSL* ssl, const byte* input, word16 length,
if (ssl->error != WC_NO_ERR_TRACE(WC_PENDING_E))
#endif
{
/* Check the selected group was supported by ClientHello extensions. */
/* Check the selected group was supported by ClientHello extensions.
*/
if (!TLSX_SupportedGroups_Find(ssl, group, ssl->extensions)) {
WOLFSSL_ERROR_VERBOSE(BAD_KEY_SHARE_DATA);
return BAD_KEY_SHARE_DATA;
}

/* Check if the group was sent. */
/* Make sure KeyShare for server requested group was not sent in
* ClientHello. */
if (TLSX_KeyShare_Find(ssl, group)) {
WOLFSSL_ERROR_VERBOSE(BAD_KEY_SHARE_DATA);
return BAD_KEY_SHARE_DATA;
Expand Down

0 comments on commit 93cb9c4

Please sign in to comment.