summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2013-03-28 14:28:06 +0000
committerDr. Stephen Henson <steve@openssl.org>2013-03-28 14:29:11 +0000
commitf25c3c05428705b71950fd390a4b712baceb5fcc (patch)
tree33bbfa4c44d93d3677742276fed30abbcd97be4d
parent4e5b9645e8f4a5924e15bfc575e302ee37a706bd (diff)
Call RAND_cleanup in openssl application.
(cherry picked from commit 944bc29f9004cf8851427ebfa83ee70b8399da57)
-rw-r--r--apps/apps.h2
-rw-r--r--apps/openssl.c1
2 files changed, 3 insertions, 0 deletions
diff --git a/apps/apps.h b/apps/apps.h
index 6a71b8323a..954c33afed 100644
--- a/apps/apps.h
+++ b/apps/apps.h
@@ -183,11 +183,13 @@ extern BIO *bio_err;
# define apps_startup() \
do { do_pipe_sig(); CRYPTO_malloc_init(); \
ERR_load_crypto_strings(); OpenSSL_add_all_algorithms(); \
+ RAND_cleanup(); \
ENGINE_load_builtin_engines(); setup_ui_method(); } while(0)
# define apps_shutdown() \
do { CONF_modules_unload(1); destroy_ui_method(); \
OBJ_cleanup(); EVP_cleanup(); ENGINE_cleanup(); \
CRYPTO_cleanup_all_ex_data(); ERR_remove_thread_state(NULL); \
+ RAND_cleanup(); \
ERR_free_strings(); zlib_cleanup();} while(0)
# else
# define apps_startup() \
diff --git a/apps/openssl.c b/apps/openssl.c
index 1c880d90ba..71e1e48ece 100644
--- a/apps/openssl.c
+++ b/apps/openssl.c
@@ -117,6 +117,7 @@
#include "apps.h"
#include <openssl/bio.h>
#include <openssl/crypto.h>
+#include <openssl/rand.h>
#include <openssl/lhash.h>
#include <openssl/conf.h>
#include <openssl/x509.h>