Skip to content

Commit

Permalink
tests: add tls alpn tests
Browse files Browse the repository at this point in the history
  • Loading branch information
victorjulien committed Jun 20, 2024
1 parent ea37490 commit 9b78947
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/tls-alpn-client-log-01/test.yaml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions tests/tls-alpn-log-detect-02/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
PCAP
====

Pcap recorded by Victor Julien
Binary file added tests/tls-alpn-log-detect-02/input.pcap
Binary file not shown.
2 changes: 2 additions & 0 deletions tests/tls-alpn-log-detect-02/test.rules
Original file line number Diff line number Diff line change
@@ -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;)
27 changes: 27 additions & 0 deletions tests/tls-alpn-log-detect-02/test.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 9b78947

Please sign in to comment.