Commit 0b833bc9 authored by Niels Möller's avatar Niels Möller

* src/lsh-keygen.c: Use make_default_random().

Rev: src/lsh-keygen.c:1.3
parent 54f04c7c
...@@ -197,16 +197,16 @@ int main(int argc, char **argv) ...@@ -197,16 +197,16 @@ int main(int argc, char **argv)
= make_lsh_keygen_options(); = make_lsh_keygen_options();
struct sexp *key; struct sexp *key;
struct randomness *r; struct randomness_with_poll *r;
argp_parse(&main_argp, argc, argv, 0, NULL, options); argp_parse(&main_argp, argc, argv, 0, NULL, options);
r = make_reasonably_random(); r = make_default_random(NULL, &handler);
switch (options->algorithm) switch (options->algorithm)
{ {
case 'd': case 'd':
key = dsa_generate_key(r, options->level); key = dsa_generate_key(&r->super, options->level);
break; break;
case 'r': case 'r':
{ {
...@@ -217,11 +217,11 @@ int main(int argc, char **argv) ...@@ -217,11 +217,11 @@ int main(int argc, char **argv)
{ {
/* Use a reasonably small random e, and make sure that at /* Use a reasonably small random e, and make sure that at
* it is odd and has at most one more one bit. */ * it is odd and has at most one more one bit. */
bignum_random_size(e, r, 30); bignum_random_size(e, &r->super, 30);
mpz_setbit(e, 0); mpz_setbit(e, 0);
mpz_setbit(e, 17); mpz_setbit(e, 17);
key = rsa_generate_key(e, r, options->level); key = rsa_generate_key(e, &r->super, options->level);
} }
while (!key); while (!key);
......
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