]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
tls: fix handshake handling being too strict
authorVictor Julien <vjulien@oisf.net>
Fri, 17 Jan 2025 06:00:51 +0000 (07:00 +0100)
committerVictor Julien <victor@inliniac.net>
Mon, 10 Mar 2025 11:23:08 +0000 (12:23 +0100)
e.g. server hello done has no data

src/app-layer-ssl.c

index 8da3617acffc8ee73d31cf53cfdec0c026b5e8ee..bce099fd59147bcdbe7c97953de23055f7e76fa8 100644 (file)
@@ -1664,6 +1664,7 @@ static int SupportedHandshakeType(const uint8_t type)
 }
 
 /**
+ *  \param input_len length of bytes after record header. Can be 0 (e.g. for server hello done).
  *  \retval parsed number of consumed bytes
  *  \retval < 0 error
  */
@@ -1673,9 +1674,6 @@ static int SSLv3ParseHandshakeType(SSLState *ssl_state, const uint8_t *input,
     const uint8_t *initial_input = input;
     int rc;
 
-    if (input_len == 0) {
-        return 0;
-    }
     DEBUG_VALIDATE_BUG_ON(RecordAlreadyProcessed(ssl_state->curr_connp));
 
     switch (ssl_state->curr_connp->handshake_type) {