Skip to content

Commit 2780eb9

Browse files
schwabeJenkins-dev
authored andcommitted
Spell none cipher with lowercase
OpenVPN uses a idiosyncrasy that all ciphers are uppercase but none is spelt lowercase and excepts this idiosyncrasy also in IV_CIPHERS Signed-off-by: Arne Schwabe <[email protected]>
1 parent e34094e commit 2780eb9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

openvpn/crypto/cryptoalgs.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ class Alg
189189

190190
inline std::array<Alg, Type::SIZE> algs = {
191191
// clang-format off
192-
Alg{"NONE", F_CIPHER|F_DIGEST|CBC_HMAC, 0, 0, 0 },
192+
Alg{"none", F_CIPHER|F_DIGEST|CBC_HMAC, 0, 0, 0 },
193193
Alg{"AES-128-CBC", F_CIPHER|CBC_HMAC, 16, 16, 16 },
194194
Alg{"AES-192-CBC", F_CIPHER|CBC_HMAC, 24, 16, 16 },
195195
Alg{"AES-256-CBC", F_CIPHER|CBC_HMAC, 32, 16, 16 },

test/unittests/test_proto.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1321,7 +1321,7 @@ TEST(proto, iv_ciphers_legacy)
13211321
auto ivciphers = infostring.substr(infostring.find("IV_CIPHERS="));
13221322
ivciphers = ivciphers.substr(0, ivciphers.find("\n"));
13231323

1324-
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"};
1324+
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"};
13251325
if (SSLLib::CryptoAPI::CipherContextAEAD::is_supported(nullptr, openvpn::CryptoAlgs::CHACHA20_POLY1305))
13261326
expectedstr += ":CHACHA20-POLY1305";
13271327

0 commit comments

Comments
 (0)