Commit 037d694b authored by Nikos Mavrogiannopoulos's avatar Nikos Mavrogiannopoulos Committed by Niels Möller

(dsa_generate_keypair): Avoid double init of mpz

variable. Spotted by Nikos Mavrogiannopoulos.

Rev: nettle/ChangeLog:1.167
Rev: nettle/dsa-keygen.c:1.10
parent 7c6aadc7
2011-05-21 Niels Mller <nisse@lysator.liu.se>
* dsa-keygen.c (dsa_generate_keypair): Avoid double init of mpz
variable. Spotted by Nikos Mavrogiannopoulos.
2011-05-06 Niels Mller <nisse@lysator.liu.se>
* configure.ac: Fix link flags for shared libraries on Solaris,
......
......@@ -106,7 +106,7 @@ dsa_generate_keypair(struct dsa_public_key *pub,
if (progress)
progress (progress_ctx, 'g');
mpz_init_set(r, pub->q);
mpz_set(r, pub->q);
mpz_sub_ui(r, r, 2);
nettle_mpz_random(key->x, random_ctx, random, r);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment