Improved TLS application data detection. (#1532)

Signed-off-by: lns <matzeton@googlemail.com>
This commit is contained in:
Toni
2022-04-27 17:22:53 +02:00
committed by GitHub
parent 3ad989f6a8
commit 10161448bc
26 changed files with 138 additions and 135 deletions
+6
View File
@@ -987,6 +987,12 @@ static int ndpi_search_tls_tcp(struct ndpi_detection_module_struct *ndpi_struct,
if(block_len < 16384 /* Max TLS block size */)
ndpi_looks_like_tls(ndpi_struct, flow);
if (packet->payload[1] == 0x03 && packet->payload[2] <= 4 &&
block_len == (u_int32_t)packet->payload_packet_len - 5)
{
ndpi_int_tls_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_TLS);
}
if(flow->l4.tcp.tls.certificate_processed) {
if(flow->l4.tcp.tls.num_tls_blocks < ndpi_struct->num_tls_blocks_to_follow)
flow->l4.tcp.tls.tls_application_blocks_len[flow->l4.tcp.tls.num_tls_blocks++] =