X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=doc%2Fman3%2FOPENSSL_init_crypto.pod;h=e20fc8c99829dfde45f5c3fab85d665c18110f2c;hp=a83256144a15d098b2d34406de0860eca80276cc;hb=b66a481888e00a36f833308bdcf53408238511d4;hpb=df1f538f28c10f2954757164b17781040d2355ef diff --git a/doc/man3/OPENSSL_init_crypto.pod b/doc/man3/OPENSSL_init_crypto.pod index a83256144a..e20fc8c998 100644 --- a/doc/man3/OPENSSL_init_crypto.pod +++ b/doc/man3/OPENSSL_init_crypto.pod @@ -5,7 +5,7 @@ OPENSSL_INIT_new, OPENSSL_INIT_set_config_filename, OPENSSL_INIT_set_config_appname, OPENSSL_INIT_set_config_file_flags, OPENSSL_INIT_free, OPENSSL_init_crypto, OPENSSL_cleanup, OPENSSL_atexit, -OPENSSL_thread_stop - OpenSSL initialisation +OPENSSL_thread_stop_ex, OPENSSL_thread_stop - OpenSSL initialisation and deinitialisation functions =head1 SYNOPSIS @@ -15,6 +15,7 @@ and deinitialisation functions void OPENSSL_cleanup(void); int OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings); int OPENSSL_atexit(void (*handler)(void)); + void OPENSSL_thread_stop_ex(OPENSSL_CTX *ctx); void OPENSSL_thread_stop(void); OPENSSL_INIT_SETTINGS *OPENSSL_INIT_new(void); @@ -202,11 +203,25 @@ called after deinitialisation of resources local to a thread, but before other process wide resources are freed. In the event that multiple stop handlers are registered, no guarantees are made about the order of execution. -The OPENSSL_thread_stop() function deallocates resources associated -with the current thread. Typically this function will be called automatically by -the library when the thread exits. This should only be called directly if -resources should be freed at an earlier time, or under the circumstances -described in the NOTES section below. +The OPENSSL_thread_stop_ex() function deallocates resources associated +with the current thread for the given OPENSSL_CTX B. The B parameter +can be NULL in which case the default OPENSSL_CTX is used. + +Typically, this function will be called automatically by the library when +the thread exits as long as the OPENSSL_CTX has not been freed before the thread +exits. If OPENSSL_CTX_free() is called OPENSSL_thread_stop_ex will be called +automatically for the current thread (but not any other threads that may have +used this OPENSSL_CTX). + +OPENSSL_thread_stop_ex should be called on all threads that will exit after the +OPENSSL_CTX is freed. +Typically this is not necessary for the default OPENSSL_CTX (because all +resources are cleaned up on library exit) except if thread local resources +should be freed before library exit, or under the circumstances described in +the NOTES section below. + +OPENSSL_thread_stop() is the same as OPENSSL_thread_stop_ex() except that the +default OPENSSL_CTX is always used. The B flag will load a configuration file, as with L with NULL filename and application name and the