diff options
author | Matt Caswell <matt@openssl.org> | 2019-05-01 11:02:43 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2019-05-02 22:42:09 +0100 |
commit | 1aedc35fd6c2f40f269c88b2f7d5a617172b47c5 (patch) | |
tree | 705bc6f55fe9571651b27af36c3a9a3ce1bc6ea1 /crypto/init.c | |
parent | b8fe36fee000970dcb7cd363f31445969cfbf677 (diff) |
Instead of global data store it in an OPENSSL_CTX
Various core and property related code files used global data. We should
store all of that in an OPENSSL_CTX instead.
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/8857)
Diffstat (limited to 'crypto/init.c')
-rw-r--r-- | crypto/init.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/crypto/init.c b/crypto/init.c index 43fe1a6e1b..aa6f4b7125 100644 --- a/crypto/init.c +++ b/crypto/init.c @@ -526,7 +526,7 @@ void OPENSSL_cleanup(void) * - rand_cleanup_int could call an ENGINE's RAND cleanup function so * must be called before engine_cleanup_int() * - ENGINEs use CRYPTO_EX_DATA and therefore, must be cleaned up - * before the ex data handlers are wiped in CRYPTO_cleanup_all_ex_data(). + * before the ex data handlers are wiped during default openssl_ctx deinit. * - conf_modules_free_int() can end up in ENGINE code so must be called * before engine_cleanup_int() * - ENGINEs and additional EVP algorithms might use added OIDs names so @@ -540,6 +540,7 @@ void OPENSSL_cleanup(void) OSSL_TRACE(INIT, "OPENSSL_cleanup: conf_modules_free_int()\n"); conf_modules_free_int(); + #ifndef OPENSSL_NO_ENGINE OSSL_TRACE(INIT, "OPENSSL_cleanup: engine_cleanup_int()\n"); engine_cleanup_int(); @@ -547,8 +548,8 @@ void OPENSSL_cleanup(void) OSSL_TRACE(INIT, "OPENSSL_cleanup: ossl_store_cleanup_int()\n"); ossl_store_cleanup_int(); - OSSL_TRACE(INIT, "OPENSSL_cleanup: crypto_cleanup_all_ex_data_int()\n"); - crypto_cleanup_all_ex_data_int(); + OSSL_TRACE(INIT, "OPENSSL_cleanup: openssl_ctx_default_deinit()\n"); + openssl_ctx_default_deinit(); OSSL_TRACE(INIT, "OPENSSL_cleanup: bio_cleanup()\n"); bio_cleanup(); |