From 854d2f1da57827dc1d4c290f850fb2b948cbe38e Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Fri, 7 Sep 2018 10:59:54 -0400 Subject: Increase minimum Blowfish key length to 64 bits See #1673 Also, skip tests if the provider doesn't support the given key length. --- src/tests/test_stream.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/tests/test_stream.cpp') diff --git a/src/tests/test_stream.cpp b/src/tests/test_stream.cpp index bae94ca0f..6e3f76dc6 100644 --- a/src/tests/test_stream.cpp +++ b/src/tests/test_stream.cpp @@ -108,6 +108,17 @@ class Stream_Cipher_Tests final : public Text_Based_Test catch(Botan::Invalid_State&) {} } + /* + * Different providers may have additional restrictions on key sizes. + * Avoid testing the cipher with a key size that it does not natively support. + */ + if(!cipher->valid_keylength(key.size())) + { + result.test_note("Skipping test with provider " + provider + + " as it does not support key length " + std::to_string(key.size())); + continue; + } + cipher->set_key(key); /* -- cgit v1.2.3