xref: /freebsd/tests/sys/netipsec/tunnel/aes_gcm_128.sh (revision cfd6422a5217410fbd66f7a7a8a64d9d85e61229)
1# $FreeBSD$
2
3. $(atf_get_srcdir)/utils.subr
4
5atf_test_case "v4" "cleanup"
6v4_head()
7{
8	atf_set descr 'IPSec inet4 tunnel using aes-gcm-128'
9	atf_set require.user root
10}
11
12v4_body()
13{
14	# Unload AESNI module if loaded
15	kldstat -q -n aesni && kldunload aesni
16
17	ist_test 4 aes-gcm-16 "12345678901234567890"
18}
19
20v4_cleanup()
21{
22	ist_cleanup
23}
24
25atf_test_case "v6" "cleanup"
26v6_head()
27{
28	atf_set descr 'IPSec inet6 tunnel using aes-gcm-128'
29	atf_set require.user root
30}
31
32v6_body()
33{
34	# Unload AESNI module if loaded
35	kldstat -q -n aesni && kldunload aesni
36
37	ist_test 6 aes-gcm-16 "12345678901234567890"
38}
39
40v6_cleanup()
41{
42	ist_cleanup
43}
44
45atf_init_test_cases()
46{
47	atf_add_test_case "v4"
48	atf_add_test_case "v6"
49}
50