diff options
author | Richard Levitte <levitte@openssl.org> | 2016-05-08 17:01:09 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2016-05-10 11:31:05 +0200 |
commit | 21e001747d4a246827ad432fc508d67ac404ecdb (patch) | |
tree | 512105b818918f601165eb8105c725f46d1f3ba4 /crypto | |
parent | 06aa885d0ccbb018ff7044258e9a8b6e7a56681d (diff) |
Restore the ERR_remove_thread_state() API and make it a no-op
The ERR_remove_thread_state() API is restored to take a pointer
argument, but does nothing more. ERR_remove_state() is also made into
a no-op. Both functions are deprecated and users are recommended to
use OPENSSL_thread_stop() instead.
Documentation is changed to reflect this.
Reviewed-by: Matt Caswell <matt@openssl.org>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/err/err.c | 9 | ||||
-rw-r--r-- | crypto/include/internal/err_int.h | 1 | ||||
-rw-r--r-- | crypto/init.c | 4 |
3 files changed, 10 insertions, 4 deletions
diff --git a/crypto/err/err.c b/crypto/err/err.c index b0fd19e7ae..fd2ea8194a 100644 --- a/crypto/err/err.c +++ b/crypto/err/err.c @@ -740,7 +740,7 @@ const char *ERR_reason_error_string(unsigned long e) return ((p == NULL) ? NULL : p->string); } -void ERR_remove_thread_state(void) +void err_delete_thread_state(void) { ERR_STATE *state = ERR_get_state(); if (state == NULL) @@ -751,9 +751,14 @@ void ERR_remove_thread_state(void) } #if OPENSSL_API_COMPAT < 0x10000000L +void ERR_remove_thread_state(void *dummy) +{ +} +#endif + +#if OPENSSL_API_COMPAT < 0x10000000L void ERR_remove_state(unsigned long pid) { - ERR_remove_thread_state(); } #endif diff --git a/crypto/include/internal/err_int.h b/crypto/include/internal/err_int.h index 7f1037e939..0aebe8466e 100644 --- a/crypto/include/internal/err_int.h +++ b/crypto/include/internal/err_int.h @@ -13,5 +13,6 @@ void err_load_crypto_strings_int(void); void err_cleanup(void); +void err_delete_thread_state(void); #endif diff --git a/crypto/init.c b/crypto/init.c index 48f74c496c..938bf78a39 100644 --- a/crypto/init.c +++ b/crypto/init.c @@ -351,9 +351,9 @@ static void ossl_init_thread_stop(struct thread_local_inits_st *locals) if (locals->err_state) { #ifdef OPENSSL_INIT_DEBUG fprintf(stderr, "OPENSSL_INIT: ossl_init_thread_stop: " - "ERR_remove_thread_state()\n"); + "err_delete_thread_state()\n"); #endif - ERR_remove_thread_state(); + err_delete_thread_state(); } OPENSSL_free(locals); |