mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-23 11:16:33 +00:00
if_ovpn tests: add aes-128-gcm test case
Sponsored by: Rubicon Communications, LLC ("Netgate")
This commit is contained in:
parent
2c58d0cb3b
commit
832c8a58e1
|
@ -915,17 +915,10 @@ ra_cleanup()
|
||||||
ovpn_cleanup
|
ovpn_cleanup
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ovpn_algo_body()
|
||||||
atf_test_case "chacha" "cleanup"
|
|
||||||
chacha_head()
|
|
||||||
{
|
{
|
||||||
atf_set descr 'Test DCO with the chacha algorithm'
|
algo=$1
|
||||||
atf_set require.user root
|
|
||||||
atf_set require.progs openvpn
|
|
||||||
}
|
|
||||||
|
|
||||||
chacha_body()
|
|
||||||
{
|
|
||||||
ovpn_init
|
ovpn_init
|
||||||
|
|
||||||
l=$(vnet_mkepair)
|
l=$(vnet_mkepair)
|
||||||
|
@ -943,8 +936,8 @@ chacha_body()
|
||||||
dev-type tun
|
dev-type tun
|
||||||
proto udp4
|
proto udp4
|
||||||
|
|
||||||
cipher CHACHA20-POLY1305
|
cipher ${algo}
|
||||||
data-ciphers CHACHA20-POLY1305
|
data-ciphers ${algo}
|
||||||
auth SHA256
|
auth SHA256
|
||||||
|
|
||||||
local 192.0.2.1
|
local 192.0.2.1
|
||||||
|
@ -967,6 +960,9 @@ chacha_body()
|
||||||
|
|
||||||
client
|
client
|
||||||
|
|
||||||
|
cipher ${algo}
|
||||||
|
data-ciphers ${algo}
|
||||||
|
|
||||||
remote 192.0.2.1
|
remote 192.0.2.1
|
||||||
auth-user-pass $(atf_get_srcdir)/user.pass
|
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_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()
|
chacha_cleanup()
|
||||||
{
|
{
|
||||||
ovpn_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_init_test_cases()
|
||||||
{
|
{
|
||||||
atf_add_test_case "4in4"
|
atf_add_test_case "4in4"
|
||||||
|
@ -1002,4 +1029,5 @@ atf_init_test_cases()
|
||||||
atf_add_test_case "route_to"
|
atf_add_test_case "route_to"
|
||||||
atf_add_test_case "ra"
|
atf_add_test_case "ra"
|
||||||
atf_add_test_case "chacha"
|
atf_add_test_case "chacha"
|
||||||
|
atf_add_test_case "gcm_128"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue