diff options
author | Luca Deri <deri@ntop.org> | 2020-07-30 18:30:07 +0200 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2020-07-30 18:30:07 +0200 |
commit | 2ae4c6675d09ddab333f8217774c3df363205113 (patch) | |
tree | e9a71b11cca43bb94b459cce8437a699636324b9 /src | |
parent | e71df49b3e3c7cf57c581b1fb6ba0cebc46ee381 (diff) |
Fixed partial TLS dissection
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/protocols/tls.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/protocols/tls.c b/src/lib/protocols/tls.c index 20d4996df..b79b92d4a 100644 --- a/src/lib/protocols/tls.c +++ b/src/lib/protocols/tls.c @@ -592,7 +592,8 @@ int processCertificate(struct ndpi_detection_module_struct *ndpi_struct, certificates_offset += certificate_len; } - if(flow->l4.tcp.tls.num_tls_blocks >= ndpi_struct->num_tls_blocks_to_follow) { + if(( ndpi_struct->num_tls_blocks_to_follow != 0) + && (flow->l4.tcp.tls.num_tls_blocks >= ndpi_struct->num_tls_blocks_to_follow)) { #ifdef DEBUG_TLS_BLOCKS printf("*** [TLS Block] Enough blocks dissected\n"); #endif @@ -744,7 +745,8 @@ static int ndpi_search_tls_tcp(struct ndpi_detection_module_struct *ndpi_struct, } if(something_went_wrong - || (flow->l4.tcp.tls.num_tls_blocks == ndpi_struct->num_tls_blocks_to_follow) + || ((ndpi_struct->num_tls_blocks_to_follow > 0) + && (flow->l4.tcp.tls.num_tls_blocks == ndpi_struct->num_tls_blocks_to_follow)) ) { #ifdef DEBUG_TLS_BLOCKS printf("*** [TLS Block] No more blocks\n"); |