Improved TLS alert detection. (#1542)
Signed-off-by: lns <matzeton@googlemail.com>
This commit is contained in:
@@ -947,6 +947,14 @@ static int ndpi_search_tls_tcp(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
if(alert_level == 2 /* Warning (1), Fatal (2) */)
|
||||
ndpi_set_risk(ndpi_struct, flow, NDPI_TLS_FATAL_ALERT);
|
||||
}
|
||||
|
||||
u_int16_t const alert_len = ntohs(*(u_int16_t const *)&flow->l4.tcp.tls.message.buffer[3]);
|
||||
if (flow->l4.tcp.tls.message.buffer[1] == 0x03 &&
|
||||
flow->l4.tcp.tls.message.buffer[2] <= 0x04 &&
|
||||
alert_len == (u_int32_t)flow->l4.tcp.tls.message.buffer_used - 5)
|
||||
{
|
||||
ndpi_int_tls_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_TLS);
|
||||
}
|
||||
}
|
||||
|
||||
if((len > 9)
|
||||
|
||||
Reference in New Issue
Block a user