From: Victor Julien Date: Fri, 31 May 2024 13:14:29 +0000 (+0200) Subject: tests: add tls alpn tests X-Git-Tag: suricata-6.0.20~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1927%2Fhead;p=thirdparty%2Fsuricata-verify.git tests: add tls alpn tests --- diff --git a/tests/tls-alpn-client-log-01/test.yaml b/tests/tls-alpn-client-log-01/test.yaml new file mode 100644 index 000000000..65ddb5802 --- /dev/null +++ b/tests/tls-alpn-client-log-01/test.yaml @@ -0,0 +1,15 @@ +requires: + min-version: 8.0.0 + +args: + - -k none + +pcap: ../ja4-tls-quic/input.pcap + +checks: + - filter: + count: 1 + match: + event_type: tls + tls.client_alpns[0]: h2 + tls.client_alpns[1]: http/1.1 diff --git a/tests/tls-alpn-log-detect-02/README.md b/tests/tls-alpn-log-detect-02/README.md new file mode 100644 index 000000000..349507634 --- /dev/null +++ b/tests/tls-alpn-log-detect-02/README.md @@ -0,0 +1,4 @@ +PCAP +==== + +Pcap recorded by Victor Julien diff --git a/tests/tls-alpn-log-detect-02/input.pcap b/tests/tls-alpn-log-detect-02/input.pcap new file mode 100644 index 000000000..f08296a32 Binary files /dev/null and b/tests/tls-alpn-log-detect-02/input.pcap differ diff --git a/tests/tls-alpn-log-detect-02/test.rules b/tests/tls-alpn-log-detect-02/test.rules new file mode 100644 index 000000000..dc1994b75 --- /dev/null +++ b/tests/tls-alpn-log-detect-02/test.rules @@ -0,0 +1,2 @@ +alert tls any any -> any any (tls.sni; content:"icloud"; tls.alpn; content:"http/1.1"; sid:1;) +alert tls any any -> any any (tls.subjectaltname; content:"p142-contacts.icloud.com"; tls.alpn; content:"http/1.1"; sid:2;) diff --git a/tests/tls-alpn-log-detect-02/test.yaml b/tests/tls-alpn-log-detect-02/test.yaml new file mode 100644 index 000000000..deb1be80e --- /dev/null +++ b/tests/tls-alpn-log-detect-02/test.yaml @@ -0,0 +1,27 @@ +requires: + min-version: 8.0.0 + +checks: + - filter: + count: 1 + match: + event_type: tls + tls.client_alpns[0]: h2 + tls.client_alpns[1]: http/1.1 + tls.server_alpns[0]: http/1.1 + - filter: + count: 1 + match: + event_type: alert + alert.signature_id: 1 + tls.client_alpns[0]: h2 + tls.client_alpns[1]: http/1.1 + tls.server_alpns[0]: http/1.1 + - filter: + count: 1 + match: + event_type: alert + alert.signature_id: 2 + tls.client_alpns[0]: h2 + tls.client_alpns[1]: http/1.1 + tls.server_alpns[0]: http/1.1