Skip to content

Commit f356be5

Browse files
authored
Fix misuse of TLSX_KeyShare_Find()
TLSX_KeyShare_Find() returns 1 on success and condition has incorrect non-inverted logic.
1 parent 275beca commit f356be5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tls.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9277,7 +9277,7 @@ int TLSX_KeyShare_Parse(WOLFSSL* ssl, const byte* input, word16 length,
92779277
}
92789278

92799279
/* Check if the group was sent. */
9280-
if (TLSX_KeyShare_Find(ssl, group)) {
9280+
if (!TLSX_KeyShare_Find(ssl, group)) {
92819281
WOLFSSL_ERROR_VERBOSE(BAD_KEY_SHARE_DATA);
92829282
return BAD_KEY_SHARE_DATA;
92839283
}

0 commit comments

Comments
 (0)