aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2015-12-19 19:35:41 -0500
committerJack Lloyd <[email protected]>2015-12-19 19:35:41 -0500
commit18239a4f552049a5a74818d60c9d09881ab8ae35 (patch)
tree9bbc72a4e621d74310e845ee7233b8de478e9676
parenta24c4cd9b26b0533464e8bd4b3016d01b84181cf (diff)
Avoid test failures on missing algos
GH #369
-rw-r--r--src/tests/test_pbkdf.cpp2
-rw-r--r--src/tests/test_pubkey.cpp10
2 files changed, 7 insertions, 5 deletions
diff --git a/src/tests/test_pbkdf.cpp b/src/tests/test_pbkdf.cpp
index 2e3b26d48..0e5d9fe68 100644
--- a/src/tests/test_pbkdf.cpp
+++ b/src/tests/test_pbkdf.cpp
@@ -25,7 +25,7 @@ class PBKDF_KAT_Tests : public Text_Based_Test
Test::Result run_one_test(const std::string& pbkdf_name, const VarMap& vars)
{
Test::Result result(pbkdf_name);
- std::unique_ptr<Botan::PBKDF> pbkdf(Botan::get_pbkdf(pbkdf_name));
+ std::unique_ptr<Botan::PBKDF> pbkdf(Botan::PBKDF::create(pbkdf_name));
if(!pbkdf)
{
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);
}