Skip to content

Commit b5f677e

Browse files
schwabeJenkins-dev
authored andcommitted
Fix iv_ciphers_legacy unit test if TLS library does not support BF-CBC
When running the unit test with mbed TLS 3.0, the library does not support BF-CBC anymore. So we need to exclude BF-CBC from the expected result in this case. Signed-off-by: Arne Schwabe <[email protected]>
1 parent e46f663 commit b5f677e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

test/unittests/test_proto.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1325,7 +1325,15 @@ TEST(proto, iv_ciphers_legacy)
13251325
auto ivciphers = infostring.substr(infostring.find("IV_CIPHERS="));
13261326
ivciphers = ivciphers.substr(0, ivciphers.find("\n"));
13271327

1328-
std::string expectedstr{"IV_CIPHERS=none:AES-128-CBC:AES-192-CBC:AES-256-CBC:DES-CBC:DES-EDE3-CBC:BF-CBC:AES-128-GCM:AES-192-GCM:AES-256-GCM"};
1328+
1329+
1330+
std::string expectedstr{"IV_CIPHERS=none:AES-128-CBC:AES-192-CBC:AES-256-CBC:DES-CBC:DES-EDE3-CBC"};
1331+
1332+
if (SSLLib::CryptoAPI::CipherContext::is_supported(libctx, openvpn::CryptoAlgs::BF_CBC))
1333+
expectedstr += ":BF-CBC";
1334+
1335+
expectedstr += ":AES-128-GCM:AES-192-GCM:AES-256-GCM";
1336+
13291337
if (SSLLib::CryptoAPI::CipherContextAEAD::is_supported(nullptr, openvpn::CryptoAlgs::CHACHA20_POLY1305))
13301338
expectedstr += ":CHACHA20-POLY1305";
13311339

0 commit comments

Comments
 (0)