aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/test_stream.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-09-07 10:59:54 -0400
committerJack Lloyd <[email protected]>2018-09-07 10:59:54 -0400
commit854d2f1da57827dc1d4c290f850fb2b948cbe38e (patch)
treeee8c21eafc96be94fa59cc66a975f4ee1365503f /src/tests/test_stream.cpp
parentde136a9470204df923d65e0217a4d7a21ae0d7e8 (diff)
Increase minimum Blowfish key length to 64 bits
See #1673 Also, skip tests if the provider doesn't support the given key length.
Diffstat (limited to 'src/tests/test_stream.cpp')
-rw-r--r--src/tests/test_stream.cpp11
1 files changed, 11 insertions, 0 deletions
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);
/*