summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorDr. Matthias St. Pierre <matthias.st.pierre@ncp-e.com>2022-03-29 21:50:21 +0200
committerDr. Matthias St. Pierre <matthias.st.pierre@ncp-e.com>2022-05-10 09:50:15 +0200
commit39f7f543738f954c9a7c0ef554e32563e241bcb9 (patch)
treebb1c2ccaa77f9928396b51a9c78a77469749f136 /crypto
parent3e8307924efb54274083454f3a05a7d38b54be86 (diff)
err: get rid of err_free_strings_int()
Even though the function is not part of the public api, it is not entirely removed, in order to minimize the chance of breakage, because it is exported from libcrypto. Instead, we keep a dummy implementation. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17974) (cherry picked from commit 1c8787d5e0b01bedfc3cbe5eab5b85290221d8c1)
Diffstat (limited to 'crypto')
-rw-r--r--crypto/err/err.c3
-rw-r--r--crypto/init.c8
2 files changed, 2 insertions, 9 deletions
diff --git a/crypto/err/err.c b/crypto/err/err.c
index 01ea51b9dc..be35c913b0 100644
--- a/crypto/err/err.c
+++ b/crypto/err/err.c
@@ -327,8 +327,7 @@ int ERR_unload_strings(int lib, ERR_STRING_DATA *str)
void err_free_strings_int(void)
{
- if (!RUN_ONCE(&err_string_init, do_err_strings_init))
- return;
+ /* obsolete */
}
/********************************************************/
diff --git a/crypto/init.c b/crypto/init.c
index 8d9ed7e9b2..be388b7e5a 100644
--- a/crypto/init.c
+++ b/crypto/init.c
@@ -170,7 +170,7 @@ DEFINE_RUN_ONCE_STATIC(ossl_init_load_crypto_nodelete)
}
static CRYPTO_ONCE load_crypto_strings = CRYPTO_ONCE_STATIC_INIT;
-static int load_crypto_strings_inited = 0;
+
DEFINE_RUN_ONCE_STATIC(ossl_init_load_crypto_strings)
{
int ret = 1;
@@ -181,7 +181,6 @@ DEFINE_RUN_ONCE_STATIC(ossl_init_load_crypto_strings)
#if !defined(OPENSSL_NO_ERR) && !defined(OPENSSL_NO_AUTOERRINIT)
OSSL_TRACE(INIT, "ossl_err_load_crypto_strings()\n");
ret = ossl_err_load_crypto_strings();
- load_crypto_strings_inited = 1;
#endif
return ret;
}
@@ -388,11 +387,6 @@ void OPENSSL_cleanup(void)
async_deinit();
}
- if (load_crypto_strings_inited) {
- OSSL_TRACE(INIT, "OPENSSL_cleanup: err_free_strings_int()\n");
- err_free_strings_int();
- }
-
/*
* Note that cleanup order is important:
* - ossl_rand_cleanup_int could call an ENGINE's RAND cleanup function so