From 18239a4f552049a5a74818d60c9d09881ab8ae35 Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Sat, 19 Dec 2015 19:35:41 -0500 Subject: Avoid test failures on missing algos GH #369 --- src/tests/test_pubkey.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/tests/test_pubkey.cpp') 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); } -- cgit v1.2.3