summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bsd-misc.c1
-rw-r--r--kex.c3
-rw-r--r--packet.c16
-rw-r--r--rsa.c4
4 files changed, 14 insertions, 10 deletions
diff --git a/bsd-misc.c b/bsd-misc.c
index 3186c86d..83822cad 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 e730536a..d2047d6f 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 3875d8f9..39629a5e 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 <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 19160902..0385a102 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);