diff options
author | Luca <deri@ntop.org> | 2019-08-08 18:09:12 +0200 |
---|---|---|
committer | Luca <deri@ntop.org> | 2019-08-08 18:09:12 +0200 |
commit | c6e832be1808160065491b7845ec25ed061f7f0b (patch) | |
tree | f3fa15bc9c9d1091c3b076df5148b87db8eab076 /src/lib/protocols/tor.c | |
parent | cce8a6026fab8d62e8e2cf484ed14531b1dc248b (diff) |
Various TLS/STUN improvememnts
Diffstat (limited to 'src/lib/protocols/tor.c')
-rw-r--r-- | src/lib/protocols/tor.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/protocols/tor.c b/src/lib/protocols/tor.c index fb8d1bd2c..3b2dd06c4 100644 --- a/src/lib/protocols/tor.c +++ b/src/lib/protocols/tor.c @@ -22,8 +22,8 @@ int ndpi_is_tls_tor(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow, char *certificate) { int prev_num = 0, numbers_found = 0, num_found = 0, i, len, num_impossible = 0; char dummy[48], *dot, *name; - - if(certificate == NULL) + + if((certificate == NULL) || (certificate[0] == '\0')) return(0); else len = strlen(certificate); @@ -99,7 +99,8 @@ void ndpi_search_tor(struct ndpi_detection_module_struct *ndpi_struct, struct nd NDPI_LOG_DBG(ndpi_struct, "search for TOR\n"); - if(packet->tcp != NULL) { + if((packet->tcp != NULL) + && (!packet->ssl_certificate_detected)) { u_int16_t dport, sport; sport = ntohs(packet->tcp->source), dport = ntohs(packet->tcp->dest); |