forked from arkime/arkime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtls.t
21 lines (16 loc) · 887 Bytes
/
tls.t
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use Test::More tests => 14;
use Cwd;
use URI::Escape;
use MolochTest;
use strict;
my $pwd = getcwd() . "/pcap";
my $files = "(file=$pwd/openssl-ssl3.pcap||file=$pwd/openssl-tls1.pcap||file=$pwd/https3-301-get.pcap)";
countTest(3, "date=-1&expression=" . uri_escape("$files&&protocols==tls"));
# tls.version tests
countTest(1, "date=-1&expression=" . uri_escape("$files&&tls.version==SSLv3"));
countTest(0, "date=-1&expression=" . uri_escape("$files&&tls.version==sslv3"));
countTest(2, "date=-1&expression=" . uri_escape("$files&&tls.version==TLS*"));
# tls.cipher tests
countTest(2, "date=-1&expression=" . uri_escape("$files&&tls.cipher==TLS_ECDHE_RSA_WITH_RC4_128_SHA"));
countTest(3, "date=-1&expression=" . uri_escape("$files&&tls.cipher==*RC4*"));
countTest(2, "date=-1&expression=" . uri_escape("$files&&tls.cipher==tls_ECDHE_RSA_WITH_RC4_128_SHA"));