diff options
author | Jack Lloyd <[email protected]> | 2015-12-19 19:35:41 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2015-12-19 19:35:41 -0500 |
commit | 18239a4f552049a5a74818d60c9d09881ab8ae35 (patch) | |
tree | 9bbc72a4e621d74310e845ee7233b8de478e9676 /src/tests/test_pubkey.cpp | |
parent | a24c4cd9b26b0533464e8bd4b3016d01b84181cf (diff) |
Avoid test failures on missing algos
GH #369
Diffstat (limited to 'src/tests/test_pubkey.cpp')
-rw-r--r-- | src/tests/test_pubkey.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/tests/test_pubkey.cpp b/src/tests/test_pubkey.cpp index d2bc4e9eb..9c8b635cd 100644 --- a/src/tests/test_pubkey.cpp +++ b/src/tests/test_pubkey.cpp @@ -42,7 +42,8 @@ void check_invalid_signatures(Test::Result& result, while(bad_sig == signature) bad_sig = Test::mutate_vec(bad_sig, true); - if(!result.test_eq("incorrect signature invalid", verifier.verify_message(message, bad_sig), false)) + if(!result.test_eq("incorrect signature invalid", + verifier.verify_message(message, bad_sig), false)) { result.test_note("Accepted invalid signature " + Botan::hex_encode(bad_sig)); } @@ -103,7 +104,7 @@ PK_Signature_Generation_Test::run_one_test(const std::string&, const VarMap& var { signer.reset(new Botan::PK_Signer(*privkey, padding, Botan::IEEE_1363, sign_provider)); } - catch(Botan::Lookup_Error) + catch(...) { //result.test_note("Skipping signing with " + sign_provider); continue; @@ -130,13 +131,14 @@ PK_Signature_Generation_Test::run_one_test(const std::string&, const VarMap& var { verifier.reset(new Botan::PK_Verifier(*pubkey, padding, Botan::IEEE_1363, verify_provider)); } - catch(Botan::Lookup_Error) + catch(...) { //result.test_note("Skipping verifying with " + verify_provider); continue; } - if(!result.test_eq("generated signature valid", verifier->verify_message(message, generated_signature), true)) + if(!result.test_eq("generated signature valid", + verifier->verify_message(message, generated_signature), true)) { result.test_failure("generated signature", generated_signature); } |