Skip to content

Commit

Permalink
Fix misuse of TLSX_KeyShare_Find()
Browse files Browse the repository at this point in the history
TLSX_KeyShare_Find() returns 1 on success and condition has incorrect non-inverted logic.
  • Loading branch information
egorpugin authored Feb 1, 2025
1 parent 275beca commit f356be5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -9277,7 +9277,7 @@ int TLSX_KeyShare_Parse(WOLFSSL* ssl, const byte* input, word16 length,
}

/* Check if the group was sent. */
if (TLSX_KeyShare_Find(ssl, group)) {
if (!TLSX_KeyShare_Find(ssl, group)) {
WOLFSSL_ERROR_VERBOSE(BAD_KEY_SHARE_DATA);
return BAD_KEY_SHARE_DATA;
}
Expand Down

0 comments on commit f356be5

Please sign in to comment.