From: Dr. Stephen Henson Date: Thu, 28 Mar 2013 14:28:06 +0000 (+0000) Subject: Call RAND_cleanup in openssl application. X-Git-Tag: master-post-reformat~1366 X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff_plain;h=3d1160d58bddc2c048fef0b5f66d68a9cadd08a0;hp=4221c0dd3004117c63b182af5e8ab345b7265902 Call RAND_cleanup in openssl application. (cherry picked from commit 944bc29f9004cf8851427ebfa83ee70b8399da57) --- diff --git a/apps/apps.h b/apps/apps.h index 390a58c67c..0a9d90bcb5 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 #include +#include #include #include #include