aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/test_rsa.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-03-29 11:16:24 -0400
committerJack Lloyd <[email protected]>2017-03-29 11:16:24 -0400
commit8eacc25b3617195ba901404768fdc6e72fe3ed46 (patch)
treea980b5f920efbb5067244501f94e70853716b342 /src/tests/test_rsa.cpp
parent8d4d05a593a88eaaa1946560da308627c1bffe3e (diff)
Fix final RSA blinding test
See GH #879
Diffstat (limited to 'src/tests/test_rsa.cpp')
-rw-r--r--src/tests/test_rsa.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/tests/test_rsa.cpp b/src/tests/test_rsa.cpp
index e3ac2f608..b22b8d044 100644
--- a/src/tests/test_rsa.cpp
+++ b/src/tests/test_rsa.cpp
@@ -199,14 +199,15 @@ class RSA_Blinding_Tests : public Test
std::vector<uint8_t> plaintext = Botan::unlock(decryptor.decrypt(ciphertext));
plaintext.insert(plaintext.begin(), input.size() - 1, 0);
- // assert RNG is not called in this situation
- result.test_eq("Successfull decryption", plaintext, input);
+ result.test_eq("Successful decryption", plaintext, input);
}
// one more decryption should trigger a blinder reinitialization
- result.test_throws("", [&decryptor,&encryptor]()
+ result.test_throws("RSA blinding reinit",
+ "Test error Fixed output RNG ran out of bytes, test bug?",
+ [&decryptor,&encryptor]()
{
- std::vector<uint8_t> ciphertext = encryptor.encrypt(std::vector<uint8_t>(16), Test::rng());
+ std::vector<uint8_t> ciphertext = encryptor.encrypt(std::vector<uint8_t>(16, 5), Test::rng());
decryptor.decrypt(ciphertext);
});