Commit Graph

32558 Commits

Author SHA1 Message Date
Viktor Szakats
5942b7934d
cmake: fix feature and protocol lists for SecureTransport
NTLM was missing from the features list, and SMB/SMBS from
the protocols list in SecureTransport builds.

Follow-up to 76a9c3c4be #3619

Reported-by: Tal Regev
Bug: https://github.com/curl/curl/pull/13963#issuecomment-2178791390
Closes #14065
2024-07-01 10:31:19 +02:00
Daniel Stenberg
582429ed47
curl_str[n]equal.md: tidy up text to make them stand-alone
Previously this was one single manpage for two functions but as they are
two separate ones since a while back, they should each clearly document
their single specific functions.

Follow-up to eefcc1bda4

Closes #14068
2024-07-01 09:38:52 +02:00
Daniel Stenberg
0cc4b3ab0b
RELEASE-NOTES: synced 2024-06-30 23:16:54 +02:00
Tal Regev
e26cbe20cb
GHA: use vcpkg to install packages for MSVC jobs
- enable new dependencies for existing jobs.

- add cache for vcpkg packages.

- tidy-up CMake options and environment for vcpkg.

Closes #13979
2024-06-30 23:10:24 +02:00
Daniel Stenberg
e02b43ecf3
curl_mprintf.md: add missing comma 2024-06-30 16:11:52 +02:00
Daniel Stenberg
08fa47317a
CURLOPT_TLSAUTH_PASSWORD/USERNAME.md: language fixups
- relies *on* TLS SRP
- *for* the specific TLS backends

Closes #14061
2024-06-30 16:04:15 +02:00
Daniel Stenberg
29789ae312
docs/libcurl: polish the single-line descriptions
- use imperative form
- use lowercase
- no period
- unify some phrases
- fix curl_multi_socket and curl_multi_socket_all to keep their own
  descriptions

Closes #14062
2024-06-30 16:03:03 +02:00
Viktor Szakats
0f26abeef1
cmake: alpha-sort feature list
Like autotools does.

Closes #14063
2024-06-30 11:19:37 +02:00
renovate[bot]
93a28232d3
GHA: update github/codeql-action digest to b611370
Closes #14058
2024-06-29 22:51:26 +02:00
Tatsuhiro Tsujikawa
9feb85a1e3
vquic: fix UDP_GRO struct cmsghdr data type
The data type for UDP_GRO in struct cmsghdr is int. Limit the usage of
UDP_GRO to linux only because it is not portable.

Closes #14056
2024-06-29 22:28:22 +02:00
Sertonix
4fab113d4e
mk-ca-bundle.pl: delay 'curl -V' execution until it is needed
Avoid an `Can't exec "curl"` message when curl is not actually needed.

Closes #14060
2024-06-29 22:26:19 +02:00
Daniel Stenberg
5c873da92a
src/Makefile.am: remove SUBDIRS assignment
It was once used to continue into ../docs but is just leftovers now.

Closes #14054
2024-06-29 22:22:23 +02:00
z2_
3a537a4db9
x509asn1: remove superfluous free() 2024-06-28 14:45:47 +02:00
Stefan Eissing
185a05e943
ngtcp2+quictls: fix cert-status use
- add test for --cert-status on all http versions

Reported-by: Dexter Gerig
Fixes #14049
Closes #14050
2024-06-28 14:34:51 +02:00
Daniel Stenberg
6e95e3f7af
RELEASE-PROCEDURE.md: update release date 2024-06-28 14:30:04 +02:00
Daniel Stenberg
e63e0d60b5
managen: insert final .fi for files ending with a quote
When an individual file ended with a quote (typically an example), the
render function would return without ending the quote correctly with a
".fi" (fill in) in the manpage output.

This made the additional text provided below to render wrongly.

