output-json-tls: don't log as "resumed" without ServerHello

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.
pull/3488/head
Mats Klepsland 7 years ago
parent 4470b05ae4
commit 814e1624c2

@ -135,6 +135,7 @@ static void JsonTlsLogSessionResumed(json_t *js, SSLState *ssl_state)
been seen, and the session is not TLSv1.3 or later. */ been seen, and the session is not TLSv1.3 or later. */
if ((ssl_state->server_connp.cert0_issuerdn == NULL && if ((ssl_state->server_connp.cert0_issuerdn == NULL &&
ssl_state->server_connp.cert0_subject == 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)) { ((ssl_state->flags & SSL_AL_FLAG_LOG_WITHOUT_CERT) == 0)) {
json_object_set_new(js, "session_resumed", json_boolean(true)); json_object_set_new(js, "session_resumed", json_boolean(true));
} }

Loading…
Cancel
Save