xref: /freebsd/tests/sys/netipsec/tunnel/aesni_aes_gcm_256.sh (revision a0409676120c1e558d0ade943019934e0f15118d)
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 and AESNI'
9	atf_set require.user root
10}
11
12v4_body()
13{
14	# load AESNI module if not already
15	kldstat -q -n aesni || kldload 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 and AESNI'
29	atf_set require.user root
30}
31
32v6_body()
33{
34	# load AESNI module if not already
35	kldstat -q -n aesni || kldload 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