]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
3 hours agoRELEASE-NOTES: fix typos [ci skip] master
Viktor Szakats [Thu, 9 Apr 2026 22:10:42 +0000 (00:10 +0200)] 
RELEASE-NOTES: fix typos [ci skip]

13 hours agocfilters: CF_TYPE_SETUP connection filter
Stefan Eissing [Wed, 8 Apr 2026 12:37:45 +0000 (14:37 +0200)] 
cfilters: CF_TYPE_SETUP connection filter

Connection filters can now carry the flag CF_TYPE_SETUP, indicating that
they are only needed during connection setup, e.g. connect.

Once the connection is fully established, those filter are removed
again. This frees resources and also makes the filter (call) chains
shorter.

Closes #21269

17 hours agoasyn-ares: connect async
Stefan Eissing [Thu, 2 Apr 2026 09:10:33 +0000 (11:10 +0200)] 
asyn-ares: connect async

Make separate queries for A and AAAA records. Hand out A/AAAA/HTTPS
information before all queries are complete.

Closes #21205

17 hours agoh3: HTTPS-RR use in HTTP/3
Stefan Eissing [Tue, 7 Apr 2026 11:53:42 +0000 (13:53 +0200)] 
h3: HTTPS-RR use in HTTP/3

When HTTPS-RR is needed for the HTTP/3 handshake, delay the connect
until it arrives. Relevant only for TLS backends that support ECH, for
now.

Closes #21253

24 hours agotests/http: bump cryptography from 46.0.6 to 46.0.7
dependabot[bot] [Wed, 8 Apr 2026 23:59:10 +0000 (23:59 +0000)] 
tests/http: bump cryptography from 46.0.6 to 46.0.7

Closes #21273

27 hours agoGHA: update dependency wolfSSL/wolfssl to v5.9.1
renovate[bot] [Wed, 8 Apr 2026 21:16:30 +0000 (21:16 +0000)] 
GHA: update dependency wolfSSL/wolfssl to v5.9.1

Closes #21272

27 hours agobuild: skip detecting `pipe2()` for Apple targets
Viktor Szakats [Wed, 8 Apr 2026 18:46:06 +0000 (20:46 +0200)] 
build: skip detecting `pipe2()` for Apple targets

To avoid (mis-)detecting it via the internal Apple library
`/usr/lib/system/libsystem_sim_kernel.dylib` when targeting iPhone
Simulator (seen with iPhoneSimulator26.4.sdk).

Reported-by: Ian Spence
Fixes #21236

Closes #21271

27 hours agodns: https-eyeballing async
Stefan Eissing [Wed, 8 Apr 2026 09:45:30 +0000 (11:45 +0200)] 
dns: https-eyeballing async

Make cf-https-connect work async correctly:
- only start first baller when at least one A/AAAA address
  is available
- select first connect attempt after that with HTTPS-RR info
  there or not.
- select second connect attempt only when HTTPS-RR is resolved
  (may have resolved to "not known") and select possible ALPN
  from things known by then. May not select any second attempt
  when first already covers everything.

This means when the HTTPS-RR is known at/before the first address
is resolved, everything behaves as before. When the HTTPS-RR is
late, a first connection attempt will have been started. Any
ALPN preference from the HTTPS-RR that is not already ongoing will
then start the second attempt.

For HTTPS-RRs that recommend 2 or more ALPNs, the first will always
be attempted: either it is already ongong or it will be the ALPN
for the second attempt. The 2nd ALPN recommendation from HTTPS-RR
*may* be honored or not, depending on what is already selected.

The difference in behaviour between early/late HTTPS-RR resolve
cannot be helped - unless we do not perform any attempts before
it arrives. Trade offs.

Closes #21267

31 hours agotests: make whitespace between functions and classes consistent
Dan Fandrich [Sun, 5 Apr 2026 16:00:55 +0000 (09:00 -0700)] 
tests: make whitespace between functions and classes consistent

Mostly, this means two blank lines between classes and functions and one
line between methods. Since these checks are currently in preview, they
are done in a separate ruff invocation to avoid turning ALL the preview
checks on at the same time.

31 hours agotests: alphabetize and group Python imports & add check
Dan Fandrich [Fri, 3 Apr 2026 18:52:44 +0000 (11:52 -0700)] 
tests: alphabetize and group Python imports & add check

- De-duplicates, groups, and sorts imports based on the provided `isort` settings.

31 hours agotests: enable more ruff checks
Dan Fandrich [Fri, 3 Apr 2026 00:49:37 +0000 (17:49 -0700)] 
tests: enable more ruff checks

- Checks for missing explicit `return` statements at the end of functions
that can return non-`None` values.
- Checks for classes that inherit from `object`.
- Checks for useless expressions.
- Within an `except*` clause, raise exceptions with `raise ... from err`
or `raise ... from None` to distinguish them from errors in exception
handling
- Checks for variable assignments that immediately precede a `return` of the
assigned variable.
- Checks for `else` statements with a `return` statement in the preceding
`if` block.
- Checks for unnecessary parentheses on raised exceptions.

Closes: #21258
35 hours agovtls_scache: include cert_blob independently of verifypeer
Daniel Stenberg [Sat, 4 Apr 2026 16:20:41 +0000 (18:20 +0200)] 
vtls_scache: include cert_blob independently of verifypeer

The making of the TLS session cache key should use the cert blob
independently of verifypeer on/off.

Follow-up to fa0ccd9f1fbbbd77bf50b2

Spotted by Codex Security

Closes #21222

39 hours agoparsedate: bsearch the time zones
Daniel Stenberg [Wed, 8 Apr 2026 08:30:36 +0000 (10:30 +0200)] 
parsedate: bsearch the time zones

There are 69 entries, bsearch is faster than linear search for random
access.

This now also makes the matching case sensitive (zone names always in
uppercase). No docs said otherwise and all tests assumed uppercase.

Extended test 517

Closes #21266

39 hours agoRELEASE-NOTES: update the entry for `mk-ca-bundle.pl` [ci skip]
Viktor Szakats [Wed, 8 Apr 2026 09:40:15 +0000 (11:40 +0200)] 
RELEASE-NOTES: update the entry for `mk-ca-bundle.pl` [ci skip]

To dsecribe the feature remaiming after follow-up commits.

Follow-up to 351e4f956a11bdf419c14f1f69758a15e77e7fea #21116

39 hours agoRELEASE-NOTES: synced
Daniel Stenberg [Wed, 8 Apr 2026 09:33:11 +0000 (11:33 +0200)] 
RELEASE-NOTES: synced

39 hours agombedtls: fix ECJPAKE matching
Daniel Stenberg [Wed, 8 Apr 2026 07:20:11 +0000 (09:20 +0200)] 
mbedtls: fix ECJPAKE matching

It did not require a full-length match, so empty or prefix tokens map to
ECJPAKE would silently add that cipher to the configured list.

Follow-up to fba9afebba22d577f122239b18

Reported by Codex Security

Closes #21264

39 hours agodocs: use the correct CURLOPT_WRITEFUNCTION signature
Ted Lyngmo [Wed, 8 Apr 2026 07:15:03 +0000 (09:15 +0200)] 
docs: use the correct CURLOPT_WRITEFUNCTION signature

In order to not encourage users to use incompatible function pointers,
change the callback function definitions to use `char *` instead of
`void *` for the first argument.

Triggered by https://stackoverflow.com/questions/79921871/curl-c-c-library-based-application-produces-erronious-response-for-http-post-r#comment141032037_79921871 :

