diff options
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, |