diff options
author | Alessandro Ghedini <alessandro@ghedini.me> | 2015-10-08 22:00:27 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2015-10-23 19:52:08 +0200 |
commit | 070c23325af4526c9a8532a60d63522c58d5554b (patch) | |
tree | 91a589786247ff47da757a51294768b1fe888b24 /crypto/dsa/dsa_gen.c | |
parent | 8cf9d71a3a43d9b98a8a278d47dc08088a954a7b (diff) |
Remove useless code
RT#4081
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/dsa/dsa_gen.c')
-rw-r--r-- | crypto/dsa/dsa_gen.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/crypto/dsa/dsa_gen.c b/crypto/dsa/dsa_gen.c index 562d0b58d4..480c29dbae 100644 --- a/crypto/dsa/dsa_gen.c +++ b/crypto/dsa/dsa_gen.c @@ -83,16 +83,8 @@ int DSA_generate_parameters_ex(DSA *ret, int bits, return ret->meth->dsa_paramgen(ret, bits, seed_in, seed_len, counter_ret, h_ret, cb); else { - const EVP_MD *evpmd; - size_t qbits = bits >= 2048 ? 256 : 160; - - if (bits >= 2048) { - qbits = 256; - evpmd = EVP_sha256(); - } else { - qbits = 160; - evpmd = EVP_sha1(); - } + const EVP_MD *evpmd = bits >= 2048 ? EVP_sha256() : EVP_sha1(); + size_t qbits = EVP_MD_size(evpmd) * 8; return dsa_builtin_paramgen(ret, bits, qbits, evpmd, seed_in, seed_len, NULL, counter_ret, |