Call RAND_cleanup in openssl application.
[openssl.git] / apps / apps.h
index 390a58c67ca09f5fa34eae37817e6e1207887e24..0a9d90bcb56d04ce3de719415531507a9a4ab6d1 100644 (file)
@@ -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(); \
 #    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); \
                        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() \
                        ERR_free_strings(); zlib_cleanup();} while(0)
 #  else
 #    define apps_startup() \