aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tests/test_bigint.cpp21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/tests/test_bigint.cpp b/src/tests/test_bigint.cpp
index 3d9fd7139..b54f0082f 100644
--- a/src/tests/test_bigint.cpp
+++ b/src/tests/test_bigint.cpp
@@ -533,15 +533,20 @@ class DSA_ParamGen_Test : public Text_Based_Test
if(Test::soak_level() <= 5 && p_bits > 1024)
return result;
- Botan::BigInt gen_P, gen_Q;
- if(Botan::generate_dsa_primes(Test::rng(), gen_P, gen_Q, p_bits, q_bits, seed))
- {
- result.test_eq("P", gen_P, P);
- result.test_eq("Q", gen_Q, Q);
- }
- else
+ try {
+ Botan::BigInt gen_P, gen_Q;
+ if(Botan::generate_dsa_primes(Test::rng(), gen_P, gen_Q, p_bits, q_bits, seed))
+ {
+ result.test_eq("P", gen_P, P);
+ result.test_eq("Q", gen_Q, Q);
+ }
+ else
+ {
+ result.test_failure("Seed did not generate a DSA parameter");
+ }
+ }
+ catch(Botan::Algorithm_Not_Found&)
{
- result.test_failure("Seed did not generate a DSA parameter");
}
return result;