]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
Removed excess seed_rng calls
authorDamien Miller <djm@mindrot.org>
Tue, 4 Apr 2000 04:57:08 +0000 (14:57 +1000)
committerDamien Miller <djm@mindrot.org>
Tue, 4 Apr 2000 04:57:08 +0000 (14:57 +1000)
bsd-misc.c
kex.c
packet.c
rsa.c

index 3186c86d869db17c3db9507292ef496813fe0124..83822cad52d6dfcaa9e4d8b589463894c654ae7c 100644 (file)
@@ -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 e730536acaa64cfac36843a80168b352b443788d..d2047d6f1c04bc0d6415e4db15009d544797a0ba 100644 (file)
--- 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;
 }
index 3875d8f9be50326ddb7fa121a18fc3e39d5055bb..39629a5efca6989838c87386c6becbc7ab8d310c 100644 (file)
--- 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 <ssl/bn.h>
-#include <ssl/dh.h>
-#include <ssl/hmac.h>
+#ifdef HAVE_OPENSSL
+# include <openssl/bn.h>
+# include <openssl/dh.h>
+# include <openssl/hmac.h>
+#endif /* HAVE_OPENSSL */
+#ifdef HAVE_SSL
+# include <ssl/bn.h>
+# include <ssl/dh.h>
+# include <ssl/hmac.h>
+#endif /* HAVE_SSL */
+
 #include "buffer.h"
 #include "kex.h"
 #include "hmac.h"
diff --git a/rsa.c b/rsa.c
index 19160902a200d2b187f5c38d51fff7945b720ecd..0385a102ca3174a339244f4464b9fdd669c60e12 100644 (file)
--- 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);