Closes #14048
2024-06-28 12:30:55 +02:00
Junho Choi
ad7a20d506
quic: update to quiche 0.22.0
quiche 0.22.0 will set SONAME in libquiche.so (libquiche.so.0) for
linux/BSDs. Install a symlink with SONAME.

Closes #14030
Closes #14046
2024-06-28 09:16:30 +02:00
Daniel Stenberg
2d3a51e367
managen: introduce "Multi: per-URL"
For -O, -o and -T that are used once per specified URL.

Closes #14045
2024-06-28 08:42:47 +02:00
Daniel Stenberg
9acf759455
quiche: fix operand of ‘?:’ changes signedness
... from ‘int’ to ‘curl_uint64_t’

Closes #14041
2024-06-27 23:15:18 +02:00
Daniel Stenberg
7fce488cd8
GHA: add --enable-werror to the quiche job
Closes #14041
2024-06-27 23:14:57 +02:00
Daniel Stenberg
282b9fe8ff
KNOWN_BUGS: three new bugs
These have lingered in the issue tracker for a long time without action.
We don't expect any fixes in the near term either. Move them to the
KNOWN_BUGS document.

Closes #12177
Closes #12171
Closes #13350

Closes #14042
2024-06-27 16:49:22 +02:00
Viktor Szakats
1ccdad64ef
CI: add whitespace checker
Fix issues detected.

Also:

- One of the `.vc` files used LF EOLs, while the other didn't.
  Make that one also use LF EOLs, as this is apparently supported by
  `nmake`.

- Drop `.dsw` and `.btn` types from `.gitattributes`.
  The repository doesn't use them.

- Sync section order with the rest of files in
  `tests/certs/EdelCurlRoot-ca.prm`.

- Indent/align `.prm` and `.pem` files.

- Delete dummy `[something]` section from `.prm` and `.pem` files.

Mental note:
MSVC `.sln` files seem to accept spaces for indentation and also support
LF line-endings. I cannot test this and I don't know what's more
convenient when updating them, so left them as-is, with specific
exclusions.

Closes #14031
2024-06-27 13:33:30 +02:00
Viktor Szakats
8f67e81735
CI: fix typo in job name
Closes #14040
2024-06-27 13:33:30 +02:00
Stefan Eissing
5b614224e4
tests/httpd: adjust ReadBufferSize for better performance
- list httpd and caddy versions in scorecard run

Closes #14039
2024-06-27 12:49:39 +02:00
Daniel Stenberg
cdbfad96ff
runtests: fix %VERNUM
It needs to be set to the leading digits and dots only, so that the
`-[date]` suffix strings are not included, as those used in the daily
snapshots.

Fixes #14035
Reported-by: Marcel Raad
Closes #14036
2024-06-27 12:48:35 +02:00
Philip H
f7c19b45dc
CI/synopsis.yml: run on .md files
Reported-by: Viktor Szakats
Fixes #14032
Closes #14037
2024-06-27 12:47:29 +02:00
Daniel Stenberg
41e0250411
verify-synopsis.pl: work with .md files
Ref: #14037
Closes #14038
2024-06-27 12:45:06 +02:00
Daniel Stenberg
fde2143df7
conncache: done always evaluates to false
Follow-up to c9b95c0bb3

Spotted by CodeSonar

Reviewed-by: Stefan Eissing
Closes #14034
2024-06-27 12:43:28 +02:00
Daniel Stenberg
9a49af5fd8
lib: add a few DEBUGASSERT(data) to aid code analyzers
... where 'data' is assumed to always work.

Closes #14033
2024-06-27 10:31:13 +02:00
Daniel Stenberg
ffe193c991
RELEASE-NOTES: synced 2024-06-27 09:23:38 +02:00
Viktor Szakats
f0d8db152a
tidy-up: use /usr/bin/env perl shebang
Most Perl scripts already used it. Sync up the few outliers.

