Removed excess seed_rng calls

This commit is contained in:
Damien Miller 2000-04-04 14:57:08 +10:00
parent 2acd082bc9
commit 9f98f06c89
4 changed files with 14 additions and 10 deletions

View 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));

3
kex.c
View File

@ -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;
}

View File

@ -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"

4
rsa.c
View File

@ -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);