curl/docs/libcurl
Jay Satiro 7860f575fe dllmain: Call OpenSSL thread cleanup for Windows and Cygwin
- Call OPENSSL_thread_stop on thread termination (DLL_THREAD_DETACH)
  to prevent a memory leak in case OpenSSL is linked statically.

- Warn in libcurl-thread.3 that if OpenSSL is linked statically then it
  may require thread cleanup.

OpenSSL may need per-thread cleanup to stop a memory leak. For Windows
and Cygwin if libcurl was built as a DLL then we can do that for the
user by calling OPENSSL_thread_stop on thread termination. However, if
libcurl was built statically then we do not have notification of thread
termination and cannot do that for the user.

Also, there are several other unusual cases where it may be necessary
for the user to call OPENSSL_thread_stop, so in the libcurl-thread
warning I added a link to the OpenSSL documentation.

Co-authored-by: Viktor Szakats

Reported-by: southernedge@users.noreply.github.com
Reported-by: zmcx16@users.noreply.github.com

Ref: https://www.openssl.org/docs/man3.0/man3/OPENSSL_thread_stop.html#NOTES

Fixes https://github.com/curl/curl/issues/12327
Closes https://github.com/curl/curl/pull/12408
2024-04-24 04:04:25 -04:00
..
opts rustls: remove incorrect SSLSUPP_TLS13_CIPHERSUITES flag 2024-04-24 08:59:14 +02:00
.gitignore gitignore: the generated libcurl-symbols.md 2024-01-25 16:34:06 +01:00
ABI.md docs: use present tense 2024-02-27 09:47:21 +01:00
CMakeLists.txt cmake: use namespaced custom target names 2024-04-09 21:20:54 +00:00
curl_easy_cleanup.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_easy_duphandle.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_easy_escape.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_easy_getinfo.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_easy_header.md docs: make each libcurl man specify protocol(s) 2024-03-21 15:27:06 +01:00
curl_easy_init.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_easy_nextheader.md docs: make each libcurl man specify protocol(s) 2024-03-21 15:27:06 +01:00
curl_easy_option_by_id.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_easy_option_by_name.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_easy_option_next.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_easy_pause.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_easy_perform.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_easy_recv.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_easy_reset.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_easy_send.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_easy_setopt.md TLS: add support for ECH (Encrypted Client Hello) 2024-04-16 08:10:53 +02:00
curl_easy_strerror.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_easy_unescape.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_easy_upkeep.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_escape.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_formadd.md docs: make each libcurl man specify protocol(s) 2024-03-21 15:27:06 +01:00
curl_formfree.md docs: make each libcurl man specify protocol(s) 2024-03-21 15:27:06 +01:00
curl_formget.md docs: make each libcurl man specify protocol(s) 2024-03-21 15:27:06 +01:00
curl_free.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_getdate.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_getenv.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_global_cleanup.md dllmain: Call OpenSSL thread cleanup for Windows and Cygwin 2024-04-24 04:04:25 -04:00
curl_global_init_mem.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_global_init.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_global_sslset.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_global_trace.md lib: add trace support for client reads and writes 2024-04-05 16:08:10 +02:00
curl_mime_addpart.md docs: make each libcurl man specify protocol(s) 2024-03-21 15:27:06 +01:00
curl_mime_data_cb.md docs: make each libcurl man specify protocol(s) 2024-03-21 15:27:06 +01:00
curl_mime_data.md docs: make each libcurl man specify protocol(s) 2024-03-21 15:27:06 +01:00
curl_mime_encoder.md docs: make each libcurl man specify protocol(s) 2024-03-21 15:27:06 +01:00
curl_mime_filedata.md docs: make each libcurl man specify protocol(s) 2024-03-21 15:27:06 +01:00
curl_mime_filename.md docs: make each libcurl man specify protocol(s) 2024-03-21 15:27:06 +01:00
curl_mime_free.md docs: make each libcurl man specify protocol(s) 2024-03-21 15:27:06 +01:00
curl_mime_headers.md docs: make each libcurl man specify protocol(s) 2024-03-21 15:27:06 +01:00
curl_mime_init.md docs: make each libcurl man specify protocol(s) 2024-03-21 15:27:06 +01:00
curl_mime_name.md docs: make each libcurl man specify protocol(s) 2024-03-21 15:27:06 +01:00
curl_mime_subparts.md docs: make each libcurl man specify protocol(s) 2024-03-21 15:27:06 +01:00
curl_mime_type.md docs: make each libcurl man specify protocol(s) 2024-03-21 15:27:06 +01:00
curl_mprintf.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_multi_add_handle.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_multi_assign.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_multi_cleanup.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_multi_fdset.md lib: add curl_multi_waitfds 2024-04-09 16:53:40 +02:00
curl_multi_get_handles.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_multi_info_read.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_multi_init.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_multi_perform.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_multi_poll.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_multi_remove_handle.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_multi_setopt.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_multi_socket_action.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_multi_socket_all.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_multi_socket.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_multi_strerror.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_multi_timeout.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_multi_wait.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_multi_waitfds.md curl_multi_waitfds.md: add protocol mention 2024-04-09 16:59:28 +02:00
curl_multi_wakeup.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_pushheader_byname.md docs: make each libcurl man specify protocol(s) 2024-03-21 15:27:06 +01:00
curl_pushheader_bynum.md docs: make each libcurl man specify protocol(s) 2024-03-21 15:27:06 +01:00
curl_share_cleanup.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_share_init.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_share_setopt.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_share_strerror.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_slist_append.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_slist_free_all.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_strequal.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_strnequal.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_unescape.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_url_cleanup.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_url_dup.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_url_get.md curl_url_get.md: clarify queries and fragments and CURLU_GET_EMPTY 2024-04-18 16:13:34 +02:00
curl_url_set.md curl_url_set.md: extended 2024-04-18 11:10:46 +02:00
curl_url_strerror.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_url.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_version_info.md version: add "ECH" as a feature 2024-04-16 13:24:08 +02:00
curl_version.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
curl_ws_meta.md docs: make each libcurl man specify protocol(s) 2024-03-21 15:27:06 +01:00
curl_ws_recv.md docs/libcurl: add TLS backend info for all TLS options 2024-03-22 14:07:55 +01:00
curl_ws_send.md docs: make each libcurl man specify protocol(s) 2024-03-21 15:27:06 +01:00
libcurl-easy.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
libcurl-env-dbg.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
libcurl-env.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
libcurl-errors.md TLS: add support for ECH (Encrypted Client Hello) 2024-04-16 08:10:53 +02:00
libcurl-multi.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
libcurl-security.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
libcurl-share.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
libcurl-thread.md dllmain: Call OpenSSL thread cleanup for Windows and Cygwin 2024-04-24 04:04:25 -04:00
libcurl-tutorial.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
libcurl-url.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
libcurl-ws.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
libcurl.m4 misc: Fix typos in docs and lib 2024-03-01 09:59:48 +01:00
libcurl.md docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
Makefile.am docs: dist curl*.1 and install without perl 2024-02-20 10:35:13 +01:00
Makefile.inc lib: add curl_multi_waitfds 2024-04-09 16:53:40 +02:00
mksymbolsmanpage.pl docs/libcurl: generate PROTOCOLS from meta-data 2024-03-23 18:13:03 +01:00
symbols-in-versions urlapi: add CURLU_GET_EMPTY for empty queries and fragments 2024-04-18 10:37:28 +02:00
symbols.pl docs: remove use of the word 'very' 2023-09-07 22:52:07 +02:00