Closes #14029
2024-06-26 23:58:10 +02:00
Stefan Eissing
8d067e61b0
quic: openssl quic, cmake and doc version update to 3.3.0
Closes #14028
2024-06-26 23:10:50 +02:00
Stefan Eissing
bb09a304bb
http/3: add shutdown support
- openssl-quic shutdown handling
- ngtcp2 shutdown handling
- quiche shutdown handling
- add test_19_06 for verfication

Reported-by: Dexter Gerig
Closes #14027
Fixes #14022
2024-06-26 23:09:32 +02:00
Daniel Stenberg
868ae0673c
tests: verify managen
1705: verifies the manpage output

1706: verifies the ascii output

Closes #14025
2024-06-26 15:49:26 +02:00
Daniel Stenberg
0e73b69b3d
runtests: support %DATE for YYYY-MM-DD of right now 2024-06-26 15:49:26 +02:00
Daniel Stenberg
348882ee79
runtests: support %VERNUM
For the plain version number of the built curl without -DEV etc. Only
digits and dots.
2024-06-26 15:49:26 +02:00
Daniel Stenberg
c4187ea5fa
managen: only output .RE for manpage output
For ascii they are just rubbish.

Closes #14025
2024-06-26 15:49:26 +02:00
Tatsuhiro Tsujikawa
a571afc02e
quic: enable UDP GRO
Closes #14012
2024-06-26 15:15:23 +02:00
Stefan Eissing
411af83010
quic: require at least OpenSSL 3.3 for QUIC
- when checking for QUIC support in OpenSSL, also check
  for it being at least 3.3.0
- remove workarounds for features buggy or missing in 3.2

Closes #14026
2024-06-26 13:21:52 +02:00
Daniel Stenberg
4d58ed2d2c
FILEFORMAT.md: mentioned <file[num]> for "client"
They can be used to create more files.

Closes #14024
2024-06-26 10:55:40 +02:00
Marcel Raad
4a512bd3f2
system_win32: add missing curl.h include
It's required for `CURLcode`.

Closes https://github.com/curl/curl/pull/14019
2024-06-26 10:05:32 +02:00
Daniel Stenberg
10cc302090
TODO: specify which response codes that make -f/--fail return error
Suggestion from the user survey 2024

Closes #14020
2024-06-26 08:41:41 +02:00
Stefan Eissing
c9b95c0bb3
lib: graceful connection shutdown
When libcurl discards a connection there are two phases this may go
through: "shutdown" and "closing". If a connection is aborted, the
shutdown phase is skipped and it is closed right away.

The connection filters attached to the connection implement the phases
in their `do_shutdown()` and `do_close()` callbacks. Filters carry now a
`shutdown` flags next to `connected` to keep track of the shutdown
operation.

Filters are shut down from top to bottom. If a filter is not connected,
its shutdown is skipped. Notable filters that *do* something during
shutdown are HTTP/2 and TLS. HTTP/2 sends the GOAWAY frame. TLS sends
its close notify and expects to receive a close notify from the server.

As sends and receives may EAGAIN on the network, a shutdown is often not
successful right away and needs to poll the connection's socket(s). To
facilitate this, such connections are placed on a new shutdown list
inside the connection cache.

Since managing this list requires the cooperation of a multi handle,
only the connection cache belonging to a multi handle is used. If a
connection was in another cache when being discarded, it is removed
there and added to the multi's cache. If no multi handle is available at
that time, the connection is shutdown and closed in a one-time,
best-effort attempt.

When a multi handle is destroyed, all connection still on the shutdown
list are discarded with a final shutdown attempt and close. In curl
debug builds, the environment variable `CURL_GRACEFUL_SHUTDOWN` can be
set to make this graceful with a timeout in milliseconds given by the
variable.

The shutdown list is limited to the max number of connections configured
for a multi cache. Set via CURLMOPT_MAX_TOTAL_CONNECTIONS. When the
limit is reached, the oldest connection on the shutdown list is
discarded.

