[Openvpn-devel,2.5] Define have_blowfish variable in ncp unit tests

Message ID 20211208144101.19166-1-maximilian.fillinger@foxcrypto.com
State Accepted
Headers show
Series [Openvpn-devel,2.5] Define have_blowfish variable in ncp unit tests | expand

Commit Message

Maximilian Fillinger Dec. 8, 2021, 3:41 a.m. UTC
The previous commit was backported from master and needs this variable
to exist.

Signed-off-by: Max Fillinger <maximilian.fillinger@foxcrypto.com>
---
 tests/unit_tests/openvpn/test_ncp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Gert Doering Dec. 8, 2021, 4:22 a.m. UTC | #1
Acked-by: Gert Doering <gert@greenie.muc.de>

Thanks for quickly fixing my oversight :-) - and yes, *this* time, I
have actually tested the resulting build.  Both with openssl and mbed.

Your patch has been applied to the release/2.5 branch.

commit 39f50f58b73333b73502a593c4beda3af947bcac (release/2.5)
Author: Max Fillinger
Date:   Wed Dec 8 15:41:01 2021 +0100

     Define have_blowfish variable in ncp unit tests

     Signed-off-by: Max Fillinger <maximilian.fillinger@foxcrypto.com>
     Acked-by: Gert Doering <gert@greenie.muc.de>
     Message-Id: <20211208144101.19166-1-maximilian.fillinger@foxcrypto.com>
     URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg23356.html
     Signed-off-by: Gert Doering <gert@greenie.muc.de>


--
kind regards,

Gert Doering

Patch

diff --git a/tests/unit_tests/openvpn/test_ncp.c b/tests/unit_tests/openvpn/test_ncp.c
index 8da76c03..bcafd232 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),