]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
http2: add test for frames
authorPhilippe Antoine <pantoine@oisf.net>
Wed, 14 Aug 2024 14:25:17 +0000 (16:25 +0200)
committerVictor Julien <victor@inliniac.net>
Wed, 11 Sep 2024 07:53:02 +0000 (09:53 +0200)
Ticket: 5743

tests/http2-frames/README.md [new file with mode: 0644]
tests/http2-frames/test.rules [new file with mode: 0644]
tests/http2-frames/test.yaml [new file with mode: 0644]

diff --git a/tests/http2-frames/README.md b/tests/http2-frames/README.md
new file mode 100644 (file)
index 0000000..2e9836c
--- /dev/null
@@ -0,0 +1,9 @@
+# Description
+
+Test HTTP2 frames
+
+https://redmine.openinfosecfoundation.org/issues/5743
+
+# PCAP
+
+The pcap is reused from another test
diff --git a/tests/http2-frames/test.rules b/tests/http2-frames/test.rules
new file mode 100644 (file)
index 0000000..47b1f41
--- /dev/null
@@ -0,0 +1 @@
+alert http2 any any -> any any (frame:http2.hdr; content:"|00 00 04 08 00|"; flow:to_server; sid:1;)
diff --git a/tests/http2-frames/test.yaml b/tests/http2-frames/test.yaml
new file mode 100644 (file)
index 0000000..4e83592
--- /dev/null
@@ -0,0 +1,16 @@
+requires:
+  min-version: 8
+
+# disables checksum verification
+args:
+  - -k none --set stream.midstream=true
+
+pcap:  ../http2-keywords2/input.pcap
+
+checks:
+# checks for http.uri keyword : 1 for HTTP1, 1 for mimicked HTTP2 response, so 2 for whole HTTP
+  - filter:
+      count: 1
+      match:
+        event_type: alert
+        alert.signature_id: 1