aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/stream
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2015-11-11 05:43:01 -0500
committerJack Lloyd <[email protected]>2015-11-11 05:43:01 -0500
commitcf05aea092fad448c2f4a8e8b66159237096ba8e (patch)
tree00631bcc84809a1eeac5dd32dd92c62143ef831b /src/lib/stream
parent6bb38ae2fa0e1be46b3a3256ac03f435b16a57ea (diff)
Update and consolidate the test framework.
The tests previously had used 4 to 6 different schemes internally (the vec file reader framework, Catch, the old InSiTo Boost.Test tests, the PK/BigInt tests which escaped the rewrite in 1.11.7, plus a number of one-offs). Converge on a design that works everywhere, and update all the things. Fix also a few bugs found by the test changes: SHA-512-256 name incorrect, OpenSSL RC4 name incorrect, signature of FFI function botan_pubkey_destroy was wrong.
Diffstat (limited to 'src/lib/stream')
-rw-r--r--src/lib/stream/rc4/openssl_rc4.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/lib/stream/rc4/openssl_rc4.cpp b/src/lib/stream/rc4/openssl_rc4.cpp
index e4f180a9b..84d739c91 100644
--- a/src/lib/stream/rc4/openssl_rc4.cpp
+++ b/src/lib/stream/rc4/openssl_rc4.cpp
@@ -23,7 +23,19 @@ class OpenSSL_RC4 : public StreamCipher
public:
void clear() { clear_mem(&m_rc4, 1); }
- std::string name() const { return "RC4"; }
+ std::string name() const
+ {
+ switch(m_skip)
+ {
+ case 0:
+ return "RC4";
+ case 256:
+ return "MARK-4";
+ default:
+ return "RC4_skip(" + std::to_string(m_skip) + ")";
+ }
+ }
+
StreamCipher* clone() const { return new OpenSSL_RC4; }
Key_Length_Specification key_spec() const