]> andersk Git - openssh.git/commitdiff
Removed excess seed_rng calls
authordamien <damien>
Tue, 4 Apr 2000 04:57:08 +0000 (04:57 +0000)
committerdamien <damien>
Tue, 4 Apr 2000 04:57:08 +0000 (04:57 +0000)
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 d88bf5280f3c4307054c12817e46a2ce76317444..0e5f257660e36fd1e334c250c26e7ceaa9d8134b 100644 (file)
--- a/kex.c
+++ b/kex.c
@@ -111,7 +111,6 @@ new_dh_group1()
        seed_rng();
        if (DH_generate_key(dh) == 0)
                fatal("DH_generate_key");
-       seed_rng();
 
        return dh;
 }
index 98c2abbfd3df49905445b619c5c8b955e8878ef8..a1e301d6c9a3742a2cf738f42f419f596dad78b4 100644 (file)
--- a/packet.c
+++ b/packet.c
@@ -35,9 +35,17 @@ RCSID("$Id$");
 #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 4d52251c3e67892c1016d3788ca371a6d64c80d8..67ad99077952e7211a5f1e5a6ad4c9793e4a8032 100644 (file)
--- a/rsa.c
+++ b/rsa.c
@@ -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);
This page took 0.052973 seconds and 5 git commands to generate.