Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions apps/speed.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,11 +247,6 @@ static double ecdsa_results[EC_NUM][2];
static double ecdh_results[EC_NUM][1];
#endif

#if !defined(OPENSSL_NO_DSA) || !defined(OPENSSL_NO_EC)
static const char rnd_seed[] =
"string to make the random number generator think it has randomness";
#endif

#ifdef SIGALRM
# if defined(__STDC__) || defined(sgi) || defined(_AIX)
# define SIGRETTYPE void
Expand Down Expand Up @@ -2397,9 +2392,6 @@ int speed_main(int argc, char **argv)
RAND_bytes(loopargs[i].buf, 36);

#ifndef OPENSSL_NO_DSA
if (RAND_status() != 1) {
RAND_seed(rnd_seed, sizeof rnd_seed);
}
for (testnum = 0; testnum < DSA_NUM; testnum++) {
int st = 0;
if (!dsa_doit[testnum])
Expand Down Expand Up @@ -2467,9 +2459,6 @@ int speed_main(int argc, char **argv)
#endif /* OPENSSL_NO_DSA */

#ifndef OPENSSL_NO_EC
if (RAND_status() != 1) {
RAND_seed(rnd_seed, sizeof rnd_seed);
}
for (testnum = 0; testnum < EC_NUM; testnum++) {
int st = 1;

Expand Down Expand Up @@ -2554,9 +2543,6 @@ int speed_main(int argc, char **argv)
}
}

if (RAND_status() != 1) {
RAND_seed(rnd_seed, sizeof rnd_seed);
}
for (testnum = 0; testnum < EC_NUM; testnum++) {
int ecdh_checks = 1;

Expand Down
4 changes: 0 additions & 4 deletions crypto/bn/bn_rand.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ static int bnrand(int testing, BIGNUM *rnd, int bits, int top, int bottom)
{
unsigned char *buf = NULL;
int ret = 0, bit, bytes, mask;
time_t tim;

if (bits == 0) {
if (top != BN_RAND_TOP_ANY || bottom != BN_RAND_BOTTOM_ANY)
Expand All @@ -40,9 +39,6 @@ static int bnrand(int testing, BIGNUM *rnd, int bits, int top, int bottom)
}

/* make a random number and set the top and bottom bits */
time(&tim);
RAND_add(&tim, sizeof(tim), 0.0);

if (RAND_bytes(buf, bytes) <= 0)
goto err;

Expand Down
2 changes: 1 addition & 1 deletion crypto/dsa/dsa_asn1.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ int DSA_sign(int type, const unsigned char *dgst, int dlen,
unsigned char *sig, unsigned int *siglen, DSA *dsa)
{
DSA_SIG *s;
RAND_seed(dgst, dlen);

s = DSA_do_sign(dgst, dlen, dsa);
if (s == NULL) {
*siglen = 0;
Expand Down
2 changes: 1 addition & 1 deletion crypto/ec/ecdsa_ossl.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ int ossl_ecdsa_sign(int type, const unsigned char *dgst, int dlen,
const BIGNUM *kinv, const BIGNUM *r, EC_KEY *eckey)
{
ECDSA_SIG *s;
RAND_seed(dgst, dlen);

s = ECDSA_do_sign_ex(dgst, dlen, kinv, r, eckey);
if (s == NULL) {
*siglen = 0;
Expand Down
1 change: 0 additions & 1 deletion crypto/evp/evp_pkey.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8(EVP_PKEY *pkey)
EVPerr(EVP_F_EVP_PKEY2PKCS8, EVP_R_UNSUPPORTED_PRIVATE_KEY_ALGORITHM);
goto error;
}
RAND_add(p8->pkey->data, p8->pkey->length, 0.0);
return p8;
error:
PKCS8_PRIV_KEY_INFO_free(p8);
Expand Down
1 change: 0 additions & 1 deletion crypto/pem/pem_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,6 @@ int PEM_ASN1_write_bio(i2d_of_void *i2d, const char *name, BIO *bp,
#endif
kstr = (unsigned char *)buf;
}
RAND_add(data, i, 0); /* put in the RSA key. */
OPENSSL_assert(EVP_CIPHER_iv_length(enc) <= (int)sizeof(iv));
if (RAND_bytes(iv, EVP_CIPHER_iv_length(enc)) <= 0) /* Generate a salt */
goto err;
Expand Down
2 changes: 1 addition & 1 deletion crypto/rand/build.info
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
LIBS=../../libcrypto
SOURCE[../../libcrypto]=\
ossl_rand.c randfile.c rand_lib.c rand_err.c rand_egd.c \
randfile.c rand_lib.c rand_err.c rand_egd.c \
rand_win.c rand_unix.c rand_vms.c drbg_lib.c drbg_rand.c
Loading