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