diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2011-11-25 16:03:42 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2011-11-25 16:03:42 +0000 |
commit | f6c0bd641c649bd7f206c275363c6ff2eec4d759 (patch) | |
tree | db386c9f3b9bd38197454b5f33159cf435a7fdd9 /crypto/dsa | |
parent | ea7fe214c4d05fe6d52bf4d106216acc7eaca773 (diff) |
return error if counter exceeds limit and seed value supplied
Diffstat (limited to 'crypto/dsa')
-rw-r--r-- | crypto/dsa/dsa_gen.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crypto/dsa/dsa_gen.c b/crypto/dsa/dsa_gen.c index 3b49420c76..9e3e57a828 100644 --- a/crypto/dsa/dsa_gen.c +++ b/crypto/dsa/dsa_gen.c @@ -668,6 +668,12 @@ int dsa_builtin_paramgen2(DSA *ret, size_t L, size_t N, /* step 14 */ if (counter >= (int)(4 * L)) break; } + if (seed_in) + { + ok = 0; + DSAerr(DSA_F_DSA_BUILTIN_PARAMGEN2, DSA_R_INVALID_PARAMETERS); + goto err; + } } end: if(!BN_GENCB_call(cb, 2, 1)) |