- Wrote entropy collection routines for systems that lack /dev/random
and EGD
diff --git a/rsa.c b/rsa.c
index babbf2b..1916090 100644
--- a/rsa.c
+++ b/rsa.c
@@ -35,28 +35,15 @@
*/
#include "includes.h"
-RCSID("$Id: rsa.c,v 1.11 2000/03/17 12:40:16 damien Exp $");
+RCSID("$Id: rsa.c,v 1.12 2000/04/03 04:50:46 damien Exp $");
#include "rsa.h"
#include "ssh.h"
#include "xmalloc.h"
-#include "random.h"
+#include "entropy.h"
int rsa_verbose = 1;
-/*
- * Seed OpenSSL's random number generator
- */
-void
-seed_rng()
-{
- char buf[64];
-
- get_random_bytes(buf, sizeof(buf));
- RAND_seed(buf, sizeof(buf));
- memset(buf, 0, sizeof(buf));
-}
-
int
rsa_alive()
{
@@ -109,6 +96,8 @@
if (key == NULL)
fatal("rsa_generate_key: key generation failed.");
+ seed_rng();
+
/* Copy public key parameters */
pub->n = BN_new();
BN_copy(pub->n, key->n);