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 3186c86d8..83822cad5 100644
--- a/bsd-misc.c
+++ b/bsd-misc.c
@@ -121,7 +121,6 @@ void arc4random_stir(void)
121 121
122 seed_rng(); 122 seed_rng();
123 RAND_bytes(rand_buf, sizeof(rand_buf)); 123 RAND_bytes(rand_buf, sizeof(rand_buf));
124 seed_rng();
125 124
126 rc4_key(rc4, rand_buf, sizeof(rand_buf)); 125 rc4_key(rc4, rand_buf, sizeof(rand_buf));
127 memset(rand_buf, 0, sizeof(rand_buf)); 126 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 @@
28 */ 28 */
29 29
30#include "includes.h" 30#include "includes.h"
31RCSID("$Id: kex.c,v 1.1 2000/04/04 04:39:02 damien Exp $"); 31RCSID("$Id: kex.c,v 1.2 2000/04/04 04:57:08 damien Exp $");
32 32
33#include "ssh.h" 33#include "ssh.h"
34#include "ssh2.h" 34#include "ssh2.h"
@@ -111,7 +111,6 @@ new_dh_group1()
111 seed_rng(); 111 seed_rng();
112 if (DH_generate_key(dh) == 0) 112 if (DH_generate_key(dh) == 0)
113 fatal("DH_generate_key"); 113 fatal("DH_generate_key");
114 seed_rng();
115 114
116 return dh; 115 return dh;
117} 116}
diff --git a/packet.c b/packet.c
index 3875d8f9b..39629a5ef 100644
--- a/packet.c
+++ b/packet.c
@@ -17,7 +17,7 @@
17 */ 17 */
18 18
19#include "includes.h" 19#include "includes.h"
20RCSID("$Id: packet.c,v 1.14 2000/04/04 04:39:03 damien Exp $"); 20RCSID("$Id: packet.c,v 1.15 2000/04/04 04:57:08 damien Exp $");
21 21
22#include "xmalloc.h" 22#include "xmalloc.h"
23#include "buffer.h" 23#include "buffer.h"
@@ -35,9 +35,17 @@ RCSID("$Id: packet.c,v 1.14 2000/04/04 04:39:03 damien Exp $");
35#include "compat.h" 35#include "compat.h"
36#include "ssh2.h" 36#include "ssh2.h"
37 37
38#include <ssl/bn.h> 38#ifdef HAVE_OPENSSL
39#include <ssl/dh.h> 39# include <openssl/bn.h>
40#include <ssl/hmac.h> 40# include <openssl/dh.h>
41# include <openssl/hmac.h>
42#endif /* HAVE_OPENSSL */
43#ifdef HAVE_SSL
44# include <ssl/bn.h>
45# include <ssl/dh.h>
46# include <ssl/hmac.h>
47#endif /* HAVE_SSL */
48
41#include "buffer.h" 49#include "buffer.h"
42#include "kex.h" 50#include "kex.h"
43#include "hmac.h" 51#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 @@
35*/ 35*/
36 36
37#include "includes.h" 37#include "includes.h"
38RCSID("$Id: rsa.c,v 1.12 2000/04/03 04:50:46 damien Exp $"); 38RCSID("$Id: rsa.c,v 1.13 2000/04/04 04:57:08 damien Exp $");
39 39
40#include "rsa.h" 40#include "rsa.h"
41#include "ssh.h" 41#include "ssh.h"
@@ -96,8 +96,6 @@ rsa_generate_key(RSA *prv, RSA *pub, unsigned int bits)
96 if (key == NULL) 96 if (key == NULL)
97 fatal("rsa_generate_key: key generation failed."); 97 fatal("rsa_generate_key: key generation failed.");
98 98
99 seed_rng();
100
101 /* Copy public key parameters */ 99 /* Copy public key parameters */
102 pub->n = BN_new(); 100 pub->n = BN_new();
103 BN_copy(pub->n, key->n); 101 BN_copy(pub->n, key->n);