]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
output-json-tls: don't log as "resumed" without ServerHello
authorMats Klepsland <mats.klepsland@gmail.com>
Fri, 21 Sep 2018 05:57:34 +0000 (07:57 +0200)
committerMats Klepsland <mats.klepsland@gmail.com>
Fri, 21 Sep 2018 06:08:39 +0000 (08:08 +0200)
Don't log a session as "resumed" if a ServerHello record has not been
seen. This makes sure that incomplete TLS sessions where the ClientHello
contains a session ticket, is not logged as a session resumption.

src/output-json-tls.c

index 1f7f909b967b3aaee6c13d446723e09eb46077a4..68f87dcad8c8a96f2830b64172c0a837cfb948a5 100644 (file)
@@ -135,6 +135,7 @@ static void JsonTlsLogSessionResumed(json_t *js, SSLState *ssl_state)
            been seen, and the session is not TLSv1.3 or later. */
         if ((ssl_state->server_connp.cert0_issuerdn == NULL &&
                ssl_state->server_connp.cert0_subject == NULL) &&
+               (ssl_state->flags & SSL_AL_FLAG_STATE_SERVER_HELLO) &&
                ((ssl_state->flags & SSL_AL_FLAG_LOG_WITHOUT_CERT) == 0)) {
             json_object_set_new(js, "session_resumed", json_boolean(true));
         }