summaryrefslogtreecommitdiff
path: root/tests/unit_tests/openvpn/test_ncp.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2022-02-09 16:35:11 +0100
committerJörg Frings-Fürst <debian@jff.email>2022-02-09 16:35:11 +0100
commit9d320b2bf4b83f6e2a3c679a399b88dfe57b879e (patch)
treec2862c0ce46b80f565a18a25fa96145ef59ad0b2 /tests/unit_tests/openvpn/test_ncp.c
parent1aff45d6fdfbc63a0256a831a8f8644a84708e9f (diff)
parent8e924e2c919e6fbeae0045b67ac54b9697306d7d (diff)
Update upstream source from tag 'upstream/2.5.5'
Update to upstream version '2.5.5' with Debian dir add1ff02b39ff7fc38c6c53654ab9263533c4f27
Diffstat (limited to 'tests/unit_tests/openvpn/test_ncp.c')
-rw-r--r--tests/unit_tests/openvpn/test_ncp.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/unit_tests/openvpn/test_ncp.c b/tests/unit_tests/openvpn/test_ncp.c
index 494a028..bcafd23 100644
--- a/tests/unit_tests/openvpn/test_ncp.c
+++ b/tests/unit_tests/openvpn/test_ncp.c
@@ -49,6 +49,7 @@ test_check_ncp_ciphers_list(void **state)
{
struct gc_arena gc = gc_new();
bool have_chacha = cipher_kt_get("CHACHA20-POLY1305");
+ bool have_blowfish = cipher_kt_get("BF-CBC");
assert_string_equal(mutate_ncp_cipher_list("none", &gc), "none");
assert_string_equal(mutate_ncp_cipher_list("AES-256-GCM:none", &gc),
@@ -56,7 +57,7 @@ test_check_ncp_ciphers_list(void **state)
assert_string_equal(mutate_ncp_cipher_list(aes_ciphers, &gc), aes_ciphers);
- if (have_chacha)
+ if (have_chacha && have_blowfish)
{
assert_string_equal(mutate_ncp_cipher_list(bf_chacha, &gc), bf_chacha);
assert_string_equal(mutate_ncp_cipher_list("BF-CBC:CHACHA20-POLY1305", &gc),
@@ -89,8 +90,11 @@ test_check_ncp_ciphers_list(void **state)
assert_string_equal(mutate_ncp_cipher_list("id-aes128-GCM:id-aes256-GCM",
&gc), "AES-128-GCM:AES-256-GCM");
#else
- assert_string_equal(mutate_ncp_cipher_list("BLOWFISH-CBC",
- &gc), "BF-CBC");
+ if (have_blowfish)
+ {
+ assert_string_equal(mutate_ncp_cipher_list("BLOWFISH-CBC",
+ &gc), "BF-CBC");
+ }
#endif
gc_free(&gc);
}