diff options
Diffstat (limited to 'src/tests/test_modes.cpp')
-rw-r--r-- | src/tests/test_modes.cpp | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/src/tests/test_modes.cpp b/src/tests/test_modes.cpp index 81a15445e..f443ddabf 100644 --- a/src/tests/test_modes.cpp +++ b/src/tests/test_modes.cpp @@ -8,11 +8,8 @@ #if defined(BOTAN_HAS_MODES) -#if defined(BOTAN_HAS_FILTERS) - #include <botan/hex.h> #include <botan/cipher_mode.h> -#include <botan/filters.h> #include <iostream> #include <fstream> #include <memory> @@ -27,21 +24,16 @@ secure_vector<byte> run_mode(const std::string& algo, const secure_vector<byte>& nonce, const secure_vector<byte>& key) { -#if 0 std::unique_ptr<Cipher_Mode> cipher(get_cipher_mode(algo, dir)); + if(!cipher) + throw std::runtime_error("No cipher " + algo + " enabled in build"); cipher->set_key(key); cipher->start(nonce); secure_vector<byte> ct = pt; cipher->finish(ct); -#else - Pipe pipe(get_cipher(algo, SymmetricKey(key), InitializationVector(nonce), dir)); - - pipe.process_msg(pt); - - return pipe.read_all(); -#endif + return ct; } size_t mode_test(const std::string& algo, @@ -102,12 +94,6 @@ size_t test_modes() #else -UNTESTED_WARNING(modes); - -#endif // BOTAN_HAS_FILTERS - -#else - SKIP_TEST(modes); #endif // BOTAN_HAS_MODES |