summaryrefslogtreecommitdiffstats
path: root/crypto/dsa/dsa_gen.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/dsa/dsa_gen.c')
-rw-r--r--crypto/dsa/dsa_gen.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/crypto/dsa/dsa_gen.c b/crypto/dsa/dsa_gen.c
index b324840180..248a70be4a 100644
--- a/crypto/dsa/dsa_gen.c
+++ b/crypto/dsa/dsa_gen.c
@@ -167,10 +167,12 @@ DSA *DSA_generate_parameters(int bits, unsigned char *seed_in, int seed_len,
/* step 4 */
r = BN_is_prime_fasttest(q, DSS_prime_checks, callback, ctx3, cb_arg, seed_is_random);
+ if (ctx3->tos)
+ goto err;
if (r > 0)
- break;
+ break;
if (r != 0)
- goto err;
+ goto err;
/* do a callback call */
/* step 5 */