]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Pull request #3971: http2_inspect: test tool config changes
authorMaya Dagon (mdagon) <mdagon@cisco.com>
Fri, 25 Aug 2023 12:30:01 +0000 (12:30 +0000)
committerOleksii Shumeiko -X (oshumeik - SOFTSERVE INC at Cisco) <oshumeik@cisco.com>
Fri, 25 Aug 2023 12:30:01 +0000 (12:30 +0000)
Merge in SNORT/snort3 from ~MDAGON/snort3:fix_test to master

Squashed commit of the following:

commit 17143f2739a892c03d085a7451e4518a11fc6c16
Author: maya dagon <mdagon@cisco.com>
Date:   Mon Aug 21 09:29:42 2023 -0400

    http2_inspect: update test tool configurations

src/service_inspectors/http2_inspect/http2_inspect.cc
src/service_inspectors/http2_inspect/http2_module.cc
src/service_inspectors/http2_inspect/http2_module.h
src/service_inspectors/http_inspect/http_inspect.cc

index 9931a2d6523f2f1c5b409974651842e9a2f466d4..01443ce1e9784ed15141588841a732e518abdc09 100644 (file)
@@ -53,13 +53,6 @@ Http2Inspect::Http2Inspect(const Http2ParaList* params_) : params(params_)
     {
         HttpTestManager::activate_test_output(HttpTestManager::IN_HTTP2);
     }
-    if ((params->test_input) || (params->test_output))
-    {
-        HttpTestManager::set_print_amount(params->print_amount);
-        HttpTestManager::set_print_hex(params->print_hex);
-        HttpTestManager::set_show_pegs(params->show_pegs);
-        HttpTestManager::set_show_scan(params->show_scan);
-    }
 #endif
 }
 
index 8e5cebf733a591bb8db2c1607648ed2a1b90717d..cd8ed6f07f2b9613e9a1e99c21f146897f51d9f3 100644 (file)
@@ -36,18 +36,6 @@ const Parameter Http2Module::http2_params[] =
 
     { "test_output", Parameter::PT_BOOL, nullptr, "false",
       "print out HTTP section data" },
-
-    { "print_amount", Parameter::PT_INT, "1:max53", "1200",
-      "number of characters to print from a Field" },
-
-    { "print_hex", Parameter::PT_BOOL, nullptr, "false",
-      "nonprinting characters printed in [HH] format instead of using an asterisk" },
-
-    { "show_pegs", Parameter::PT_BOOL, nullptr, "true",
-      "display peg counts with test output" },
-
-    { "show_scan", Parameter::PT_BOOL, nullptr, "false",
-      "display scanned segments" },
 #endif
 
     { nullptr, Parameter::PT_MAX, nullptr, nullptr, nullptr }
@@ -82,22 +70,6 @@ bool Http2Module::set(const char*, Value& val, SnortConfig*)
     {
         params->test_output = val.get_bool();
     }
-    else if (val.is("print_amount"))
-    {
-        params->print_amount = val.get_int64();
-    }
-    else if (val.is("print_hex"))
-    {
-        params->print_hex = val.get_bool();
-    }
-    else if (val.is("show_pegs"))
-    {
-        params->show_pegs = val.get_bool();
-    }
-    else if (val.is("show_scan"))
-    {
-        params->show_scan = val.get_bool();
-    }
 #endif
     return true;
 }
index 4d63e268168ca8a14609fe02c009b060a919cdcd..c0f7bb62e40cb3003c1d852fd6e0af682ec8387d 100644 (file)
@@ -36,13 +36,9 @@ struct Http2ParaList
 public:
     uint32_t concurrent_streams_limit;
 #ifdef REG_TEST
-    int64_t print_amount;
 
     bool test_input;
     bool test_output;
-    bool print_hex;
-    bool show_pegs;
-    bool show_scan;
 #endif
 };
 
index 4517a39e927821cc8749e237b045d6ef47438e9e..56262fc3a7e49b55e6328d99c83ebbfeb32c28e3 100755 (executable)
@@ -117,13 +117,12 @@ HttpInspect::HttpInspect(const HttpParaList* params_) :
     {
         HttpTestManager::activate_test_output(HttpTestManager::IN_HTTP);
     }
-    if ((params->test_input) || (params->test_output))
-    {
-        HttpTestManager::set_print_amount(params->print_amount);
-        HttpTestManager::set_print_hex(params->print_hex);
-        HttpTestManager::set_show_pegs(params->show_pegs);
-        HttpTestManager::set_show_scan(params->show_scan);
-    }
+
+    HttpTestManager::set_print_amount(params->print_amount);
+    HttpTestManager::set_print_hex(params->print_hex);
+    HttpTestManager::set_show_pegs(params->show_pegs);
+    HttpTestManager::set_show_scan(params->show_scan);
+
 #endif
 
     if (params->script_detection)