Commit Graph

6377 Commits

Author SHA1 Message Date
Andy Pan
b77d627d24
tcpkeepalive: add CURLOPT_TCP_KEEPCNT and --keepalive-cnt
Closes #13885
2024-06-12 09:31:17 +02:00
Daniel Stenberg
02ff5d53a8
TODO: make it "Add missing features to TLS backends"
... instead of just mentioning CA caching.

Closes #13924
2024-06-12 08:17:44 +02:00
Orgad Shaneh
54fe8c44e1
curl: support VLAN Priority: --vlan-priority
Add --vlan-priority option to the command line tool for setting VLAN
priority.

Closes #13907
2024-06-11 23:30:34 +02:00
RainRat
1445b7ae23
misc: fix typos
Closes #13923
2024-06-11 23:22:55 +02:00
Daniel Stenberg
48952c1ab3
CURLOPT_ECH.md: remove repeated 'if'
Closes #13922
2024-06-11 16:43:35 +02:00
Daniel Stenberg
61b465208f
test1486: verify that write-out.md and tool_writeout.c are in sync
- also verify alphabetialal order in the source
- add two missing variables to write-out.md

Closes #13920
2024-06-11 13:28:21 +02:00
Daniel Stenberg
d69ee3ef83
curl: support -w '%{num_retries}
Suggested-by: Jay Guerette
Ref: https://github.com/curl/curl/discussions/13901
Closes #13910
2024-06-11 09:07:43 +02:00
Viktor Szakats
5a0b0f8188
DISTROS: add MSYS2 (native) links
Also rename existing 'MSYS2' to 'MSYS2 (mingw-w64)'.

Closes #13915
2024-06-11 00:01:10 +02:00
Stefan Eissing
c31041b17e
connection: shutdown TLS (for FTP) better
This adds connection shutdown infrastructure and first use for FTP. FTP
data connections, when not encountering an error, are now shut down in a
blocking way with a 2sec timeout.

    - add cfilter `Curl_cft_shutdown` callback
    - keep a shutdown start timestamp and timeout at connectdata
    - provide shutdown timeout default and member in
      `data->set.shutdowntimeout`.
    - provide methods for starting, interrogating and clearing
      shutdown timers
    - provide `Curl_conn_shutdown_blocking()` to shutdown the
      `sockindex` filter chain in a blocking way. Use that in FTP.
    - add `Curl_conn_cf_poll()` to wait for socket events during
      shutdown of a connection filter chain.
      This gets the monitoring sockets and events via the filters
      "adjust_pollset()" methods. This gives correct behaviour when
      shutting down a TLS connection through a HTTP/2 proxy.
    - Implement shutdown for all socket filters
      - for HTTP/2 and h2 proxying to send GOAWAY
      - for TLS backends to the best of their capabilities
      - for tcp socket filter to make a final, nonblocking
        receive to avoid unwanted RST states
    - add shutdown forwarding to happy eyeballers and
      https connect ballers when applicable.

Closes #13904
2024-06-10 13:08:12 +02:00
Daniel Stenberg
7d934267ab
CURLOPT_CONNECTTIMEOUT*: clarify, document the milliseond version
Provide an explanation in the CURLOPT_CONNECTTIMEOUT_MS page instead of
just referring to the non-MS version.

Closes #13905
2024-06-07 14:47:40 +02:00
Daniel Stenberg
9fb759f9a5
cmdline-opts: tidy up --ip-tos and --mptcp
To make them render nicer in the manpage and minor polish.

Closes #13906
2024-06-07 14:07:11 +02:00
Dorian Craps
ab6d5442e8
curl: (on linux) add MPTCP support
Multipath TCP (MPTCP), standardized in RFC8684 [1], is a TCP extension
that enables a TCP connection to use different paths.

Multipath TCP has been used for several use cases. On smartphones, MPTCP
enables seamless handovers between cellular and Wi-Fi networks while
preserving established connections. This use-case is what pushed Apple
to use MPTCP since 2013 in multiple applications [2]. On dual-stack
hosts, Multipath TCP enables the TCP connection to automatically use the
best performing path, either IPv4 or IPv6. If one path fails, MPTCP
automatically uses the other path.

To benefit from MPTCP, both the client and the server have to support
it. Multipath TCP is a backward-compatible TCP extension that is enabled
by default on recent Linux distributions (Debian, Ubuntu, Redhat, ...).
Multipath TCP is included in the Linux kernel since version 5.6 [3]. To
use it on Linux, an application must explicitly enable it when creating
the socket. No need to change anything else in the application.

This attached patch adds an --mptcp option which allows the creation of
an MPTCP socket instead of TCP on Linux. If Multipath TCP is not
supported on the system, an error will be reported. It is important to
note that if the end server doesn't support MPTCP, the connection will
continue after a seamless fallback to TCP.

Link: https://www.rfc-editor.org/rfc/rfc8684.html [1]
Link: https://www.tessares.net/apples-mptcp-story-so-far/ [2]
Link: https://www.mptcp.dev [3]
Co-developed-by: Dorian Craps (@CrapsDorian) <doriancraps@gmail.com>
Co-developed-by: Olivier Bonaventure (@obonaventure) <Olivier.Bonaventure@uclouvain.be>
Co-developed-by: Matthieu Baerts (@matttbe) <matttbe@kernel.org>
Signed-off-by: Dorian Craps <dorian.craps@student.vinci.be>

Closes #13278
2024-06-07 10:54:19 +02:00
Orgad Shaneh
3c20ae08b9
curl: support IP Type of Service / Traffic Class: --ip-tos
Add --ip-tos option to the command line tool for setting TOS for IPv4 or
Traffic Class for IPv6.

Closes #13606
2024-06-07 10:48:40 +02:00
Daniel Stenberg
ad837e9df8
cmdline-opts/ech.md: shorten the help text
To make --help look sensible again

Closes #13894
2024-06-05 13:58:48 +02:00
Daniel Stenberg
5bfd0cd9b8
cmdline-opts/_PROTOCOLS.md: mention WS(S)
Closes #13891
2024-06-05 12:53:29 +02:00
Daniel Stenberg
5e2e470f20
cmdline-opts/fail.md: expand and clarify
Closes #13890
2024-06-05 11:00:46 +02:00
Daniel Stenberg
881e9a616f
doh-insecure.md: expand
Closes #13889
2024-06-05 10:59:48 +02:00
Daniel Stenberg
65651dc02b
cmdline: expand proxy option explanations
- do less references to other options
- provide more specific text about proxies
- added more see-also references

Closes #13887
2024-06-05 10:35:56 +02:00
Daniel Stenberg
6ceb23dc09
cmdline-opts: expand the parallel explanations
Closes #13886
2024-06-05 10:34:55 +02:00
Daniel Stenberg
1313da9a1d
CURLOPT_INTERFACE.md: quote the less-than and larger-than
Fixes the warnings shown on stderr.

Follow-up from 3060557af7

Closes #13883
2024-06-05 08:44:58 +02:00
Daniel Stenberg
68680ba544
cmdline-opts/interface.md: expand the documentation
Explain the syntax it supports.

Closes #13882
2024-06-05 08:36:34 +02:00
Orgad Shaneh
3060557af7
socket: support binding to interface *AND* IP
Introduce new notation for CURLOPT_INTERFACE / --interface:
ifhost!<interface>!<host>

Binding to an interface doesn't set the address, and an interface can
have multiple addresses.

When binding to an address (without interface), the kernel is free to
choose the route, and it can route through any device that can access
the target address, not necessarily the one with the chosen address.

Moreover, it is possible for different interfaces to have the same IP
address, on which case we need to provide a way to be more specific.

Factor out the parsing part of interface option, and add unit tests:
1663.

Closes #13719
2024-06-04 23:47:54 +02:00
Jay Satiro
fd2315e5ae examples/threaded-ssl: remove locking callback code
- Remove the locking callback code that demonstrates how to meet
  requirements of threading libraries (mainly OpenSSL).

Locking callback code has not been needed for many years. According to
the documentation for OpenSSL and GnuTLS they are thread-safe by design,
assuming support for the underlying OS threading API is built-in.

Ref: https://github.com/curl/curl/pull/13850#issuecomment-2143538458

Closes https://github.com/curl/curl/pull/13851
2024-06-04 13:00:21 -04:00
Stefan Eissing
5dd8f13bfc
gnutls: support CA caching
- similar to openssl, use a shared 'credentials' instance
  among TLS connections with a plain configuration.
