diff options
Diffstat (limited to 'rsa.c')
-rw-r--r-- | rsa.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -35,7 +35,7 @@ | |||
35 | */ | 35 | */ |
36 | 36 | ||
37 | #include "includes.h" | 37 | #include "includes.h" |
38 | RCSID("$Id: rsa.c,v 1.7 2000/01/29 09:40:22 damien Exp $"); | 38 | RCSID("$Id: rsa.c,v 1.8 2000/03/05 05:10:46 damien Exp $"); |
39 | 39 | ||
40 | #include "rsa.h" | 40 | #include "rsa.h" |
41 | #include "ssh.h" | 41 | #include "ssh.h" |
@@ -49,6 +49,7 @@ rsa_alive() | |||
49 | { | 49 | { |
50 | RSA *key; | 50 | RSA *key; |
51 | 51 | ||
52 | seed_rng(); | ||
52 | key = RSA_generate_key(32, 3, NULL, NULL); | 53 | key = RSA_generate_key(32, 3, NULL, NULL); |
53 | if (key == NULL) | 54 | if (key == NULL) |
54 | return (0); | 55 | return (0); |
@@ -77,7 +78,7 @@ keygen_progress(int p, int n, void *arg) | |||
77 | void | 78 | void |
78 | seed_rng() | 79 | seed_rng() |
79 | { | 80 | { |
80 | char buf[32]; | 81 | char buf[64]; |
81 | 82 | ||
82 | get_random_bytes(buf, sizeof(buf)); | 83 | get_random_bytes(buf, sizeof(buf)); |
83 | RAND_seed(buf, sizeof(buf)); | 84 | RAND_seed(buf, sizeof(buf)); |