diff options
author | Jack Lloyd <[email protected]> | 2018-09-07 10:59:54 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2018-09-07 10:59:54 -0400 |
commit | 854d2f1da57827dc1d4c290f850fb2b948cbe38e (patch) | |
tree | ee8c21eafc96be94fa59cc66a975f4ee1365503f /src/tests/test_block.cpp | |
parent | de136a9470204df923d65e0217a4d7a21ae0d7e8 (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_block.cpp')
-rw-r--r-- | src/tests/test_block.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/tests/test_block.cpp b/src/tests/test_block.cpp index 66ef9e24b..a53ff2633 100644 --- a/src/tests/test_block.cpp +++ b/src/tests/test_block.cpp @@ -86,6 +86,17 @@ class Block_Cipher_Tests final : public Text_Based_Test cipher->encrypt(garbage); cipher->clear(); + /* + * 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); if(tweak.size() > 0) |