summaryrefslogtreecommitdiffstats
path: root/rsa.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-03-05 16:10:45 +1100
committerDamien Miller <djm@mindrot.org>2000-03-05 16:10:45 +1100
commitfac99cd12a9b4480284c4d4229b2e842bc1065f7 (patch)
treef562535463ee9923dd3ba71e823a888ed661d4cb /rsa.c
parent01bedb83b1faddd7d9dd136bfcd474e1608af8f7 (diff)
- Explicitly seed OpenSSL's PRNG before checking rsa_alive()
Diffstat (limited to 'rsa.c')
-rw-r--r--rsa.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/rsa.c b/rsa.c
index 597d20fb..1df8fbc9 100644
--- a/rsa.c
+++ b/rsa.c
@@ -35,7 +35,7 @@
*/
#include "includes.h"
-RCSID("$Id: rsa.c,v 1.7 2000/01/29 09:40:22 damien Exp $");
+RCSID("$Id: rsa.c,v 1.8 2000/03/05 05:10:46 damien Exp $");
#include "rsa.h"
#include "ssh.h"
@@ -49,6 +49,7 @@ rsa_alive()
{
RSA *key;
+ seed_rng();
key = RSA_generate_key(32, 3, NULL, NULL);
if (key == NULL)
return (0);
@@ -77,7 +78,7 @@ keygen_progress(int p, int n, void *arg)
void
seed_rng()
{
- char buf[32];
+ char buf[64];
get_random_bytes(buf, sizeof(buf));
RAND_seed(buf, sizeof(buf));