From 9f98f06c89afad9c8f32d496c07f3bf44e7dc906 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Tue, 4 Apr 2000 14:57:08 +1000 Subject: [PATCH] Removed excess seed_rng calls --- bsd-misc.c | 1 - kex.c | 3 +-- packet.c | 16 ++++++++++++---- rsa.c | 4 +--- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/bsd-misc.c b/bsd-misc.c index 3186c86d8..83822cad5 100644 --- a/bsd-misc.c +++ b/bsd-misc.c @@ -121,7 +121,6 @@ void arc4random_stir(void) seed_rng(); RAND_bytes(rand_buf, sizeof(rand_buf)); - seed_rng(); rc4_key(rc4, rand_buf, sizeof(rand_buf)); memset(rand_buf, 0, sizeof(rand_buf)); diff --git a/kex.c b/kex.c index e730536ac..d2047d6f1 100644 --- a/kex.c +++ b/kex.c @@ -28,7 +28,7 @@ */ #include "includes.h" -RCSID("$Id: kex.c,v 1.1 2000/04/04 04:39:02 damien Exp $"); +RCSID("$Id: kex.c,v 1.2 2000/04/04 04:57:08 damien Exp $"); #include "ssh.h" #include "ssh2.h" @@ -111,7 +111,6 @@ new_dh_group1() seed_rng(); if (DH_generate_key(dh) == 0) fatal("DH_generate_key"); - seed_rng(); return dh; } diff --git a/packet.c b/packet.c index 3875d8f9b..39629a5ef 100644 --- a/packet.c +++ b/packet.c @@ -17,7 +17,7 @@ */ #include "includes.h" -RCSID("$Id: packet.c,v 1.14 2000/04/04 04:39:03 damien Exp $"); +RCSID("$Id: packet.c,v 1.15 2000/04/04 04:57:08 damien Exp $"); #include "xmalloc.h" #include "buffer.h" @@ -35,9 +35,17 @@ RCSID("$Id: packet.c,v 1.14 2000/04/04 04:39:03 damien Exp $"); #include "compat.h" #include "ssh2.h" -#include -#include -#include +#ifdef HAVE_OPENSSL +# include +# include +# include +#endif /* HAVE_OPENSSL */ +#ifdef HAVE_SSL +# include +# include +# include +#endif /* HAVE_SSL */ + #include "buffer.h" #include "kex.h" #include "hmac.h" diff --git a/rsa.c b/rsa.c index 19160902a..0385a102c 100644 --- a/rsa.c +++ b/rsa.c @@ -35,7 +35,7 @@ */ #include "includes.h" -RCSID("$Id: rsa.c,v 1.12 2000/04/03 04:50:46 damien Exp $"); +RCSID("$Id: rsa.c,v 1.13 2000/04/04 04:57:08 damien Exp $"); #include "rsa.h" #include "ssh.h" @@ -96,8 +96,6 @@ rsa_generate_key(RSA *prv, RSA *pub, unsigned int bits) 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);