diff options
author | Luca Deri <deri@ntop.org> | 2019-10-22 00:57:35 +0200 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2019-10-22 00:57:35 +0200 |
commit | 0ffe5cf1ff7ab2ec90b5674936aa0f2555e3d414 (patch) | |
tree | e08bce3ecddf67ec7f4a3f7abb282b7413402ee0 /src/lib/protocols/tls.c | |
parent | d023f9bf2df8b0c548acf37bd8e9c1a842054cdf (diff) |
Added extra processing for POP and SMTP
Diffstat (limited to 'src/lib/protocols/tls.c')
-rw-r--r-- | src/lib/protocols/tls.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/lib/protocols/tls.c b/src/lib/protocols/tls.c index a849fba46..cce5e0471 100644 --- a/src/lib/protocols/tls.c +++ b/src/lib/protocols/tls.c @@ -1070,14 +1070,12 @@ int sslTryAndRetrieveServerCertificate(struct ndpi_detection_module_struct *ndpi /* **************************************** */ -void sslInitExtraPacketProcessing(int caseNum, struct ndpi_flow_struct *flow) { +static void sslInitExtraPacketProcessing(struct ndpi_flow_struct *flow) { flow->check_extra_packets = 1; - /* 0 is the case for waiting for the server certificate */ - if(caseNum == 0) { - /* At most 7 packets should almost always be enough to find the server certificate if it's there */ - flow->max_extra_packets_to_check = 7; - flow->extra_packets_func = sslTryAndRetrieveServerCertificate; - } + + /* At most 7 packets should almost always be enough to find the server certificate if it's there */ + flow->max_extra_packets_to_check = 7; + flow->extra_packets_func = sslTryAndRetrieveServerCertificate; } /* **************************************** */ @@ -1120,7 +1118,7 @@ int tlsDetectProtocolFromCertificate(struct ndpi_detection_module_struct *ndpi_s * a few more packets. */ if(((flow->l4.tcp.tls_seen_client_cert == 1) && (flow->protos.stun_ssl.ssl.client_certificate[0] != '\0')) && ((flow->l4.tcp.tls_seen_server_cert != 1) && (flow->protos.stun_ssl.ssl.server_certificate[0] == '\0'))) { - sslInitExtraPacketProcessing(0, flow); + sslInitExtraPacketProcessing(flow); } ndpi_set_detected_protocol(ndpi_struct, flow, subproto, |