From 3e5491fa109fccfb28cd170d7a1dc3e55e7531e8 Mon Sep 17 00:00:00 2001 From: Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> Date: Thu, 11 Nov 2021 12:36:55 +0100 Subject: Add detection of OCSP (#1370) This protocol is detected via HTTP Content-Type header. Until 89d548f9, nDPI had a dedicated automa (`content_automa`) to classify a HTTP flow according to this header. Since then, this automa has been useless because it is always empty. Re-enable it to match only a string seems overkilling. Remove all `content_automa` leftovers. --- example/ndpiReader.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'example') diff --git a/example/ndpiReader.c b/example/ndpiReader.c index d421e45dd..446d51a90 100644 --- a/example/ndpiReader.c +++ b/example/ndpiReader.c @@ -285,7 +285,6 @@ void ndpiCheckHostStringMatch(char *testChar) { ndpi_protocol_match_result match = { NDPI_PROTOCOL_UNKNOWN, NDPI_PROTOCOL_CATEGORY_UNSPECIFIED, NDPI_PROTOCOL_UNRATED }; int testRes; - u_int8_t is_host_match = 1; char appBufStr[64]; ndpi_protocol detected_protocol; struct ndpi_detection_module_struct *ndpi_str; @@ -302,8 +301,7 @@ void ndpiCheckHostStringMatch(char *testChar) { // ac_automata_display( module->host_automa.ac_automa, 'n'); testRes = ndpi_match_string_subprotocol(ndpi_str, - testChar, strlen(testChar), &match, - is_host_match); + testChar, strlen(testChar), &match); if(testRes) { memset( &detected_protocol, 0, sizeof(ndpi_protocol) ); -- cgit v1.2.3