- different to openssl, a connection with a client certificate
  is not eligible to sharing.
- document CURLOPT_CA_CACHE_TIMEOUT in man page

Closes #13795
2024-06-04 08:17:55 +02:00
Andy Pan
f51fa8f169
tcpkeepalive: support setting TCP keep-alive parameters on Solaris <11.4
Solaris didn't support TCP_KEEPIDLE and TCP_KEEPINTVL until 11.4,
before that it use TCP_KEEPALIVE_THRESHOLD and TCP_KEEPALIVE_ABORT_THRESHOLD
as the substitute. Therefore, for Solaris <11.4 we need to use this substitute
for setting TCP keep-alive parameters.

Ref:
https://docs.oracle.com/cd/E86824_01/html/E54777/tcp-7p.html
https://docs.oracle.com/cd/E88353_01/html/E37851/tcp-4p.html

Closes #13864
2024-06-03 23:04:05 +02:00
Daniel Stenberg
4edbd52267
KNOWN_BUGS: quiche: QUIC connection is draining
Closes #12037
Closes #13867
2024-06-03 10:46:10 +02:00
Daniel Stenberg
8e5c5c1724
KNOWN_BUGS: aws-sigv4 has problems with particular URLs
Closes #13058
Closes #13866
2024-06-03 10:45:24 +02:00
Daniel Stenberg
2a053ca801
KNOWN_BUGS: aws-sigv4 does not handle multipart/form-data correctly
Closes #13351
Closes #13866
2024-06-03 10:45:16 +02:00
Lee Li
6a7ad8911d
request.md: language fix
improved for better readability and correctness

Closes #13854
2024-06-02 17:12:25 +02:00
Daniel Stenberg
655d44d139
urlapi: add CURLU_NO_GUESS_SCHEME
Used for extracting:

- when used asking for a scheme, it will return CURLUE_NO_SCHEME if the
  stored information was a guess

- when used asking for a URL, the URL is returned without a scheme, like
  when previously given to the URL parser when it was asked to guess

- as soon as the scheme is set explicitly, it is no longer internally
  marked as guessed

The idea being:

1. allow a user to figure out if a URL's scheme was set as a result of
  guessing

2. extract the URL without a guessed scheme

3. this makes it work similar to how we already deal with port numbers

Extend test 1560 to verify.

Closes #13616
2024-06-01 23:51:42 +02:00
Daniel Stenberg
80aa519545
wolfssl: support CA caching
As a bonus, add SSLSUPP_CA_CACHE to let TLS backends signal its support
for this so that *setopt() return error if there is no support.

Closes #13786
2024-06-01 23:50:36 +02:00
Daniel Stenberg
e78913e6b5
noproxy: patterns need to be comma separated
or they will not parse correctly.

Mentioned in DEPRECATED since Janurary 2023 (in 7ad8a7ba9e).

Closes #13789
2024-06-01 12:25:13 +02:00
Daniel Stenberg
8df910b79c
curl_multi_poll.md: expand the example with an custom file descriptor
Closes #13842
2024-06-01 00:24:55 +02:00
Christian Heusel
d6abd49df8
DISTROS: add a link to the list archive
Related to https://github.com/curl/curl/discussions/13833

Signed-off-by: Christian Heusel <christian@heusel.eu>
Closes #13843
2024-06-01 00:24:06 +02:00
Viktor Szakats
dace891e38
tidy-up: use consistent casing for Windows directories
C:\Windows\System32

Closes #13832
2024-05-30 14:40:12 +02:00
pszlazak
7d5b0ba3ff
get.d: clarify the explanation
Closes #13706
2024-05-30 08:33:33 +02:00
Daniel Stenberg
abff12c5a9
curl_url_set.md: libcurl only parses :// URLs
Make it clearer in the documentation.

Closes #13821
2024-05-30 08:30:17 +02:00
Daniel Stenberg
24b66a1de3
cd2nroff: use an empty "##" to signal end of .IP sequence
Like when we list a series of options and then want to add "normal" text
again afterwards.

Without this, the indentation level wrongly continues even after the
final "##" header, making following text wrongly appear to belong to the
header above.

Adjusted several curldown files to use this.

Fixes #13803
Reported-by: Jay Satiro
Closes #13806
2024-05-29 12:49:40 +02:00
Viktor Szakats
53b4dfe405
examples: delete unused includes
Delete a bunch of unnecessary-looking headers from some examples. This
is known to be tricky on AIX (perhaps also in other less-tested envs).

Let me know if any of this looks incorrect or outright fails on some
systems.

Follow-up to d4b8589055 #13771
Closes #13785
2024-05-28 00:27:04 +02:00
Viktor Szakats
0e176cabe4
cmake: whitespace, formatting/tidy-up in comments
Also correct casing in a few option descriptions.

Closes #13711
2024-05-27 18:07:10 +02:00
Daniel Stenberg
2d00edcaf1
TODO: remove some old, clarify, add something
Closes #13788
2024-05-27 10:58:28 +02:00
Daniel Stenberg
b5655269b3
TODO: Add "Share CA cache" + "CA caching to more TLS backends"
Closes #13787
2024-05-27 10:57:50 +02:00
Viktor Szakats
d4b8589055
examples: fix compiling with MSVC
- `websocket.c`: use `Sleep()` on Windows.
  `sleep()` and `unistd.h` are not available in MSVC.

- `http2-upload.c`: use local `gettimeofday()` implementation when
  compiled with MSVC.
  (Alternate solution is to disable the trace function for MSVC.)
  Public domain code copied and adapted from libssh2:
  e973493f99/src/misc.c (L719-L743)

- silence compiler warning for deprecated `inet_addr()`.
  Also drop duplicate winsock2 include.
  ```
  curl\docs\examples\externalsocket.c(125,32): error C2220: the following warning is treated as an error [curl\bld\docs\examples\curl-example-externalsocket.vcxproj]
  curl\docs\examples\externalsocket.c(125,32): warning C4996: 'inet_addr': Use inet_pton() or InetPton() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings [curl\bld\docs\examples\curl-example-e
  ```
  Ref: https://github.com/curl/curl/actions/runs/9227337318/job/25389073450#step:4:95

- silence an MSVC compiler warning. This is in conflict with `checksrc`
  rules, so silence the rule in favour of the warning-free C syntax.
  ```
  curl\docs\examples\multi-legacy.c(152,1): error C2220: the following warning is treated as an error [curl\bld\docs\examples\curl-example-multi-legacy.vcxproj]
  curl\docs\examples\multi-legacy.c(152,1): warning C4706: assignment within conditional expression [curl\bld\docs\examples\curl-example-multi-legacy.vcxproj]
  ```
  Ref: https://github.com/curl/curl/actions/runs/9227337318/job/25389073450#step:4:226

- do not use `sys/time.h` and `unistd.h` in Windows builds.
  Some of these includes look unnecessary. Subject to another PR.

Cherry-picked from #13766
Closes #13771
2024-05-26 22:43:04 +02:00
Jonathan Matthews
21eb2b55a6 docs/cmdline-opts: fix mail-auth example TLD typo
Closes: #13784
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
2024-05-26 21:11:10 +02:00
Daniel Stenberg
4cc5657247
docs/Makefile.am: make curl-config.1 install
on "make install" like it should

Follow-up to 60971d665b

Closes #13741
2024-05-22 09:26:55 +02:00
Daniel Stenberg
bbb0cecf73
THANKS: add contributors from 8.8.0 2024-05-22 07:54:25 +02:00
Stephen Farrell
10a523c5e5
docs/ECH: typo/clarification
Closes #13727
2024-05-21 15:09:24 +02:00
Jay Satiro
9aae9bf817 openssl: revert keylog_callback support for LibreSSL
- Revert to the legacy TLS 1.2 key logging code for LibreSSL.

- Document SSLKEYLOGFILE for LibreSSL is TLS 1.2 max.

Prior to this change if the user specified a filename in the
SSLKEYLOGFILE environment variable and was using LibreSSL 3.5.0+ then
an empty file would be created and no keys would be logged.

This is effectively a revert of e43474b4 which changed openssl.c to use
SSL_CTX_set_keylog_callback for LibreSSL 3.5.0+. Unfortunately LibreSSL
added that function only as a stub that doesn't actually do anything.

Reported-by: Gonçalo Carvalho

Fixes https://github.com/curl/curl/issues/13672
Closes https://github.com/curl/curl/pull/13682
2024-05-20 03:55:40 -04:00
Daniel Stenberg
6d1e144f12
CURLOPT_WRITEFUNCTION.md: fix the callback proto in the example
Reported-by: Michael Litwak
Fixes #13681
Closes #13687
2024-05-17 14:36:59 +02:00
Juliusz Sosinowicz
4c46e277b2
vquic-tls: use correct cert name check API for wolfSSL
wolfSSL_X509_check_host checks the peer name against the alt names and
the common name.

Fixes #13487
Closes #13680
2024-05-16 22:44:29 +02:00
Daniel Stenberg
76dba79028
curl_easy_pause.md: use correct defines in example
Spotted-by: Harry Sintonen
Closes #13664
2024-05-15 23:22:17 +02:00
Daniel Stenberg
27c9b375f6
DEPRECATE.md: TLS libraries without 1.3 support
curl drops support for TLS libraries without TLS 1.3 capability after
May 2025.

It requires that a curl build using the library should be able to
negotiate and use TLS 1.3, or else it is not good enough. We support a
vast amount of other TLS libraries that are likely to satisfy users
better.

Closes #13544
2024-05-15 10:32:55 +02:00
Viktor Szakats
4eb4d660d6
tidy-up: whitespace [ci skip] 2024-05-14 16:49:47 +02:00
Daniel Stenberg
87b6fe1695
BUG-BOUNTY.md: clarify the third party situation
We do not pay bounties for problems in other libraries.

Closes #13560
2024-05-14 16:23:42 +02:00
Daniel Stenberg
7d8d25174c
docs/cmdline-opts: mention STARTTLS for --ssl and --ssl-reqd
... since users might look for those terms in the manpage.

Closes #13590
2024-05-12 17:39:20 +02:00
Viktor Szakats
5b9955e0bd
examples: fix/silence -Wsign-conversion
- extend `FD_SET()` hack to all platforms (was only Cygwin).
  Warnings may also happen in other envs, e.g. OmniOS.
  Ref: https://github.com/libssh2/libssh2/actions/runs/8854199687/job/24316762831#step:3:2021

- tidy-up `CURLcode` vs `int` use.

- cast an unsigned to `long` before passing to `curl_easy_setopt()`.

Cherry-picked from #13489
Follow-up to 3829759bd0 #12489
Closes #13501
2024-05-11 11:11:32 +02:00
Jay Satiro
798a37b25e lib: clear the easy handle's saved errno before transfer
- Clear data->state.os_errno before transfer.

- Explain the change in behavior in the CURLINFO_OS_ERRNO doc.

- Add to the CURLINFO_OS_ERRNO doc the list of libcurl network-related
  errors that may cause the errno to be saved.

data->state.os_errno is saved before libcurl returns a network-related
failure such as connection failure. It is accessible to the user via
CURLINFO_OS_ERRNO so they can get more information about the failure.

Prior to this change it wasn't cleared before transfer, so if a user
retrieved the saved errno it could be from a previous transfer. That is
because an errno is not always saved for network-related errors.

Closes https://github.com/curl/curl/pull/13574
2024-05-10 18:26:32 -04:00
Stefan Eissing
b7c7dffe35
ftp: add tracing support
- add `Curl_trc_feat_ftp` for tracing via trace config
- add macro CURL_TRC_FTP(data, fmt, ...)
- replace DEBUGF(infof()) statements in ftp.c by CURL_TRC_FTP()
- always trace FTP connection state

Closes #13580
2024-05-10 23:39:48 +02:00
Jay Satiro
edc5b3502c docs: fix some CURLINFO examples
- improve getinfo result check for example sections:
  CURLINFO_ACTIVESOCKET, CURLINFO_LASTSOCKET, CURLINFO_SSL_VERIFYRESULT,
  CURLINFO_PROXY_SSL_VERIFYRESULT

- fix getinfo result check for example sections:
  CURLINFO_NUM_CONNECTS, CURLINFO_OS_ERRNO

- fix verify result check for example sections:
  CURLINFO_PROXY_SSL_VERIFYRESULT

Bug: https://github.com/curl/curl/discussions/13557#discussion-6625507
Reported-by: farazrbx@users.noreply.github.com

Closes https://github.com/curl/curl/pull/13559
2024-05-10 01:12:36 -04:00
Daniel Stenberg
3b4b6bd1df
KNOWN_BUGS: gssapi library name + version is missing in curl_version_info()
Closes #13492
Closes #13570
2024-05-09 12:04:19 +02:00
Daniel Stenberg
c294f9cb56
lib: make protocol handlers store scheme name lowercase
- saves a lowercase operation when the "[scheme]_proxy" name is
  generated
- appears less "shouting"
- update test 970, 972, 1438 and 1536

Closes #13553
2024-05-08 09:39:30 +02:00
Daniel Gustafsson
46d7214ca9 tls: Remove EXAMPLEs from deprecated options
CURLOPT_EGDSOCKET and CURLOPT_RANDOM_FILE are both completely dead
so remove their example sections since the code there is useless.
There is still a way to inject a random file for OpenSSL older than
1.1.0 but it's not what the example showed (and it's not even done
with this option) so we refrain from documenting it here.

Closes: #13540
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
2024-05-06 20:55:27 +02:00
Daniel Stenberg
7490d5488e
EXPERIMENTAL: add graduation requirements for each feature
Starting now, experimental features should have a set of documentated
requirements of what is needed for the feature to graduate.

This adds requirements to all existing experiments.

Closes #13541
2024-05-06 17:05:04 +02:00
Ivan
a74f4d9518 misc: fix typos, quoting and spelling
Fix wording of comments, and misquotings where `' is markdown parsed
where it shouldn't be, and remove a misspelled preprocessor comment
which really isn't needed (and removing it makes it match surrounding
code better).

Closes: #13538
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
2024-05-06 10:35:53 +02:00
Viktor Szakats
b6305011ec
DISTROS: add patch and issues link for curl-for-win
curl-for-win sometimes includes curl patches that were already merged in
master, but not yet part of a stable release.

Also include the Issues link. Build-specific issues are handled there.

Ref: #13493
Closes #13499
2024-04-29 16:45:58 +02:00
Stefan Eissing
b06619d0a3
tests: add SNI and peer name checks
- connect to DNS names with trailing dot
- connect to DNS names with double trailing dot
- rustls, always give `peer->hostname` and let it
  figure out SNI itself
- add SNI tests for ip address and localhost
- document in code and TODO that QUIC with ngtcp2+wolfssl
  does not do proper peer verification of the certificate
- mbedtls, skip tests with ip address verification as not
  supported by the library

Closes #13486
2024-04-29 08:20:35 +02:00
Daniel Stenberg
c04664ad35
curl_getdate.md: document two-digit year handling
Mentioned-by: Paul Gilmartin
Ref: https://curl.se/mail/archive-2024-04/0014.html
Closes #13494
2024-04-29 08:16:20 +02:00
Viktor Szakats
dfdd978f7c
cmake: add BUILD_EXAMPLES option to build examples
You can enable it with `-DBUILD_EXAMPLES=ON`.

To match autotools' `make examples` feature.
Windows (static) builds not tested.

Also enable examples in a pair of CI jobs.

Apply related updates to the macOS CI workflow:
- drop unused `CXX` envs.
- drop no longer needed `-Wno-error=undef -Wno-error=conversion` flags.
- pass `-Wno-deprecated-declarations` to GCC too (for `BUILD_EXAMPLES`).
- document why `-Wno-deprecated-declarations` is necessary.

Closes #13491
2024-04-29 00:26:50 +02:00
Jan Venekamp
fba9afebba
mbedTLS: implement CURLOPT_SSL_CIPHER_LIST option
Use a lookup list to set the cipher suites, allowing the
ciphers to be set by either openssl or IANA names.

To keep the binary size of the lookup list down we compress
each entry in the cipher list down to 2 + 6 bytes using the
C preprocessor.

Closes #13442
2024-04-24 14:30:37 +02:00
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
Jan Venekamp
3b8db84c1b
rustls: remove incorrect SSLSUPP_TLS13_CIPHERSUITES flag
The rustls backend advertises SSLSUPP_TLS13_CIPHERSUITES, but
the code does not actually seem to support it (yet?). Removed
the flag and corrected documentation.

Closes #13452
2024-04-24 08:59:14 +02:00
Daniel Stenberg
229c144fe8
curl_url_get.md: clarify queries and fragments and CURLU_GET_EMPTY
Follow-up to 3eac21d86b

Closes #13407
2024-04-18 16:13:34 +02:00
Daniel Stenberg
1634330474
curl_url_set.md: extended
Closes #13404
2024-04-18 11:10:46 +02:00
Daniel Stenberg
3eac21d86b
urlapi: add CURLU_GET_EMPTY for empty queries and fragments
By default the API inhibits empty queries and fragments extracted.
Unless this new flag is set.

This also makes the behavior more consistent: without it set, zero
length queries and fragments are considered not present in the URL. With
the flag set, they are returned as a zero length strings if they were in
fact present in the URL.

This applies when extracting the individual query and fragment
components and for the full URL.

Closes #13396
2024-04-18 10:37:28 +02:00
Daniel Stenberg
c03556fb18
ROADMAP: remove completed entries, mention websocket 2024-04-17 10:35:12 +02:00
Daniel Stenberg
c2372e2a15
THANKS-filter: name fixes 2024-04-17 09:48:45 +02:00
MonkeybreadSoftware
add22feeef
idn: add native AppleIDN (icucore) support for macOS/iOS
I implemented the IDN functions for macOS and iOS using Unicode
libraries coming with macOS and iOS.

Builds and runs here on macOS 14.2.1. Also verified to load and
run on older macOS version 10.13.

Build requires macOS SDK 13 or equivalent.

Set `-DUSE_APPLE_IDN=ON` CMake option to enable it.
With autotools and other build tools, set these manual options:
```
CPPFLAGS=-DUSE_APPLE_IDN
LIBS=-licucore
```

Completes TODO 1.6.

TODO: add autotools option and feature-detection.

Refs: #5330 #5371
Co-authored-by: Viktor Szakats
Closes #13246
2024-04-17 00:24:09 +02:00
Daniel Stenberg
d28f74913c
dmaketgz: release tarball generation using docker
For easier reproducibility.

Mention using this script in RELEASE-PROCEDURE

Closes #13388
2024-04-16 23:38:55 +02:00
Viktor Szakats
5d3016adf7
dist: add ECH files to tarball
Also sort `EXTRA_DIST` list in `tests/Makefile.am` and make it diffable.

Follow-up to a362962b72 #11922
Closes #13381
2024-04-16 19:47:13 +02:00
Daniel Stenberg
5e3fd347c5
version: add "ECH" as a feature
If available

Follow-up to a362962b7
Closes #13378
2024-04-16 13:24:08 +02:00
Daniel Stenberg
a1ecd0ba6b
CURLOPT_ECH: polish
- remove the pointer to build instructions, it won't work in manpages
- add see-also
- minor white space edits

Closes #13379
2024-04-16 09:58:45 +02:00
Viktor Szakats
f81f60206d
tidy-up: whitespace [ci skip] 2024-04-16 09:53:39 +02:00
Stephen Farrell
a362962b72
TLS: add support for ECH (Encrypted Client Hello)
An EXPERIMENTAL feature used with CURLOPT_ECH and --ech.

Closes #11922
2024-04-16 08:10:53 +02:00
Daniel Stenberg
565d28dc8e
RELEASE-NOTES: synced 2024-04-15 23:47:08 +02:00
Daniel Stenberg
dde4b3855e
curl_version_info: provide librtmp version
Ref: https://github.com/curl/curl/pull/13364#issuecomment-2054151942
Reported-by: talregev on github
Closes #13368
2024-04-15 16:48:34 +02:00
blankie
e1f1ec028a
docs: clarify CURLOPT_MAXFILESIZE and CURLOPT_MAXFILESIZE_LARGE
The bounds of the size parameter were not specified, and nor was it
specified how to disable the maximum file size check.

The documentation also incorrectly stated that CURLOPT_MAXFILESIZE
always returns CURLE_OK and that CURLOPT_MAXFILESIZE_LARGE only returns
CURLE_OK or CURLE_UNKNOWN_OPTION.

It also did not mention what the default value is, which is zero. This
commit updates the documentation to make note of all these things.

Closes #13372
2024-04-15 13:38:27 +02:00
Dan Fandrich
de66e8ad38 DISTROS: mark rolling release distros
These are ones that are unlikely to have back-ported curl patches.

Closes #13353
2024-04-12 11:28:24 -07:00
Viktor Szakats
0a4419ae4c
dist: add files missing from release tarball
Closes #13346
2024-04-11 15:52:08 +00:00
Toon Claes
0f7be5a519
docs: add CURLOPT_NOPROGRESS to CURLOPT_XFERINFOFUNCTION example
It's important to set `CURLOPT_NOPROGRESS` to `0` if you want your
transfer callback function, set by `CURLOPT_XFERINFOFUNCTION`, getting
called. To emphasize this to the users, add this to the code example.

Closes #13348
2024-04-11 15:59:53 +02:00
RainRat
1087937992
misc: fix typos
Closes #13344
2024-04-11 15:44:22 +02:00
Colin Leroy-Mira
bfe54b0e88
file: add support for getting basic directory listings
Not supported on Windows (yet)

Closes #13137
2024-04-11 12:37:12 +02:00
Viktor Szakats
3d569aaaf8
cmake: use namespaced custom target names
Rename custom target to namespaced (unique) names to avoid colliding
with 3rd-party projects (e.g. libzip) built together with curl.

Reported-by: hammlee96 on github
Fixes #13324
Closes #13326
2024-04-09 21:20:54 +00:00
Daniel Stenberg
187b23b0a4
curl_multi_waitfds.md: add protocol mention
Follow-up to 02beac6bb6
2024-04-09 16:59:28 +02:00
Dmitry Karpov
02beac6bb6
lib: add curl_multi_waitfds
New function call, similar to curl_multi_fdset()

Closes #13135
2024-04-09 16:53:40 +02:00
Daniel Stenberg
50def7c881
NTLM_WB: drop support
The feature has not worked for months and has been marked as DEPRECATED
for six+ months.

Closes #13249
2024-04-08 13:58:58 +02:00
Daniel Stenberg
bcc2e90e45
docs/cmdline-opts: invoke managen using a relative path
... no need to use an absolute path, that makes the build unncessarily
fail if invoked using a different mount point. managen now takes options
to find the input files.

Update test1478 to provide the dir arguments to managen

Closes #13281
2024-04-08 10:27:27 +02:00
Daniel Stenberg
995b42eb33
DISTROS: Cygwin updates
Brought-by: Brian Inglis
Fixes #13258
Co-authored-by: Viktor Szakats
Closes #13279
2024-04-05 16:09:15 +02:00
Stefan Eissing
0b28ece657
lib: add trace support for client reads and writes
- add `CURL_TRC_READ()` and `CURL_TRC_WRITE()`
- use in generic client writers and readers, as well
  as http headers, chunking and websockets

Closes #13223
2024-04-05 16:08:10 +02:00
Viktor Szakats
2cac6a49b3
cmake: fixup DEPENDS filename
Fixing:
```
make[2]: Circular docs/curl-config.1 <- docs/curl-config.1 dependency dropped.
make[2]: Circular docs/mk-ca-bundle.1 <- docs/mk-ca-bundle.1 dependency dropped.
```
Ref: https://github.com/curl/curl/actions/runs/8559617487/job/23456740844?pr=13282#step:6:18

Follow-up to 5023ffad2c #13197
Closes #13283
2024-04-04 22:58:51 +00:00
Viktor Szakats
bb84f82476
cmake: speed up libcurl doc building again
This time limit the number of files per command to avoid exceeding
limitations of certain OS/shell envs.

Such known env is Windows with the `cmd.exe` shell, which features an
8K command-line length limit to this day.

Allowlisting `UNIX` to have no limit and using a limit of 200 for other
envs to be safe. If there is a way to detect `cmd.exe` and/or we know
which precise envs are sensitive to this, we can tweak these conditions
further.

Even with the low limit, this patch reduces external commands by 200x,
making builds much faster.

Ref: #12762 2620aa930b (initial)
Ref: #13047 f03c85635f (revert)

Reviewed-by: Daniel Stenberg
Closes #13207
2024-04-04 09:21:17 +00:00