"The code was mostly modified from
 [this example code](https://curl.se/libcurl/c/postinmemory.html),
 honestly I never knew this is wrong. Thanks for pointing it out."

Signed-off-by: Ted Lyngmo <ted@lyncon.se>
Closes #21265

43 hours agotool_getparam: reduce opt_string complexity
Daniel Stenberg [Tue, 7 Apr 2026 22:36:36 +0000 (00:36 +0200)] 
tool_getparam: reduce opt_string complexity

- move arguments taking unsigned numbers into opt_num

- move arugments taking seconds into opt_secs

Closes #21261

47 hours agoconfigure: silence useless clang warnings in C89 builds
Viktor Szakats [Wed, 8 Apr 2026 01:18:11 +0000 (03:18 +0200)] 
configure: silence useless clang warnings in C89 builds

Syncing with CMake.

Follow-up to 43397b0283d4cdb10797e7ead6eacbe09f8a3e77 #21015
Follow-up to 09c9afdd711d0b2ee9f524a235803e755e1074b7 #20363

Closes #21263

2 days agoGHA/linux: bump mbedTLS 3 to 3.6.5 (from 3.6.4), also verify hash
Viktor Szakats [Tue, 7 Apr 2026 23:35:37 +0000 (01:35 +0200)] 
GHA/linux: bump mbedTLS 3 to 3.6.5 (from 3.6.4), also verify hash

Also:
- fix incorrect version in cache id.
  Follow-up to 3a305831d1a9d10b2bfd4fa3939ed41275fee7f7 #19077
- latest version 3.6.6 fails pytests. Seems similar to the v4.1.0
  regression.
  https://github.com/curl/curl/pull/21178
  https://github.com/Mbed-TLS/mbedtls/issues/10668

Closes #21262

2 days agogtls: fail for large files in `load_file()`
Viktor Szakats [Tue, 7 Apr 2026 15:01:29 +0000 (17:01 +0200)] 
gtls: fail for large files in `load_file()`

Used for issuer certs. Limit the size at `CURL_MAX_INPUT_LENGTH`, 8MB.

Bug: https://github.com/curl/curl/pull/21256#discussion_r3045854654

Closes #21257

2 days agoclang-tidy: avoid assigments in `if` expressions
Viktor Szakats [Tue, 7 Apr 2026 13:40:18 +0000 (15:40 +0200)] 
clang-tidy: avoid assigments in `if` expressions

Also enable check in clang-tidy.

Cherry-picked from #20794

Closes #21256

2 days agoparsedate: clarify time2epoch and add more variations to test 517
Daniel Stenberg [Tue, 7 Apr 2026 09:11:38 +0000 (11:11 +0200)] 
parsedate: clarify time2epoch and add more variations to test 517

Polish the time2epoch function to become a little more readable.

Corrected the military time zones: they were going in the wrong
direction.

Add more curl_getdate() input varations to test 517

Closes #21251

2 days agoclang-tidy: drop readability-math-missing-parentheses
Daniel Stenberg [Tue, 7 Apr 2026 09:19:30 +0000 (11:19 +0200)] 
clang-tidy: drop readability-math-missing-parentheses

It's mostly annoying and not helpful

2 days agocf-ip-happy: limit concurrent attempts
Stefan Eissing [Tue, 7 Apr 2026 09:57:37 +0000 (11:57 +0200)] 
cf-ip-happy: limit concurrent attempts

Introduce a limit on the concurrent connect attempts of 6:

- document this in CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS
- close the oldest attempt before opening a new one that would
  exceed the limit
- closing failed attempts early to avoid sockets use beyong their
  usefulness
- add tests for limits in unit2600

These changes are externally visible as file descriptors will be
reassigned where we previously kept the old one around and started a
new socket, allocating always a new descriptor.

Closes #21252

2 days agoGHA: update openssl/openssl to v3.6.2
renovate[bot] [Tue, 7 Apr 2026 12:52:03 +0000 (12:52 +0000)] 
GHA: update openssl/openssl to v3.6.2

Closes #21254

2 days agolibssh: split myssh_statemach_act into sub functions and rename
Daniel Stenberg [Tue, 7 Apr 2026 07:54:56 +0000 (09:54 +0200)] 
libssh: split myssh_statemach_act into sub functions and rename

Follow-up to bd3b2a626a33434a1e9e83a

- rename it to myssh_statemachine

- remove the use of ternary operators in the switch

- fix the error handling for if 'sshp' actually ever is NULL

Closes #21250

2 days agolibssh2: split ssh_statemachine into more sub functions
Daniel Stenberg [Tue, 7 Apr 2026 07:02:01 +0000 (09:02 +0200)] 
libssh2: split ssh_statemachine into more sub functions

The pieces of the state machine that were not separate functions before, now
are.

Also removed the use of ternary operators in the function calls.

Follow-up to f0bf43e20936cf4aa2665

Closes #21249

2 days agoprotocol: disable connection reuse for SMB(S)
Daniel Stenberg [Sun, 5 Apr 2026 16:23:35 +0000 (18:23 +0200)] 
protocol: disable connection reuse for SMB(S)

Connections should only be reused when using the same "share" (and
perhaps some additional conditions), but instead of fixing this flaw,
this change completely disables connection reuse for SMB. This protocol
is about to get dropped soon anyway.

Reported-by: Osama Hamad
Closes #21238

2 days agocurl_ntlm_core: use wolfCrypt DES API with wolfSSL
Viktor Szakats [Mon, 6 Apr 2026 23:49:12 +0000 (01:49 +0200)] 
curl_ntlm_core: use wolfCrypt DES API with wolfSSL

Replacing the last uses of the OpenSSL compatibility API, and dropping
the redefinition of external symbols.

Closes #21247

2 days agolib: replace `PRI*32` printf masks with C89 ones
Viktor Szakats [Sun, 5 Apr 2026 16:08:32 +0000 (18:08 +0200)] 
lib: replace `PRI*32` printf masks with C89 ones

Also: fix indent.

Follow-up to 13c1a934144e98d06214a043ff4538791c7d9583 #20215

Closes #21234

2 days agoDockerfile: update debian:bookworm-slim Docker digest to 4724b8c
renovate[bot] [Tue, 7 Apr 2026 04:32:28 +0000 (04:32 +0000)] 
Dockerfile: update debian:bookworm-slim Docker digest to 4724b8c

Closes #21248

2 days agolib: reserve 'result' for CURLcode, even more
Daniel Stenberg [Mon, 6 Apr 2026 21:27:36 +0000 (23:27 +0200)] 
lib: reserve 'result' for CURLcode, even more

Closes #21245

3 days agocmake: pre-fill `HAVE_PIPE2` for two more platforms
Viktor Szakats [Mon, 6 Apr 2026 19:52:20 +0000 (21:52 +0200)] 
cmake: pre-fill `HAVE_PIPE2` for two more platforms

For DragonFlyBSD and SunOS.

Also opt-in `BSD`, which is covering those listed explicitly, when using
CMake 3.25+.

Follow-up to 131a2fd5aaa1a809211695d2ef8151ffadbebc0c #16987

Closes #21243

3 days agolib: reserve 'result' for CURLcode
Daniel Stenberg [Mon, 6 Apr 2026 20:21:12 +0000 (22:21 +0200)] 
lib: reserve 'result' for CURLcode

For consistency, whereever we use a local variable named 'result' that
is a CURLcode type. Make other types use other names.

Closes #21244

3 days agocfilters: fix Curl_pollset_poll() return code mixup
Daniel Stenberg [Sun, 5 Apr 2026 15:44:01 +0000 (17:44 +0200)] 
cfilters: fix Curl_pollset_poll() return code mixup

Curl_conn_cf_poll did not map adjust_pollset failures to poll-style
errors properly, so error codes were treated as ready events.

Found by Codex Security

Closes #21231

3 days agoGHA/curl-for-win: drop certdata dependency and `GITHUB_TOKEN` with it
Viktor Szakats [Mon, 6 Apr 2026 15:09:10 +0000 (17:09 +0200)] 
GHA/curl-for-win: drop certdata dependency and `GITHUB_TOKEN` with it

`certdata` dependency requires accessing api.github.com for
a reproducible timestamp, which in turn requires a GitHub token to avoid
errors due to rate limiting. Avoid all this by omitting this dependency,
which isn't necessary for these build tests anyway.

The `zero` job already did not use `certdata`, but disable explicitly
anyway just in case.

Reported-by: James Fuller
Follow-up to https://github.com/curl/curl-for-win/commit/9514184977347dbfcd7a4f48daeda7bdb8222458
Follow-up to 128c252975423856d1403c42267a8a1f1b97433f #21105

Closes #21241

3 days agoGHA: autoreconf downloaded tarballs where missing
Viktor Szakats [Mon, 6 Apr 2026 13:54:43 +0000 (15:54 +0200)] 
GHA: autoreconf downloaded tarballs where missing

To avoid using pre-built `./configure` scripts.

Also: drop unrecognized nettle `./configure` option.

Closes #21240

3 days agospacecheck.pl: fix to check 3+ newlines in all files
Viktor Szakats [Mon, 6 Apr 2026 01:32:30 +0000 (03:32 +0200)] 
spacecheck.pl: fix to check 3+ newlines in all files

Follow-up to e52e6dac8e83dd06306e3e9eca32a39575e8fec6 #20269

Closes #21237

4 days agocmake: drop redundant condition
Viktor Szakats [Fri, 20 Mar 2026 21:13:59 +0000 (22:13 +0100)] 
cmake: drop redundant condition

Follow-up to 43397b0283d4cdb10797e7ead6eacbe09f8a3e77 #21015
Cherry-picked from #21000

4 days agoMakefile.am: replace stray `:=` with `=` [ci skip]
Viktor Szakats [Thu, 12 Mar 2026 00:34:01 +0000 (01:34 +0100)] 
Makefile.am: replace stray `:=` with `=` [ci skip]

`=` is used everywhere else in `Makefile.am` files.

Cherry-picked from #21000

4 days agocurl_setup.h: drop stray/unused `USE_OPENSSL_QUIC` guard
Viktor Szakats [Sun, 5 Apr 2026 19:14:45 +0000 (21:14 +0200)] 
curl_setup.h: drop stray/unused `USE_OPENSSL_QUIC` guard

Follow-up to 6aaac9dd388a64d0f511544496608693e1105d13 #20226

Closes #21235

4 days agoman: fix argument type for `CURLSHOPT_[UN]SHARE` options
Viktor Szakats [Sun, 5 Apr 2026 15:45:04 +0000 (17:45 +0200)] 
man: fix argument type for `CURLSHOPT_[UN]SHARE` options

Closes #21232

4 days agoCURLOPT_SOCKS5_AUTH.md: an access property
Daniel Stenberg [Sun, 5 Apr 2026 15:01:06 +0000 (17:01 +0200)] 
CURLOPT_SOCKS5_AUTH.md: an access property

Reported-by: Cutiapreta on hackerone
Closes #21230

4 days agoGHA/windows: enable more options in 32-bit jobs
Viktor Szakats [Sun, 5 Apr 2026 12:55:30 +0000 (14:55 +0200)] 
GHA/windows: enable more options in 32-bit jobs

c-ares, gnutls, libssh, openssl.

Closes #21227

4 days agodocs: noproxy wants the punycoded hostname version
Daniel Stenberg [Sun, 5 Apr 2026 14:24:37 +0000 (16:24 +0200)] 
docs: noproxy wants the punycoded hostname version

Reported-by: Mehtab Zafar
Closes #21228

4 days agolibssh: fix 64-bit printf mask for mingw-w64 <=6.0.0
Viktor Szakats [Sun, 5 Apr 2026 13:31:35 +0000 (15:31 +0200)] 
libssh: fix 64-bit printf mask for mingw-w64 <=6.0.0

Fixing (dl-mingw, CM 6.4.0-i686 (mingw-w64 5.0.0) schannel !unity):
```
lib/vssh/libssh.c: In function 'myssh_in_SFTP_QUOTE_STATVFS':
lib/vssh/libssh.c:573:31: error: ISO C does not support the 'I' printf flag [-Werror=format=]
     char *tmp = curl_maprintf("statvfs:\n"
                               ^~~~~~~~~~~~
lib/vssh/libssh.c:573:31: error: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'uint64_t {aka long long unsigned int}' [-Werror=format=]
lib/vssh/libssh.c:573:31: error: ISO C does not support the 'I' printf flag [-Werror=format=]
[...]
```
Ref: https://github.com/curl/curl/actions/runs/24002480364/job/70000685821

mingw-w64 <=6.0.0 define `PRIu64` like this:
```
./inttypes.h:#define PRIu64 "I64u"
```

Follow-up to 413a0fedd02c8c6df1d294534b8c6e306fcca7a2 #12346
Cherry-picked from #21227

Closes #21229

4 days agoshare: do bitshifts after the type is checked to be valid
Daniel Stenberg [Sun, 5 Apr 2026 12:46:40 +0000 (14:46 +0200)] 
share: do bitshifts after the type is checked to be valid

Fixes #21224
Reported-by: bird on github
Closes #21226

4 days agolibssh: fix `-Wsign-compare` in 32-bit builds by dropping a redundant check
Viktor Szakats [Sun, 5 Apr 2026 09:32:48 +0000 (11:32 +0200)] 
libssh: fix `-Wsign-compare` in 32-bit builds by dropping a redundant check

Follow-up to 8c8eeba5225599a1f5750ece1d15751a8bfce0bb #21214 (wrong silencing)
Follow-up to c049c37acd074a61bbd07eebe25fdf32af575a2a #18989 (add redundant check)
Follow-up to c988ec9f41060144e175b519f9017c569ac8d3db #9328 (make check fail)
Follow-up to 44a02d2532c4e6dabb8f2a074d52d5e99ff533be #9324 (add original check)

Closes #21225

4 days agoruntests: allow configuring SSH host/client key algorithm
Viktor Szakats [Wed, 1 Apr 2026 23:05:54 +0000 (01:05 +0200)] 
runtests: allow configuring SSH host/client key algorithm

via env `CURL_TEST_SSH_KEYALGO`, `rsa` (default), `ecdsa`, `ed25519`.

To ease debugging and testing and to make these code paths more
universal.

Closes #21223

5 days agosendf: fix CR detection if no LF is in the chunk
Daniel Stenberg [Sat, 4 Apr 2026 16:10:31 +0000 (18:10 +0200)] 
sendf: fix CR detection if no LF is in the chunk

When doing line ending conversions, and a chunk contains no '\n', the
function returned early without updating prev_cr to reflect the last
byte. It could then lead to CRLFs sequences not get converted when
occuring right on the boundary border.

Found by Codex Security

Closes #21221

5 days agoGHA/windows: restore libssh, fix to pass tests with 0.12.0
Viktor Szakats [Thu, 2 Apr 2026 15:03:16 +0000 (17:03 +0200)] 
GHA/windows: restore libssh, fix to pass tests with 0.12.0

libssh 0.12.0 on Windows 64-bit Intel fails to connect to sshd (with SSH
state 30) when using the mlkem768x25519-sha256 KEX. (32-bit Intel, ARM64
and tested non-Windows platforms work fine.) Fix by disabling this KEX
for the libssh job.

I do not recommend libssh on Windows due to bugs an insecure behavior.

Also:
- fix libssh TFLAGS condition for mingw-w64.

Follow-up to e127f8ce843e1c070c0ca2074c10dcc01081a395 #21204
Follow-up to fcf946e8461b68840e4afb39711a52c9bf622a10 #21195

Closes #21199

5 days agosshserver.pl: add option to disable KEX algorithms in sshd
Viktor Szakats [Thu, 2 Apr 2026 15:03:16 +0000 (17:03 +0200)] 
sshserver.pl: add option to disable KEX algorithms in sshd

Cherry-picked from #21199

Closes #21220

5 days agodoh: remove superfluous doh_req check
Daniel Stenberg [Sat, 4 Apr 2026 10:57:49 +0000 (12:57 +0200)] 
doh: remove superfluous doh_req check

It has already been checked previously in the function.

Spotted by CodeSonar

Closes #21216

5 days agoCURLOPT_UPLOAD_FLAGS.md: expand
Daniel Stenberg [Sat, 4 Apr 2026 11:28:21 +0000 (13:28 +0200)] 
CURLOPT_UPLOAD_FLAGS.md: expand

And list each supported flag in a nicer way

Closes #21218

5 days agourl: set default upload flags to CURLULFLAG_SEEN
Daniel Stenberg [Sat, 4 Apr 2026 11:11:20 +0000 (13:11 +0200)] 
url: set default upload flags to CURLULFLAG_SEEN

As documented. Not doing this was a regression.

Follow-up to 6758aa722ddf5a6db819b753d96

Reported by Codex Security

Closes #21217

5 days agoGHA/windows: bump OpenSSH-Windows to v10, other improvements
Viktor Szakats [Sat, 4 Apr 2026 12:57:16 +0000 (14:57 +0200)] 
GHA/windows: bump OpenSSH-Windows to v10, other improvements

- use it in a mingw-w64 job.
- add support for native ARM64 binaries.
- add ability to use built-in OpenSSH server in mingw-w64 jobs.

Cherry-picked from #21199

Closes #21219

5 days agoGHA/windows: switch 3 mingw-w64 jobs to ucrt64
Viktor Szakats [Sat, 4 Apr 2026 00:27:55 +0000 (02:27 +0200)] 
GHA/windows: switch 3 mingw-w64 jobs to ucrt64

mingw-w64 (using msvcrt) is in legacy status.

Ref: https://www.msys2.org/docs/environments/

Closes #21213

5 days agolibssh: fix `-Wsign-compare` in 32-bit builds
Viktor Szakats [Sat, 4 Apr 2026 00:14:30 +0000 (02:14 +0200)] 
libssh: fix `-Wsign-compare` in 32-bit builds

Seen with mingw-w64 i686 gcc 15.2.0 (mingw32):
```
D:/a/curl/curl/lib/vssh/libssh.c: In function 'myssh_in_SFTP_QUOTE_STAT':
D:/a/curl/curl/lib/vssh/libssh.c:1664:13: error: comparison of integer expressions
  of different signedness: 'time_t' {aka 'long int'} and 'unsigned int' [-Werror=sign-compare]
 1664 |     if(date > UINT_MAX)
      |             ^
cc1.exe: all warnings being treated as errors
```
Ref: https://github.com/curl/curl/actions/runs/23966805891/job/69908216152

Cherry-picked from #21199

Closes #21214

5 days agodocs: CURLOPT_LOGIN_OPTIONS is a login property
Daniel Stenberg [Sat, 4 Apr 2026 09:21:37 +0000 (11:21 +0200)] 
docs: CURLOPT_LOGIN_OPTIONS is a login property

Test case 1982 verifies this

Closes #21215

5 days agobuildconf: remove rc-8_20_0-1
Daniel Stenberg [Fri, 3 Apr 2026 21:04:01 +0000 (23:04 +0200)] 
buildconf: remove

Not used since 85868537d6d5b (Aug 2020)

Removed from the release tarballs since 91fcbc5d1a489c (Aug 2024)

Closes #21210

6 days agoRELEASE-NOTES: synced
Daniel Stenberg [Fri, 3 Apr 2026 20:33:41 +0000 (22:33 +0200)] 
RELEASE-NOTES: synced

6 days agodnscache: fix locking for negative caching
Daniel Stenberg [Thu, 2 Apr 2026 20:10:33 +0000 (22:10 +0200)] 
dnscache: fix locking for negative caching

Reported-by: Izan on hackerone
Closes #21209

6 days agotest 766: flag as timing-dependent
Samuel Henrique [Mon, 30 Mar 2026 05:18:52 +0000 (22:18 -0700)] 
test 766: flag as timing-dependent

We have noticed this test as failing when run in parallel in Fedora and
Amazon Linux:
https://src.fedoraproject.org/rpms/curl/c/389f1409549178f639afa49f478c544fdaa87be2?branch=rawhide

Debian did not have issues but given there are other FTP tests flagged
as timing-dependent, it makes sense to flag this one too if we notice
failures in other OSes.

Closes #21155

6 days agotool: fix retries in parallel mode
Stefan Eissing [Wed, 1 Apr 2026 12:35:18 +0000 (14:35 +0200)] 
tool: fix retries in parallel mode

Verify that curl's --retry behaviour works

- test 502 in serial, works
- test 502 in parallel, hangs forver, test skipped by default
- test 401, no retries done

Fixes #20669
Reported-by: BlackFuffey on github
Closes #21206

7 days agoCI: Fix or remove obsolete files in labeler config
Dan Fandrich [Thu, 2 Apr 2026 16:57:37 +0000 (09:57 -0700)] 
CI: Fix or remove obsolete files in labeler config

Add a few more paths, too.

7 days agohsts: make the HSTS read callback handle name dupes
Daniel Stenberg [Thu, 2 Apr 2026 07:16:17 +0000 (09:16 +0200)] 
hsts: make the HSTS read callback handle name dupes

Now the logic for handling name duplicates and picking the longest
expiry and strictest subdomain is the same for the callback as for when
reading from file.

Also strip trailing dots from the hostname added by the callback.

A minor side-effect is that the hostname provided by the callback can
now enable subdomains by starting the name with a dot, but we discourage
using such hostnames in documentation.

Amended test 1915 to verify.

Closes #21201

7 days agoGHA/windows: switch back to the canonical Cygwin mirror
Viktor Szakats [Thu, 2 Apr 2026 14:49:23 +0000 (16:49 +0200)] 
GHA/windows: switch back to the canonical Cygwin mirror

The spare one is at the time of this patch inaccessible.

Follow-up to fb5541c28bdc7761c50423335f44b698d36caef1 #20583

Closes #21207

7 days agoGHA/windows: drop building with libssh
Viktor Szakats [Thu, 2 Apr 2026 09:46:22 +0000 (11:46 +0200)] 
GHA/windows: drop building with libssh

Bumping `msys2/setup-msys2` from 2.30.0 to 2.31.0 also brought libssh
0.12.0 (after 0.11.3). libssh has been long known for loading OpenSSH
configuration from disk insecurely on Windows. 0.12.0 brings some fixes
to this (CVE-2025-14821), which in turn may be changing its behavior on
the default GH Windows runner to fail all curl SCP/SFTP tests.

Detecting what is the exact root cause, then defining exact runtime
conditions for it is difficult and fragile. Same for changing these
libssh defaults (if at all possible.)

But, since configuration loading remains insecure and broken on Windows
even after the mitigations made by 0.12.0 [0], this patch removes libssh
from the Windows CI job using it previously.

If someone figures out how to run in CI, it can be readded, though in
general, using libssh on Windows seems to be less than ideal.

[0] https://github.com/curl/curl-for-win/blob/0e4bd38a5b90f6431b4c145ed094940b4d6b6c0d/libssh.sh#L11-L94

Refs:
https://www.libssh.org/2026/02/10/libssh-0-12-0-and-0-11-4-security-releases/
https://github.com/msys2/MINGW-packages/commit/91382507d5df17d89c074a1469bf3725a9602ff5
#21199 (unsuccessful fix attempts)

Bug: https://github.com/curl/curl/pull/21195#issuecomment-4173085194
Follow-up to fcf946e8461b68840e4afb39711a52c9bf622a10 #21195

Closes #21204

7 days agoasyn-thrdd: item cleanup using resolv_id
Stefan Eissing [Thu, 2 Apr 2026 07:44:39 +0000 (09:44 +0200)] 
asyn-thrdd: item cleanup using resolv_id

Now that we support multiple async operations at the same transfer,
fix the thread queue cleanup to match not only the mid but also the
resolv_id.

Found by Codex Security

Closes #21202

7 days agourl: improve connection reuse on negotiate
Stefan Eissing [Thu, 2 Apr 2026 09:33:39 +0000 (11:33 +0200)] 
url: improve connection reuse on negotiate

Check state of negotiate to allow proper connection reuse.

Closes #21203

7 days agourl: init req.no_body in DO so that it works for h2 push
Daniel Stenberg [Wed, 1 Apr 2026 13:44:02 +0000 (15:44 +0200)] 
url: init req.no_body in DO so that it works for h2 push

req.no_body was only initialized in Curl_connect, while HTTP/2 server
push adds a duplicated handle via Curl_multi_add_perform and calls
Curl_init_do with conn==NULL, never invoking Curl_connect.

Verify it by amending test 1620

Found by Codex Security

Closes #21194

7 days agohsts: accept 10K entries in the list
Daniel Stenberg [Thu, 2 Apr 2026 06:05:40 +0000 (08:05 +0200)] 
hsts: accept 10K entries in the list

Up from 1K.

Reduces the risk that someone could flush the list by tricking a user to
do many transfers to new hostnames.

Document the limit.

Follow-up to 03a792b186da7fdfbe4b85b022d7

Closes #21200

7 days agolibssh: path length precaution
Daniel Stenberg [Wed, 1 Apr 2026 13:31:48 +0000 (15:31 +0200)] 
libssh: path length precaution

Make sure the string is non-zero before indexing it -1. Right now, the
path is always non-zero length so this is more for (future) safety
reasons.

Closes #21193

8 days agoCI: Improve labeler tag detection
Dan Fandrich [Thu, 2 Apr 2026 00:44:04 +0000 (17:44 -0700)] 
CI: Improve labeler tag detection

Add entries for relevant new files added in the last two years.

8 days agospelling: fix typos
Viktor Szakats [Wed, 1 Apr 2026 20:41:42 +0000 (22:41 +0200)] 
spelling: fix typos

Closes #21198

8 days agoGHA: bump actions and pips
dependabot[bot] [Wed, 1 Apr 2026 18:58:46 +0000 (18:58 +0000)] 
GHA: bump actions and pips

- update `actions/cache` from 5.0.3 to 5.0.4
- update `actions/download-artifact` from 7.0.0 to 8.0.1
- update `actions/upload-artifact` from 6.0.0 to 7.0.0
- update `msys2/setup-msys2` from 2.30.0 to 2.31.0
- update pip `ruff` from 0.15.7 to 0.15.8

Closes #21195
Closes #21197

8 days agotidy-up: rename `Curl_safefree()`/`tool_safefree()` to `curlx_safefree()`
Viktor Szakats [Sun, 29 Mar 2026 23:54:10 +0000 (01:54 +0200)] 
tidy-up: rename `Curl_safefree()`/`tool_safefree()` to `curlx_safefree()`

To sync names for the same macro logic between lib and src, and to move
it to the curlx namespace, to match `curlx_free()` that it's calling.

Closes #21151

8 days agolib: make resolving HTTPS DNS records reliable:
Stefan Eissing [Tue, 31 Mar 2026 09:45:21 +0000 (11:45 +0200)] 
lib: make resolving HTTPS DNS records reliable:

- allow to specify when they are wanted on starting a resolve
- match dns cache entries accordingly. An entry which never
  tried to get HTTPS-RRs is no answer for a resolve that wants
  it.
- fix late arrivals of resolve answers to match the "async"
  records that started them - if it still exists.
- provide for multiple "async" resolves in a transfer at the
  same time. We may need to resolve an IP interface while the
  main connection resolve has not finished yet.
- allow lookup of HTTPS-RR information as soon as it is
  available, even if A/AAAA queries are still ongoing.

For this, the "async" infrastructure is changed:

- Defined bits for DNS queries `CURL_DNSQ_A`, `CURL_DNSQ_AAAA`
  and `CURL_DNSQ_HTTPS`. These replace `ip_version` which says
  nothing about HTTPS.
  Use them in dns cache entries for matching.
- enhance the `async->id` to be a unique `uint32_t` for
  resolves inside one multi. This is weak, as the id may
  wrap around. However it is combined with the `mid` of
  the easy handle, making collisions highly unlikely.
  `data->state.async` is only accessed in few places where
  the mid/async-id match is performed.
- vtls: for ECH supporting TLS backends (openssl, rustls, wolfssl),
  retrieve the HTTPS-RR information from the dns connection filter.
  Delay the connect if the HTTPS-RR is needed, but has not
  been resolved yet.

The implementation of all this is complete for the threaded
resolver. c-ares resolver and DoH do not take advantage of
all new async features yet. To be done in separate PRs.

Details:

c-ares: cleanup settings and initialisation. Any ares channel
is only being created on starting a resolve and propagating
operations in setopt.c to the channel are not helpful.

Changed threaded+ares pollset handling so that they do not
overwrite each others `ASYNC_NAME` timeouts.

Add trace name 'threads' for tracing thread queue and
pool used by threaded resolver.

Closes #21175

8 days agoHSTS: cap the list at 1,000 entries
Daniel Stenberg [Wed, 1 Apr 2026 08:24:06 +0000 (10:24 +0200)] 
HSTS: cap the list at 1,000 entries

Avoid never-ending growth.

When adding more entries, it now deletes the first entry in the list,
which is the oldest added entry still held in memory. I decided to avoid
a Least Recently Used concept as I suspect with a list with this many
entries most entries have not been used, and we don't save the timestamp
of recent use anyway.

The net effect might (no matter what) be that the removed entry might
feel a bit "random" in the eyes of the user.

Verify with test 1674

Ref #21183
Closes #21190

8 days agotest1275.pl: ignore indented sections in markdowns
Daniel Stenberg [Wed, 1 Apr 2026 09:59:44 +0000 (11:59 +0200)] 
test1275.pl: ignore indented sections in markdowns

They are special and should not be checked like this.

Closes #21191

8 days agoaltsvc: cap the list at 5,000 entries
Daniel Stenberg [Wed, 1 Apr 2026 07:53:42 +0000 (09:53 +0200)] 
altsvc: cap the list at 5,000 entries

Avoid never-ending growth.

When adding more entries, it now deletes the first entry in the list,
which is the oldest added entry still held in memory. I decided to avoid
a Least Recently Used concept as I suspect with a list with this many
entries most entries have not been used, and we don't save the timestamp
of recent use anyway.

The net effect might (no matter what) be that the removed entry might
feel a bit "random" in the eyes of the user.

Verify with test 1669.

Reported-by: Geeknik Labs
Fixes #21183
Closes #21189

8 days agoaltsvc: drop the prio field from the struct 21188/head
Daniel Stenberg [Wed, 1 Apr 2026 07:23:44 +0000 (09:23 +0200)] 
altsvc: drop the prio field from the struct

The value is not used for anything, no point in keeping it in memory.

Closes #21188

8 days agoalt-svc: skip expired entries read from file
Daniel Stenberg [Wed, 1 Apr 2026 07:16:31 +0000 (09:16 +0200)] 
alt-svc: skip expired entries read from file

Extend test 1654 to verify

Closes #21187

8 days agohsts: skip expired HSTS entries read from file
Daniel Stenberg [Wed, 1 Apr 2026 06:51:25 +0000 (08:51 +0200)] 
hsts: skip expired HSTS entries read from file

Extend test 780 to verify

Closes #21186

8 days agocookie: fix rejection when tabs in value
Daniel Stenberg [Wed, 1 Apr 2026 06:09:47 +0000 (08:09 +0200)] 
cookie: fix rejection when tabs in value

A previous refactor changed the TAB check so that the octet could be
accepted in the 'path', which would cause an invalid line in the saved
cookie file so not possible to read the cookie back. Not terrible
because the path cannot contain a raw tab anyway so it would never match
anyway.

Add test 1685 to verify

Reported-by: Izan on hackerone
Closes #21185

8 days agodocs/cmdline-opts: tidy up retry-connrefused
Alex Hamilton [Tue, 31 Mar 2026 19:27:07 +0000 (14:27 -0500)] 
docs/cmdline-opts: tidy up retry-connrefused

Closes #21182

9 days agohttp: refactor http_on_response into sub functions
Daniel Stenberg [Tue, 31 Mar 2026 05:56:45 +0000 (07:56 +0200)] 
http: refactor http_on_response into sub functions

Reduces complexity.

Closes #21172

9 days agoGHA: try workaround for slow Azure Ubuntu distro server (cont.)
Viktor Szakats [Tue, 31 Mar 2026 19:01:57 +0000 (21:01 +0200)] 
GHA: try workaround for slow Azure Ubuntu distro server (cont.)

- fail if all retries failed.
- run `dpkg --configure -a` after an aborted slow attempt.

```
Selecting previously unselected package libsys-hostname-long-perl.
Error: slow server, retry
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
[...]
```

Bug: https://github.com/curl/curl/pull/21107#issuecomment-4163506100
Follow-up to 5172ba5475cffc525c2338dfa63f818e11e80a42 #21107

Closes #21181

9 days agomd5: fix large size handling
Daniel Stenberg [Tue, 31 Mar 2026 15:36:11 +0000 (17:36 +0200)] 
md5: fix large size handling

Follow-up to dd7fcd581f68fb76198497d

Closes #21180

9 days agolib: accept larger input to md5/hmac/sha256/sha512 functions
Daniel Stenberg [Tue, 31 Mar 2026 09:22:34 +0000 (11:22 +0200)] 
lib: accept larger input to md5/hmac/sha256/sha512 functions

Avoid unchecked data conversions from size_t to unsigned int.

Reported-by: James Fuller
Closes #21174

9 days agoINSTALL.md: refer to as Cygwin
Viktor Szakats [Tue, 31 Mar 2026 14:52:50 +0000 (16:52 +0200)] 
INSTALL.md: refer to as Cygwin

Replacing `cygwin`.

Closes #21179

9 days agocmake: enable pthreads for BoringSSL/AWS-LC
Viktor Szakats [Sat, 28 Mar 2026 22:23:31 +0000 (23:23 +0100)] 
cmake: enable pthreads for BoringSSL/AWS-LC

Depends on 6828df7d2116fe680a0d012b06a4501e26efa99b #21176

Closes #21168

9 days agodocs: SSH host verification is done at connect time
Daniel Stenberg [Tue, 31 Mar 2026 08:42:56 +0000 (10:42 +0200)] 
docs: SSH host verification is done at connect time

Connection reuse is done more "casually" once verified.

Closes #21173

9 days agoINSTALL.md: update Cygwin instructions
John Haugabook [Thu, 19 Mar 2026 04:05:24 +0000 (00:05 -0400)] 
INSTALL.md: update Cygwin instructions

Polish Cygwin section of install, adding suggestions for:

- `cmake`
- `ninja`
- `setup --build-depends`

Closes #20995

9 days agocmake: improve passing build options to `try_compile()`
Viktor Szakats [Tue, 31 Mar 2026 04:18:57 +0000 (06:18 +0200)] 
cmake: improve passing build options to `try_compile()`

Pass build options directly via `COMPILE_DEFINTIONS` and
`LINK_LIBRARIES`, instead of "tunneling" them through `CMAKE_FLAGS`.
The latter method breaks when passing `Threads::Threads` as library via
`CMAKE_REQUIRED_LIBRARIES`, while also being complex and fragile.

Example:
```
-- Performing Test HAVE_FSETXATTR_5
CMake Error at bld/CMakeFiles/CMakeTmp/CMakeLists.txt:27 (target_link_libraries):
  Target "cmTC_3386e" links to:

    Threads::Threads

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

CMake Error at CMake/Macros.cmake:51 (try_compile):
  Failed to generate test project build system.
Call Stack (most recent call first):
  CMakeLists.txt:1684 (curl_internal_test)
```
Ref: https://github.com/curl/curl/actions/runs/23792043930/job/69329796592?pr=21168#step:38:318

Note: a side-effect is no longer passing C compiler flags (e.g.
`CMAKE_REQUIRED_FLAGS`) to the _linker_. This should not be an issue,
though CMake is passing them during its built-in detections.

Ref: https://cmake.org/cmake/help/v3.18/command/try_compile.html

Closes #21176

9 days agoRELEASE-NOTES: synced
Daniel Stenberg [Tue, 31 Mar 2026 07:02:47 +0000 (09:02 +0200)] 
RELEASE-NOTES: synced

9 days agohttp2: return error on OOM in push headers
Daniel Stenberg [Mon, 30 Mar 2026 06:49:31 +0000 (08:49 +0200)] 
http2: return error on OOM in push headers

Reported-by: M42kL33 on hackerone
Bug: https://hackerone.com/reports/3636044
Closes #21171

9 days agoCURLOPT_SSL_CTX_FUNCTION.md: expand on effects connection reuse
Daniel Stenberg [Mon, 30 Mar 2026 21:11:38 +0000 (23:11 +0200)] 
CURLOPT_SSL_CTX_FUNCTION.md: expand on effects connection reuse

Closes #21164

9 days agotool_operhlp: iterate through all slashes to find name
Daniel Stenberg [Mon, 30 Mar 2026 21:34:14 +0000 (23:34 +0200)] 
tool_operhlp: iterate through all slashes to find name

If there is no trailing file name for -O or --remote-name-all, continue
searching until there is no more to search. A URL ending with multiple
slashes would previously make it do wrong.

Add test 1639 and 1644 to verify.

Follow-up to e26eefd9ce19b1b954a

Reported-by: James Fuller
Closes #21165