diff options
author | Matt Caswell <matt@openssl.org> | 2016-04-06 11:19:55 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2016-04-13 08:52:33 +0100 |
commit | f3cd81d6538e6295eaa279acd65ad10faeccd2ed (patch) | |
tree | 26117ea3e3651aff964d42a7b986afd935c6ebeb /crypto/init.c | |
parent | b22234deebe2e1758d59c64778ce462f11f16cb4 (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 'crypto/init.c')
-rw-r--r-- | crypto/init.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crypto/init.c b/crypto/init.c index 3699145ac6..d93f282818 100644 --- a/crypto/init.c +++ b/crypto/init.c @@ -58,7 +58,7 @@ #include <internal/threads.h> #include <internal/cryptlib_int.h> #include <openssl/err.h> -#include <openssl/rand.h> +#include <internal/rand.h> #include <openssl/evp.h> #include <internal/evp_int.h> #include <internal/conf.h> @@ -453,7 +453,7 @@ void OPENSSL_cleanup(void) #ifdef OPENSSL_INIT_DEBUG fprintf(stderr, "OPENSSL_INIT: OPENSSL_cleanup: " - "RAND_cleanup()\n"); + "rand_cleanup_intern()\n"); fprintf(stderr, "OPENSSL_INIT: OPENSSL_cleanup: " "CONF_modules_free()\n"); #ifndef OPENSSL_NO_ENGINE @@ -471,14 +471,14 @@ void OPENSSL_cleanup(void) #endif /* * Note that cleanup order is important: - * - RAND_cleanup could call an ENINGE's RAND cleanup function so must be - * called before ENGINE_cleanup() + * - rand_cleanup_intern could call an ENINGE's RAND cleanup function so + * must be called before ENGINE_cleanup() * - ENGINEs use CRYPTO_EX_DATA and therefore, must be cleaned up * before the ex data handlers are wiped in CRYPTO_cleanup_all_ex_data(). * - CONF_modules_free() can end up in ENGINE code so must be called before * ENGINE_cleanup() */ - RAND_cleanup(); + rand_cleanup_intern(); CONF_modules_free(); #ifndef OPENSSL_NO_ENGINE ENGINE_cleanup(); |