aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/test_modes.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2015-10-14 16:32:17 -0400
committerJack Lloyd <[email protected]>2015-10-14 16:32:17 -0400
commit39052451400dd9beb12c350d87c2d48ff476210e (patch)
tree0b0a87bcaf47c70e48df39808cd70c549d71668f /src/tests/test_modes.cpp
parentaad256035d4ecb9c4e87a7698f74f6f3178da0e2 (diff)
Move DataSource to utils and rewrite PEM encoding to avoid filters
Removes filters as as an internal dependency pretty much entirely (outside of some dusty corners in misc).
Diffstat (limited to 'src/tests/test_modes.cpp')
-rw-r--r--src/tests/test_modes.cpp20
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