From: Max Fillinger Date: Wed, 8 Dec 2021 13:46:55 +0000 (+0100) Subject: Don't use BF-CBC in unit tests if we don't have it X-Git-Tag: v2.5.5~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=57820e8bb1eca8e9e08df003204b8da76379b714;p=thirdparty%2Fopenvpn.git Don't use BF-CBC in unit tests if we don't have it Signed-off-by: Max Fillinger Acked-by: Gert Doering Message-Id: <20211208134655.28905-1-maximilian.fillinger@foxcrypto.com> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg23354.html Signed-off-by: Gert Doering (cherry picked from commit 0e075c0e1b7b1d55a837d98b7a6c2bc8c7d65375) --- diff --git a/tests/unit_tests/openvpn/test_ncp.c b/tests/unit_tests/openvpn/test_ncp.c index 494a02846..8da76c03e 100644 --- a/tests/unit_tests/openvpn/test_ncp.c +++ b/tests/unit_tests/openvpn/test_ncp.c @@ -89,8 +89,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); }