xref: /freebsd/tests/sys/netipsec/tunnel/aes_gcm_256.sh (revision edf8578117e8844e02c0121147f45e4609b30680)
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-256'
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 "123456789012345678901234567890123456"
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-256'
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 "123456789012345678901234567890123456"
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