diff options
author | Jack Lloyd <[email protected]> | 2016-12-19 00:32:51 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-12-19 00:32:51 -0500 |
commit | 4b1a1fd5ec72df31bc43c5d82311a316c60d61f6 (patch) | |
tree | 3faf085ba5270f92d1d50b09e5fd642f9041b035 /src/tests/test_rsa.cpp | |
parent | abac6ab59b363c2ac571d13496a70d98e04a5c2f (diff) |
Minor refactoring of Text_Based_Test
Turns out astyle has some bugs wrt C++11 initialize lists. Rather
than having astyle mangle all of the tests, convert to using a string
which is split once at the start instead of a vector of keys.
Diffstat (limited to 'src/tests/test_rsa.cpp')
-rw-r--r-- | src/tests/test_rsa.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/tests/test_rsa.cpp b/src/tests/test_rsa.cpp index 5feb8a14f..af37a2afb 100644 --- a/src/tests/test_rsa.cpp +++ b/src/tests/test_rsa.cpp @@ -23,8 +23,8 @@ class RSA_ES_KAT_Tests : public PK_Encryption_Decryption_Test RSA_ES_KAT_Tests() : PK_Encryption_Decryption_Test( "RSA", "pubkey/rsaes.vec", - {"E", "P", "Q", "Msg", "Ciphertext"}, - {"Padding", "Nonce"}) + "E,P,Q,Msg,Ciphertext", + "Padding,Nonce") {} std::unique_ptr<Botan::Private_Key> load_private_key(const VarMap& vars) override @@ -41,8 +41,10 @@ class RSA_ES_KAT_Tests : public PK_Encryption_Decryption_Test class RSA_KEM_Tests : public PK_KEM_Test { public: - RSA_KEM_Tests() : PK_KEM_Test("RSA", "pubkey/rsa_kem.vec", - {"E", "P", "Q", "R", "C0", "KDF", "OutLen", "K"}) + RSA_KEM_Tests() : PK_KEM_Test( + "RSA", + "pubkey/rsa_kem.vec", + "E,P,Q,R,C0,KDF,OutLen,K") {} std::unique_ptr<Botan::Private_Key> load_private_key(const VarMap& vars) override @@ -63,8 +65,8 @@ class RSA_Signature_KAT_Tests : public PK_Signature_Generation_Test RSA_Signature_KAT_Tests() : PK_Signature_Generation_Test( "RSA", "pubkey/rsa_sig.vec", - {"E", "P", "Q", "Msg", "Signature"}, - {"Padding", "Nonce"}) + "E,P,Q,Msg,Signature", + "Padding,Nonce") {} std::string default_padding(const VarMap&) const override { return "Raw"; } @@ -86,8 +88,8 @@ class RSA_Signature_Verify_Tests : public PK_Signature_Verification_Test RSA_Signature_Verify_Tests() : PK_Signature_Verification_Test( "RSA", "pubkey/rsa_verify.vec", - {"E", "N", "Msg", "Signature"}, - {"Padding"}) + "E,N,Msg,Signature", + "Padding") {} std::string default_padding(const VarMap&) const override { return "Raw"; } |