Skip to contentSkip to conversation

Don't use BF-CBC in unit tests if we don't have it

PATCH In review Max Fillinger 2 participants 2 messages Dec 8, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Don't use BF-CBC in unit tests if we don't have it

---
 tests/unit_tests/openvpn/test_ncp.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
tests/unit_tests/openvpn/test_ncp.c +5 -2
index 6702133a..f4c28ffd 100644
@@ -120,8 +120,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);
 }
Signature · 1 line
2.11.0
Acked-by on v1 1/1
#1 lore raw

I do not have a "non blowfish" mbedtls to test with, but the fix is "obviously correct", as discussed on IRC.

Your patch has been applied to the master + release/2.5 branch (bugfix).

commit 0e075c0e1b7b1d55a837d98b7a6c2bc8c7d65375 (master) commit 57820e8bb1eca8e9e08df003204b8da76379b714 (release/2.5)

Author: Max Fillinger
Date:   Wed Dec 8 14:46:55 2021 +0100
     Don't use BF-CBC in unit tests if we don't have it

     Signed-off-by: Max Fillinger <[email protected]...>
     Acked-by: Gert Doering <[email protected]...>
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg23354.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering