aboutsummaryrefslogtreecommitdiff
path: root/tests/sys
diff options
context:
space:
mode:
authorKristof Provost <kp@FreeBSD.org>2022-11-11 09:42:02 +0000
committerKristof Provost <kp@FreeBSD.org>2022-11-11 10:17:39 +0000
commit832c8a58e1f748a1e47b49fa510bfc52097268ed (patch)
treed6c52915eb9030cf570168dfce2f24eeed36aa55 /tests/sys
parent2c58d0cb3bb3e3a5b714ffac940500efbe5303ca (diff)
downloadsrc-832c8a58e1f748a1e47b49fa510bfc52097268ed.tar.gz
src-832c8a58e1f748a1e47b49fa510bfc52097268ed.zip
if_ovpn tests: add aes-128-gcm test case
Sponsored by: Rubicon Communications, LLC ("Netgate")
Diffstat (limited to 'tests/sys')
-rw-r--r--tests/sys/net/if_ovpn/if_ovpn.sh50
1 files changed, 39 insertions, 11 deletions
diff --git a/tests/sys/net/if_ovpn/if_ovpn.sh b/tests/sys/net/if_ovpn/if_ovpn.sh
index 8953e7122a57..51d21b826e72 100644
--- a/tests/sys/net/if_ovpn/if_ovpn.sh
+++ b/tests/sys/net/if_ovpn/if_ovpn.sh
@@ -915,17 +915,10 @@ ra_cleanup()
ovpn_cleanup
}
-
-atf_test_case "chacha" "cleanup"
-chacha_head()
+ovpn_algo_body()
{
- atf_set descr 'Test DCO with the chacha algorithm'
- atf_set require.user root
- atf_set require.progs openvpn
-}
+ algo=$1
-chacha_body()
-{
ovpn_init
l=$(vnet_mkepair)
@@ -943,8 +936,8 @@ chacha_body()
dev-type tun
proto udp4
- cipher CHACHA20-POLY1305
- data-ciphers CHACHA20-POLY1305
+ cipher ${algo}
+ data-ciphers ${algo}
auth SHA256
local 192.0.2.1
@@ -967,6 +960,9 @@ chacha_body()
client
+ cipher ${algo}
+ data-ciphers ${algo}
+
remote 192.0.2.1
auth-user-pass $(atf_get_srcdir)/user.pass
@@ -984,11 +980,42 @@ chacha_body()
atf_check -s exit:0 -o ignore jexec b ping -c 3 198.51.100.1
}
+atf_test_case "chacha" "cleanup"
+chacha_head()
+{
+ atf_set descr 'Test DCO with the chacha algorithm'
+ atf_set require.user root
+ atf_set require.progs openvpn
+}
+
+chacha_body()
+{
+ ovpn_algo_body CHACHA20-POLY1305
+}
+
chacha_cleanup()
{
ovpn_cleanup
}
+atf_test_case "gcm_128" "cleanup"
+gcm_128_head()
+{
+ atf_set descr 'Test DCO with AES-128-GCM'
+ atf_set require.user root
+ atf_set require.progs openvpn
+}
+
+gcm_128_body()
+{
+ ovpn_algo_body AES-128-GCM
+}
+
+gcm_128_cleanup()
+{
+ ovpn_cleanup
+}
+
atf_init_test_cases()
{
atf_add_test_case "4in4"
@@ -1002,4 +1029,5 @@ atf_init_test_cases()
atf_add_test_case "route_to"
atf_add_test_case "ra"
atf_add_test_case "chacha"
+ atf_add_test_case "gcm_128"
}