ell.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH 3/3] tls: Fix state check on Client Hello
@ 2022-05-26 15:56 Andrew Zaborowski
  0 siblings, 0 replies; only message in thread
From: Andrew Zaborowski @ 2022-05-26 15:56 UTC (permalink / raw)
  To: ell

[-- Attachment #1: Type: text/plain, Size: 700 bytes --]

A Client Hello message is allowed in the WAIT_HELLO and DONE states,
apparently this check had a typo.
---
 ell/tls.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ell/tls.c b/ell/tls.c
index fa00075..b2f7411 100644
--- a/ell/tls.c
+++ b/ell/tls.c
@@ -2740,7 +2740,7 @@ bool tls_handle_message(struct l_tls *tls, const uint8_t *message,
 		/* Start hashing the handshake contents on first message */
 		if (tls->server && message[0] == TLS_CLIENT_HELLO &&
 				(tls->state == TLS_HANDSHAKE_WAIT_HELLO ||
-				 tls->state != TLS_HANDSHAKE_DONE))
+				 tls->state == TLS_HANDSHAKE_DONE))
 			if (!tls_init_handshake_hash(tls))
 				return false;
 
-- 
2.32.0

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-05-26 15:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-26 15:56 [PATCH 3/3] tls: Fix state check on Client Hello Andrew Zaborowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).