summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2016-04-06 11:19:55 +0100
committerMatt Caswell <matt@openssl.org>2016-04-13 08:52:33 +0100
commitf3cd81d6538e6295eaa279acd65ad10faeccd2ed (patch)
tree26117ea3e3651aff964d42a7b986afd935c6ebeb /apps
parentb22234deebe2e1758d59c64778ce462f11f16cb4 (diff)
Deprecate RAND_cleanup() and make it a no-op
RAND_cleanup() should not be called expicitly - we should leave auto-deinit to clean this up instead. Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'apps')
-rw-r--r--apps/speed.c10
-rw-r--r--apps/testdsa.h3
2 files changed, 0 insertions, 13 deletions
diff --git a/apps/speed.c b/apps/speed.c
index 68d6f0f58a..b2c247f68d 100644
--- a/apps/speed.c
+++ b/apps/speed.c
@@ -313,7 +313,6 @@ static double ecdh_results[EC_NUM][1];
#if !defined(OPENSSL_NO_DSA) || !defined(OPENSSL_NO_EC)
static const char rnd_seed[] =
"string to make the random number generator think it has entropy";
-static int rnd_fake = 0;
#endif
#ifdef SIGALRM
@@ -2448,7 +2447,6 @@ int speed_main(int argc, char **argv)
#ifndef OPENSSL_NO_DSA
if (RAND_status() != 1) {
RAND_seed(rnd_seed, sizeof rnd_seed);
- rnd_fake = 1;
}
for (testnum = 0; testnum < DSA_NUM; testnum++) {
int st = 0;
@@ -2512,14 +2510,11 @@ int speed_main(int argc, char **argv)
dsa_doit[testnum] = 0;
}
}
- if (rnd_fake)
- RAND_cleanup();
#endif
#ifndef OPENSSL_NO_EC
if (RAND_status() != 1) {
RAND_seed(rnd_seed, sizeof rnd_seed);
- rnd_fake = 1;
}
for (testnum = 0; testnum < EC_NUM; testnum++) {
int st = 1;
@@ -2601,14 +2596,11 @@ int speed_main(int argc, char **argv)
}
}
}
- if (rnd_fake)
- RAND_cleanup();
#endif
#ifndef OPENSSL_NO_EC
if (RAND_status() != 1) {
RAND_seed(rnd_seed, sizeof rnd_seed);
- rnd_fake = 1;
}
for (testnum = 0; testnum < EC_NUM; testnum++) {
if (!ecdh_doit[testnum])
@@ -2700,8 +2692,6 @@ int speed_main(int argc, char **argv)
ecdh_doit[testnum] = 0;
}
}
- if (rnd_fake)
- RAND_cleanup();
#endif
#ifndef NO_FORK
show_res:
diff --git a/apps/testdsa.h b/apps/testdsa.h
index 6519948fe6..c72c71ecce 100644
--- a/apps/testdsa.h
+++ b/apps/testdsa.h
@@ -328,6 +328,3 @@ DSA *get_dsa2048()
return NULL;
}
-static const char rnd_seed[] =
- "string to make the random number generator think it has entropy";
-static int rnd_fake = 0;