- In multi_wait() and multi_waitfds(), collect all connection caches
  involved (each transfer might carry its own) into a temporary list.
  Let each connection cache on the list contribute sockets and
  POLLIN/OUT events it's connections are waiting for.

- in multi_perform() collect the connection caches the same way and let
  them peform their maintenance. This will make another non-blocking
  attempt to shutdown all connections on its shutdown list.

- for event based multis (multi->socket_cb set), add the sockets and
  their poll events via the callback. When `multi_socket()` is invoked
  for a socket not known by an active transfer, forward this to the
  multi's cache for processing. On closing a connection, remove its
  socket(s) via the callback.

TLS connection filters MUST NOT send close nofity messages in their
`do_close()` implementation. The reason is that a TLS close notify
signals a success. When a connection is aborted and skips its shutdown
phase, the server needs to see a missing close notify to detect
something has gone wrong.

A graceful shutdown of FTP's data connection is performed implicitly
before regarding the upload/download as complete and continuing on the
control connection. For FTP without TLS, there is just the socket close
happening. But with TLS, the sent/received close notify signals that the
transfer is complete and healthy. Servers like `vsftpd` verify that and
reject uploads without a TLS close notify.

- added test_19_* for shutdown related tests
- test_19_01 and test_19_02 test for TCP RST packets
  which happen without a graceful shutdown and should
  no longer appear otherwise.
- add test_19_03 for handling shutdowns by the server
- add test_19_04 for handling shutdowns by curl
- add test_19_05 for event based shutdowny by server
- add test_30_06/07 and test_31_06/07 for shutdown checks
  on FTP up- and downloads.

Closes #13976
2024-06-26 08:33:17 +02:00
Daniel Stenberg
c1845dc0e2
managen: fix blank line detection
Follow-up to d14a53eea7 which ruined the output somewhat.

Closes #14017
2024-06-25 16:41:54 +02:00
Daniel Stenberg
473ec8a05d
managen: output tabs for each 8 leading spaces
This replacing of eight leading spaces into tabs was already done for
the embedded uncompressed version in tool_hugehelp.c so it does not save
anything there. But the gzip compressed version ends up almost 2K
smaller.

The output in a terminal should be identical.

Before using TABs:

curl.txt 282492 bytes
curl.txt.gz 73261 bytes

With this change applied:

curl.txt 249382 bytes
curl.txt.gz 71470 bytes

Closes #14016
2024-06-25 16:13:30 +02:00
Daniel Stenberg
d14a53eea7
managen: error on trailing blank lines in input files
Ref: #14014
Closes #14015
2024-06-25 16:07:07 +02:00
Viktor Szakats
2d5aea9c93
tidy-up: more whitespace
Closes #14014
2024-06-25 14:40:44 +02:00
Stefan Eissing
def99d8507
multi: multi_getsock(), check correct socket
- in phase CONNECTING/TUNNELING/PROTOCONNECT, retrieve
   the socket from the connection filters and do not rely
   on `conn->sockfd` being already set by the transfer.
 - this applies to the default behaviour, a protocol handler
   may override this via its callbacks.
 - add a warning message in multi_getsock() when the transfer
   is expected to have something in its pollset, but instead
   it is empty.

Reported-by: saurabhsingh-dev on github
Fixes #13998
Closes #14011
2024-06-25 13:15:01 +02:00
Daniel Stenberg
8e3e3921e6
managen: fix each options footer to end with newline
A previous change sometimes made a command line option's description not
end with a newline immediately before the next command line.

Also widened the lines to wrap on column 79 instead of 78.

Closes #14010
2024-06-25 13:11:06 +02:00
Alex Snast
ad3e476275
wolfssl: assume key_file equal to clientcert in the absence of key_file
When user sets CURLOPT_SSLCERT but leaves CURLOPT_SSLKEY unset assume
the path passed in CURLOPT_SSLCERT holds the ssl key which is what we do
in openssl implementation.

Fixes #14007
Closes #14008
2024-06-25 10:01:37 +02:00