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