]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
2 months agochecksrc: reduce directory-specific exceptions
Viktor Szakats [Thu, 2 Oct 2025 19:33:48 +0000 (21:33 +0200)] 
checksrc: reduce directory-specific exceptions

By making them defaults, then fixing and/or reshuffling remaining
exceptions as necessary.

- checksrc: ban by default: `snprintf`, `vsnprintf`, `sscanf`, `strtol`.
- examples: replace `strtol` with `atoi` to avoid a checksrc exception.
- tests/libtest: replace `strtol` with `atol`.
- tests/server: replace most `strtol` with `atol`.
- tests/server: replace most `strtoul` with `atol`/`atoi`.
- tests/server: drop no longer used `util_ultous`.
- fix typo in checksrc rules: `vsnprint` -> `vsnprintf`.
- update local exceptions.

Also:
- examples: ban curl printf functions. They're discouraged in user code.
- examples: replace curl printf with system printf.
  Add `snprintf` workaround for <VS2015.
- examples/synctime: fix `-Wfloat-equal`.
- examples/synctime: exclude for non-Windows and non-UWP Windows.
- examples/synctime: build by default.

Closes #18823

2 months agochecksrc: fix to handle `)` predecing a banned function
Viktor Szakats [Fri, 3 Oct 2025 01:12:39 +0000 (03:12 +0200)] 
checksrc: fix to handle `)` predecing a banned function

Fixing:
```
Unmatched ) in regex; marked by <-- HERE in m/  \*buffer_len = \(ssize_t) <-- HERE
  strtol\(/ at /home/runner/work/curl/curl/scripts/checksrc.pl line 916, <$R> line 380.
```
Ref: https://github.com/curl/curl/actions/runs/18209824275/job/51848079550#step:3:5

Also add a test case.

Follow-up to 684f4cdd3ef0cc41c547fce0e45d8a059a3058b3 #18779
Cherry-picked from #18823
Closes #18836

2 months agoGHA: update dependency google/boringssl to v0.20251002.0
renovate[bot] [Fri, 3 Oct 2025 15:54:06 +0000 (15:54 +0000)] 
GHA: update dependency google/boringssl to v0.20251002.0

Closes #18834

2 months agoMakefile.example: fix option order [ci skip]
Viktor Szakats [Fri, 3 Oct 2025 19:15:33 +0000 (21:15 +0200)] 
Makefile.example: fix option order [ci skip]

The `ld` linker is sensitive to this, and did not find libcurl symbol
with the order before this patch. Seen with mingw-w64 gcc.

Follow-up to f6ddc1fc1e25ff8ea866f90942719af898d0ef0c #18554

Closes #18835

2 months agodoh: inherit new custom ssl flags
Stefan Eissing [Fri, 3 Oct 2025 12:15:04 +0000 (14:15 +0200)] 
doh: inherit new custom ssl flags

The new custom_* flags in the SSL config need to be inherited when
setting up the doh easy handle, so that defaults apply the same way as
for the original easy handle.

Closes #18831

2 months agoGHA: show full versions next to pinned actions
Viktor Szakats [Fri, 3 Oct 2025 12:27:28 +0000 (14:27 +0200)] 
GHA: show full versions next to pinned actions

Also quotes to a configuration entry.

Follow-up to 2e5993ab0812fd1a983738f6d6efbc7bb0806144 #18827

Closes #18832

2 months agoprogress: expand to use 6 characters per size
Daniel Stenberg [Fri, 3 Oct 2025 08:51:46 +0000 (10:51 +0200)] 
progress: expand to use 6 characters per size

Previously the progress meter used a maximum of five digits+letter in
the progress meter output: up to 99999 bytes and then 9999k, 9999M etc.
The output then used two spaces after the size between the next field in
the display.

This new approach uses one letter more with only one space in between
the fields. It makes it possible to show up to 999999 bytes and then
99999k, 99999M etc. The function uses a single decimal when outputting a
value less than 1000 in any unit. Like 999.9M.

Closes #18828

2 months agoGHA: update actions/upload-artifact action to v4.6.2
renovate[bot] [Fri, 3 Oct 2025 11:55:38 +0000 (11:55 +0000)] 
GHA: update actions/upload-artifact action to v4.6.2

Closes #18830

2 months agoGHA/checksrc: pass zizmor a GH token, fix warnings found
Viktor Szakats [Fri, 3 Oct 2025 09:43:10 +0000 (11:43 +0200)] 
GHA/checksrc: pass zizmor a GH token, fix warnings found

For a complete, online, check.

After this patch the check takes 30s, up from a fraction of a second.

Also bump CodeQL actions to their latest version.

Closes #18827

2 months agotool_progress: fix < 10000 output
Daniel Stenberg [Fri, 3 Oct 2025 08:18:27 +0000 (10:18 +0200)] 
tool_progress: fix < 10000 output

Follow-up to e49698925c7f90e

Closes #18826

2 months agodocs/cmdline-opts: drop double quotes from GLOBBING and URL examples
Daniel Stenberg [Fri, 3 Oct 2025 10:38:40 +0000 (12:38 +0200)] 
docs/cmdline-opts: drop double quotes from GLOBBING and URL examples

It looks easier on the eye without them

Closes #18829

2 months agovquic: handling of io improvements
Stefan Eissing [Thu, 2 Oct 2025 12:20:05 +0000 (14:20 +0200)] 
vquic: handling of io improvements

- better tracing of what system call is used and how often
- ngtcp2: combine vquic_send into larger chunks
- ngtcp2: define own PMTU values and enable MTU probing
- ngtcp2: trace interesting remote transport parameters

Closes #18812

2 months agossl: support Apple SecTrust configurations
Stefan Eissing [Wed, 24 Sep 2025 08:19:46 +0000 (10:19 +0200)] 
ssl: support Apple SecTrust configurations

- configure/cmake support for enabling the option
- supported in OpenSSL and GnuTLS backends
- when configured, Apple SecTrust is the default trust store
  for peer verification. When one of the CURLOPT_* for adding
  certificates is used, that default does not apply.
- add documentation of build options and SSL use

Closes #18703

2 months agoRELEASE-NOTES: synced
Daniel Stenberg [Fri, 3 Oct 2025 06:30:55 +0000 (08:30 +0200)] 
RELEASE-NOTES: synced

Add OpenSSL-QUIC as an item to get removed

2 months agoRELEASE-NOTES: synced
Daniel Stenberg [Fri, 3 Oct 2025 06:26:56 +0000 (08:26 +0200)] 
RELEASE-NOTES: synced

2 months agoDEPRECATE.md: remove OpenSSL 1.1.1 support already in December 2025
Daniel Stenberg [Thu, 2 Oct 2025 21:00:24 +0000 (23:00 +0200)] 
DEPRECATE.md: remove OpenSSL 1.1.1 support already in December 2025

No sponsors == remove it

Closes #18822

2 months agoDEPRECATE.md: We remove the OpenSSL-QUIC backend in March 2026
Daniel Stenberg [Thu, 2 Oct 2025 20:50:25 +0000 (22:50 +0200)] 
DEPRECATE.md: We remove the OpenSSL-QUIC backend in March 2026

URL: https://curl.se/mail/lib-2025-10/0000.html

Closes #18820

2 months agotime-cond.md: refer to the singular curl_getdate man page
Daniel Stenberg [Thu, 2 Oct 2025 15:07:05 +0000 (17:07 +0200)] 
time-cond.md: refer to the singular curl_getdate man page

Closes #18816

2 months agotcp-nodelay.md: expand the documentation
Daniel Stenberg [Thu, 2 Oct 2025 12:41:41 +0000 (14:41 +0200)] 
tcp-nodelay.md: expand the documentation

Instead of referring to another document.

Closes #18811

2 months agocmdline-opts/_PROGRESS.md: explain the suffixes
Daniel Stenberg [Thu, 2 Oct 2025 15:17:22 +0000 (17:17 +0200)] 
cmdline-opts/_PROGRESS.md: explain the suffixes

Closes #18817

2 months agoip-happy: prevent event-based stall on retry
Stefan Eissing [Thu, 2 Oct 2025 14:39:37 +0000 (16:39 +0200)] 
ip-happy: prevent event-based stall on retry

When delaying an IP happy eyeball restart, set an actual timer or the
connection will stall when running event based.

Closes #18815

2 months agoGHA/macos: drop macos-13 runner image from combo jobs
Viktor Szakats [Thu, 2 Oct 2025 17:10:35 +0000 (19:10 +0200)] 
GHA/macos: drop macos-13 runner image from combo jobs

- replace with macos-14.
- refresh tables, exceptions.
- apply a pending TODO.

Closes #18818

2 months agovtls_scache: fix race condition
Jay Satiro [Thu, 2 Oct 2025 13:46:36 +0000 (09:46 -0400)] 
vtls_scache: fix race condition

- Lock before counting the cache sessions.

Prior to this change when taking a session a trace command counted the
sessions but not under lock, which caused a race condition.

Reported by: Viktor Szakats

Fixes https://github.com/curl/curl/issues/18806
Closes https://github.com/curl/curl/pull/18813

2 months agoINTERNALS: specify minimum version for Heimdal: 7.1.0
Viktor Szakats [Thu, 2 Oct 2025 11:39:35 +0000 (13:39 +0200)] 
INTERNALS: specify minimum version for Heimdal: 7.1.0

Released on 2016-Dec-19, it's the first "revamped" stable version, and
the earliest available as a source tarball at the official repository:
https://github.com/heimdal/heimdal/releases/tag/heimdal-7.1.0

It's also the first version hosted by Homebrew. It builds fine locally
with curl, and also builds in CI with old linux: 7.1.0+dfsg-13+deb9u4.

Closes #18809

2 months agorenovate: adjust commit message prefixes, try making CodeQL and AWS-LC updates monthly
Viktor Szakats [Sat, 27 Sep 2025 14:32:22 +0000 (16:32 +0200)] 
renovate: adjust commit message prefixes, try making CodeQL and AWS-LC updates monthly

Also:
- enable pip bumps in Dependabot.
- reduce dependabot to check monthly (was: weekly)
  Dependabot acts as a backup for mend/renovate.

Closes #18761

2 months agocmake: drop exclamation in comment looking like a name
Viktor Szakats [Thu, 2 Oct 2025 12:37:14 +0000 (14:37 +0200)] 
cmake: drop exclamation in comment looking like a name

Ref: https://github.com/curl/curl/pull/3316#issuecomment-442343555
Follow-up to ea4ba6d9ef21a271bfbccedb0456d09a1ed57173 #18803
Follow-up to 558814e16d84aa202c5ccc0c8108a9d728e77a58

Closes #18810

2 months agoINTERNALS: drop Winsock 2.2 from the dependency list
Viktor Szakats [Thu, 2 Oct 2025 11:03:49 +0000 (13:03 +0200)] 
INTERNALS: drop Winsock 2.2 from the dependency list

It's implied by the minimum requirement of Windows XP.
Also Windows CE is soon to be deleted via #17927.

Closes #18808

2 months agoCI: move no-verbose build from Circle CI to existing GHA jobs, with tests
Viktor Szakats [Wed, 1 Oct 2025 20:07:37 +0000 (22:07 +0200)] 
CI: move no-verbose build from Circle CI to existing GHA jobs, with tests

To test it in GHA and catch issues at PR time. Before this patch,
Circle CI caught them after pushing to master (or non-fork PR
branches.) GHA also run runtests, pytests and static analysis on
these builds, after this patch.

- GHA/linux: enable no-verbose in an existing job.
- GHA/linux: enable no-verbose in the H3 scan-build job too.
- GHA/macos: enable no-verbose in one build (= 3 jobs with different
  compilers).
- GHA/codeql: enable no-verbose in the MultiSSL Linux build.
- circleci: delete openssl no-verbose job in favor of the above.

Closes #18797

2 months agomulti_ev: remove unnecessary data check that confuses analysers
Stefan Eissing [Thu, 2 Oct 2025 08:23:42 +0000 (10:23 +0200)] 
multi_ev: remove unnecessary data check that confuses analysers

Closes #18804

2 months agolib: remove personal names from comments
Daniel Stenberg [Thu, 2 Oct 2025 06:30:52 +0000 (08:30 +0200)] 
lib: remove personal names from comments

- it's just too random who got mentioned
- we can't mention all, so better consistently mention none
- make sure they all are mentioned in THANKS
- also remove some unnecessary comment ramblings

Closes #18803

2 months agotool_getparam: always disable "lib-ids" for tracing
Daniel Stenberg [Thu, 2 Oct 2025 08:20:59 +0000 (10:20 +0200)] 
tool_getparam: always disable "lib-ids" for tracing

Since the tool code itself adds the ids (controlled with "ids"), getting
them (also) added by the library adds nothing good. Always disable the
lib-ids even when "--trace-config all" is selected.

Also: change "== Info:" into just "* " to reduce output redundancy.

Ref: #18755
Reported-by: Alice Lee Poetics
Closes #18805

2 months agotool_progress: make max5data() use an algorithm
Daniel Stenberg [Thu, 2 Oct 2025 09:31:52 +0000 (11:31 +0200)] 
tool_progress: make max5data() use an algorithm

Instead of a list of conditions. Makes a unified decimal output when the
value is less than 100. Prepares for > 64 bit data type.

Closes #18807

2 months agopytest: skip specific tests for no-verbose builds
Viktor Szakats [Wed, 1 Oct 2025 21:27:45 +0000 (23:27 +0200)] 
pytest: skip specific tests for no-verbose builds

Detect via curlinfo if curl has verbose strings disabled, and skip
tests that require it.

Also:
- cmake: make pytests depend on curlinfo.

Cherry-picked from #18797
Closes #18801

2 months agoruntests: tag tests that require curl verbose strings
Viktor Szakats [Wed, 1 Oct 2025 20:36:08 +0000 (22:36 +0200)] 
runtests: tag tests that require curl verbose strings

To skip them when curl has verbose strings disabled, instead of failing.

Cherry-picked from #18797
Closes #18800

2 months agolib: fix build error and compiler warnings with verbose strings disabled
Viktor Szakats [Wed, 1 Oct 2025 20:19:01 +0000 (22:19 +0200)] 
lib: fix build error and compiler warnings with verbose strings disabled

- asyn-ares: fix compiler warning:
  ```
  lib/asyn-ares.c:751:17: error: code will never be executed [clang-diagnostic-unreachable-code,-warnings-as-errors]
    751 |     char *csv = ares_get_servers_csv(ares->channel);
        |                 ^~~~~~~~~~~~~~~~~~~~
  ```

- curl_trc: fix missing symbol:
  ```
  /usr/bin/ld: ../lib/.libs/libcurl.so: undefined reference to `Curl_trc_timer'
  collect2: error: ld returned 1 exit status
  ```
  Ref: https://app.circleci.com/pipelines/github/curl/curl/15446/workflows/67afa113-9c49-4249-9180-f6f01fc7dfdd/jobs/149177
  Ref: https://github.com/curl/curl/actions/runs/18174250400/job/51736249444#step:33:623
  Follow-up to b02238975768d0bcbf8c7ef00eaaee3ec379f4ff #18768

- multi: fix `-Wunreachable-code`:
  ```
  lib/multi.c:1107:28: error: code will never be executed [-Werror,-Wunreachable-code]
   1107 |     size_t timeout_count = Curl_llist_count(&data->state.timeoutlist);
        |                            ^~~~~~~~~~~~~~~~
  lib/multi.c:3054:35: error: code will never be executed [-Werror,-Wunreachable-code]
   3054 |       struct Curl_llist_node *e = Curl_llist_head(&data->state.timeoutlist);
        |                                   ^~~~~~~~~~~~~~~
  lib/multi.c:3380:7: error: code will never be executed [-Werror,-Wunreachable-code]
   3380 |       Curl_llist_head(&data->state.timeoutlist);
        |       ^~~~~~~~~~~~~~~
  ```

Cherry-picked from #18797
Closes #18799

2 months agoGHA/linux: add HTTP/3 c-ares scan-build and asan jobs
Viktor Szakats [Tue, 23 Sep 2025 08:17:29 +0000 (10:17 +0200)] 
GHA/linux: add HTTP/3 c-ares scan-build and asan jobs

They use Linuxbrew instead of locally built components.

Linuxbrew limitations compared to the locally built components in
GHA/http3-linux:
- libngtcp2 currently supports OpenSSL only.
- wolfssl can't coexist with openssl.
- somewhat tricky configuration with autotools.

Upside is easy of use, always the latest versions (may be downside),
and availability of almost all packages.

Closes #18693

2 months agoGHA: update dependency openssl/openssl to v3.6.0
renovate[bot] [Wed, 1 Oct 2025 19:54:31 +0000 (19:54 +0000)] 
GHA: update dependency openssl/openssl to v3.6.0

Closes #18796

2 months agoGHA/macos: also update LibreSSL source tarball URL
Viktor Szakats [Wed, 1 Oct 2025 19:53:04 +0000 (21:53 +0200)] 
GHA/macos: also update LibreSSL source tarball URL

Follow-up to 150567b0d25b519873800ac883ae43833e8f6aca #18792

2 months agoopenssl-quic: ignore unexpected streams opened by server
Stefan Eissing [Wed, 1 Oct 2025 09:23:27 +0000 (11:23 +0200)] 
openssl-quic: ignore unexpected streams opened by server

HTTP/3 defines "reserved stream types" that are intended to be ignored
by a receiver. This is part of the "greasing" effort that flexes parts
of the protocol that are needed for future extensions.

curl's OpenSSL-QUIC implementation treated all unexpected streams as
an error. Which seems the right thing to do *but* for these reserved types.
However OpenSSL does not expose this type and thus, curl needs to silently
discard all unexpected streams opened by the server to allow interop
with servers that flex the GREASE parts.

Fixes #18780
Reported-by: Pocs Norbert
Closes #18791

2 months agocf-socket: tweak a memcpy() to read better
Daniel Stenberg [Fri, 26 Sep 2025 12:10:30 +0000 (14:10 +0200)] 
cf-socket: tweak a memcpy() to read better

By checking the size of the actual buffer and using that as memcpy
target instead of another union member, this helps readers and static
code analyzers to determine that this is not a buffer overflow.

Ref: #18677
Closes #18787

2 months agoform.md: drop reference to MANUAL
Daniel Stenberg [Wed, 1 Oct 2025 09:26:16 +0000 (11:26 +0200)] 
form.md: drop reference to MANUAL

Since it isn't linked and users might not understand what it refers to.

Ref: #18755
Closes #18790

2 months agotool_getparam: warn if provided header looks malformed
Daniel Stenberg [Wed, 1 Oct 2025 11:33:22 +0000 (13:33 +0200)] 
tool_getparam: warn if provided header looks malformed

URL: https://fosstodon.org/@galdor/115298664084113519
Closes #18793

2 months agotidy-up: LibreSSL Git repository URLs and local CI builds
Viktor Szakats [Wed, 1 Oct 2025 10:12:30 +0000 (12:12 +0200)] 
tidy-up: LibreSSL Git repository URLs and local CI builds

Also:
- point the source tarball to a working URL.
  The GitHub release page misses the official source tarball for 4.1.1.
- GHA/linux: switch LibreSSL build to cmake (syncing with http3-linux.)
- GHA/macos: drop no longer needed LibreSSL build workaround.

Closes #18792

2 months agoGHA: update dependency libressl/portable to v4.1.1
renovate[bot] [Wed, 1 Oct 2025 01:37:23 +0000 (01:37 +0000)] 
GHA: update dependency libressl/portable to v4.1.1

Closes #18785
Closes #18786

2 months agowcurl: import v2025.09.27
Samuel Henrique [Sat, 27 Sep 2025 08:42:08 +0000 (09:42 +0100)] 
wcurl: import v2025.09.27

Closes #18754

2 months agoRELEASE-NOTES: synced
Daniel Stenberg [Wed, 1 Oct 2025 07:12:10 +0000 (09:12 +0200)] 
RELEASE-NOTES: synced

2 months agotypos.toml: exclude more from typo checks
Daniel Stenberg [Wed, 1 Oct 2025 06:19:35 +0000 (08:19 +0200)] 
typos.toml: exclude more from typo checks

- exclude visual studio project templates
- exclude test cases
- allow 'proxys' which is used for "secure proxy" in test code
- allow Tru64 and secur32

Closes #18789

2 months agoTODO: fix a typo
Daniel Stenberg [Wed, 1 Oct 2025 06:16:45 +0000 (08:16 +0200)] 
TODO: fix a typo

Closes #18788

2 months agoip-happy: do not set unnecessary timeout
Stefan Eissing [Mon, 29 Sep 2025 14:38:55 +0000 (16:38 +0200)] 
ip-happy: do not set unnecessary timeout

When attempts on all addresses have been started, do no longer set any
EXPIRE_HAPPY_EYEBALLS timeouts.

Fixes #18767
Reported-by: Johannes Schindelin
Closes #18768

2 months agoasyn-thrdd resolver: clear timeout when done
Stefan Eissing [Mon, 29 Sep 2025 14:44:35 +0000 (16:44 +0200)] 
asyn-thrdd resolver: clear timeout when done

When the async threaded resolver thread returned, clear the
started EXPIRE_ASYNC_NAME timeout.

Closes #18769

2 months agotidy-up: `fcntl.h` includes
Viktor Szakats [Tue, 30 Sep 2025 16:17:52 +0000 (18:17 +0200)] 
tidy-up: `fcntl.h` includes

- drop from source files without obvious users.
- include in `curlx/fopen.h` also for Windows.

Follow-up to 9678ff5b1bfea1c847aee4f9edf023e8f01c9293 #18776

Closes #18782

2 months agoGHA: update dependency openssl/openssl to v3.5.4
renovate[bot] [Tue, 30 Sep 2025 14:31:06 +0000 (14:31 +0000)] 
GHA: update dependency openssl/openssl to v3.5.4

Closes #18781

2 months agobuild: avoid overriding system `open` and `stat` symbols
Viktor Szakats [Mon, 29 Sep 2025 23:27:10 +0000 (01:27 +0200)] 
build: avoid overriding system `open` and `stat` symbols

Replace them by `curlx_open()` and `curlx_stat()`.

To make it obvious in the source code what is being executed.

Also:
- tests/server: stop overriding `open()` for test servers.
  This is critical for the call made from the signal handler.
  For other calls, it's an option to use `curlx_open()`, but
  doesn't look important enough to do it, following the path
  taken with `fopen()`.

Follow-up to 10bac43b873fe45869e15b36aac1c1e5bc89b6e0 #18774
Follow-up to 20142f5d06f7120ba94cbcc25c998e8d81aec85b #18634
Follow-up to bf7375ecc50e857760b0d0a668c436e208a400bd #18503

Closes #18776

2 months agochecksrc: catch banned functions when preceded by `(`
Viktor Szakats [Tue, 30 Sep 2025 10:47:01 +0000 (12:47 +0200)] 
checksrc: catch banned functions when preceded by `(`

Also add a test case.

Closes #18779

2 months agoexamples: fix two more cases of `stat()` TOCTOU
Viktor Szakats [Tue, 30 Sep 2025 09:41:11 +0000 (11:41 +0200)] 
examples: fix two more cases of `stat()` TOCTOU

Also:
- ftpupload: bump an intermediate variable size.

Follow-up to f13250edf11312ab8c0425cf39b182a31b53c6f7 #18605

Closes #18778

2 months agoDockerfile: update debian:bookworm-slim digest to 7e49091
renovate[bot] [Tue, 30 Sep 2025 01:14:11 +0000 (01:14 +0000)] 
Dockerfile: update debian:bookworm-slim digest to 7e49091

Closes #18777

2 months agochecksrc: fix possible endless loop when detecting `BANNEDFUNC`
Viktor Szakats [Mon, 29 Sep 2025 23:46:33 +0000 (01:46 +0200)] 
checksrc: fix possible endless loop when detecting `BANNEDFUNC`

If the source line had square brackets before the match, the stripping
of the banned function left the original line intact, and repeated the
check on it forever. E.g. with banned function `open` in `lib518.c`:
```c
t518_testfd[0] = open(DEV_NULL, O_RDONLY);
```

Closes #18775

2 months agobuild: avoid overriding system symbols for fopen functions
Viktor Szakats [Sun, 14 Sep 2025 13:34:18 +0000 (15:34 +0200)] 
build: avoid overriding system symbols for fopen functions

By introducing wrappers for them in the curlx namespace:
`curlx_fopen()`, `curlx_fdopen()`, `curlx_fclose()`.

The undefine/redefine/`(function)()` methods broke on systems
implementing these functions as macros. E.g. AIX 32-bit's `fopen()`.

Also:
- rename `lib/fopen.*` to `lib/curl_fopen.*` (for `Curl_fopen()`)
  to make room for the newly added `curlx/fopen.h`.
- curlx: move file-related functions from `multibyte.c` to `fopen.c`.
- tests/server: stop using the curl-specific `fopen()` implementation
  on Windows. Unicode isn't used by runtests, and it isn't critical to
  run tests on longs path. It can be re-enabled if this becomes
  necessary, or if the wrapper receives a feature that's critical for
  test servers.

Reported-by: Andrew Kirillov
Bug: https://github.com/curl/curl/issues/18510#issuecomment-3274393640

Follow-up to bf7375ecc50e857760b0d0a668c436e208a400bd #18503
Follow-up to 9863599d69b79d290928a89bf9160f4e4e023d4e #18502
Follow-up to 3bb5e58c105d7be450b667858d1b8e7ae3ded555 #17827

Closes #18634

2 months agotests/server: drop unsafe `open()` override in signal handler (Windows)
Viktor Szakats [Mon, 29 Sep 2025 20:48:55 +0000 (22:48 +0200)] 
tests/server: drop unsafe `open()` override in signal handler (Windows)

Turns out the signal handler on Windows still wasn't signal safe after
the previous round of fix. There is an `open()` call made from there,
and `open` happens to be unconditionally overridden via `curl_setup.h`
on Windows, to its local implementation (`curlx_win32_open()`), which
does memory allocations and potentially other things that are not signal
safe.

This is a temporary fix, till avoiding the override of system symbols
`open` and `stat` on Windows.

FTR this did not fix the CI 2304 errors, diskspace fail or job hangs due
to 0xC0000142 fork failure (it's rare all three occurs in the same run):
https://github.com/curl/curl/actions/runs/18110523584?pr=18774

Ref: #18634
Follow-up e95f509c66abdd88ae02e3243cdc217f19c4a330 #16852
Closes #18774

2 months agocmake: use more `COMPILER_OPTIONS`, `LINK_OPTIONS` / `LINK_FLAGS`
Viktor Szakats [Sun, 28 Sep 2025 00:34:13 +0000 (02:34 +0200)] 
cmake: use more `COMPILER_OPTIONS`, `LINK_OPTIONS` / `LINK_FLAGS`

- replace `COMPILE_FLAGS` with `COMPILE_OPTIONS` that superceded it.

  Follow-up to 6140dfcf3e7845f11dee755de6865379aa96dab7
  https://cmake.org/cmake/help/v4.1/prop_sf/COMPILE_FLAGS.html

- replace `target_link_libraries()` with `LINK_FLAGS` property for
  CMake <=3.12, because we are passing linker options (not libs).

  Follow-up to 91720b620e802748d2e1629f43e29b76736542f9 #18468
  Follow-up to 548873921cde197aa1d40216c594c76738031374 #17670
  Follow-up to 95aea798dbd785c4daee2b2e24f2c8c94f3e3cf4 #5843
  https://cmake.org/cmake/help/v3.7/command/target_link_libraries.html
  https://cmake.org/cmake/help/v3.7/prop_tgt/LINK_FLAGS.html

- replace `target_link_options()` with `LINK_OPTIONS` propery for
  CMake 3.13+, to use the modern style.

  Follow-up to 91720b620e802748d2e1629f43e29b76736542f9 #18468
  Follow-up to 548873921cde197aa1d40216c594c76738031374 #17670
  https://cmake.org/cmake/help/v3.13/command/target_link_options.html
  https://cmake.org/cmake/help/v3.13/prop_tgt/LINK_OPTIONS.html

Also:

- fix to append to, not override, previously set linker options when
  using `CURL_LIBCURL_VERSIONED_SYMBOLS=ON`. Before this patch, it was
  overwriting linker options when using `CURL_CODE_COVERAGE=ON`.

  Follow-up to 91720b620e802748d2e1629f43e29b76736542f9 #18468

Closes #18762

2 months agoGHA/linux-old: make one cmake v3.7.2 job verbose
Viktor Szakats [Sun, 28 Sep 2025 09:54:57 +0000 (11:54 +0200)] 
GHA/linux-old: make one cmake v3.7.2 job verbose

To show the details in cmake builds using the oldest supported version.
Use a legacy method. `--verbose` became supported later, in 3.14.

Closes #18764

2 months agoCI: make pip use `tests/requirements.txt` in Circle CI
Viktor Szakats [Sat, 27 Sep 2025 22:32:49 +0000 (00:32 +0200)] 
CI: make pip use `tests/requirements.txt` in Circle CI

Also sync `pip` options with those used in GHA.

Closes #18760

2 months agoci: use `--enable-option-checking=fatal` in autotools jobs
Viktor Szakats [Sat, 27 Sep 2025 21:51:46 +0000 (23:51 +0200)] 
ci: use `--enable-option-checking=fatal` in autotools jobs

To avoid typos and non-existing options passed to `./configure` in CI
builds.

Also delete obsolete option `--enable-test-bundles` from Circle CI jobs.

Closes #18759

2 months agoGHA/windows: tidy up Cygwin jobs
Viktor Szakats [Sat, 27 Sep 2025 15:58:29 +0000 (17:58 +0200)] 
GHA/windows: tidy up Cygwin jobs

- drop unnecessary installed packages.
- sync built type name with other jobs.

Closes #18758

2 months agoGHA: update dependency awslabs/aws-lc to v1.61.4
renovate[bot] [Fri, 26 Sep 2025 21:53:21 +0000 (21:53 +0000)] 
GHA: update dependency awslabs/aws-lc to v1.61.4

Closes #18752

2 months agoGHA/linux: tidy up AWS-LC local build
Viktor Szakats [Sat, 27 Sep 2025 11:02:12 +0000 (13:02 +0200)] 
GHA/linux: tidy up AWS-LC local build

To sync with other builds and to use `-B` to avoid a cmake warning and
future breakage.

Closes #18757

2 months agotidy-up: miscellaneous
Viktor Szakats [Tue, 16 Sep 2025 17:28:27 +0000 (19:28 +0200)] 
tidy-up: miscellaneous

- GHA/checkdocs: rename `spellcheck` job to `pyspelling` to say
  the exact tool used.
- GHA/checkdocs: restore a comment.
- GHA/linux: add `-B .` to a cmake configure to avoid warning, and
  future breakage.
- autotools: use correct casing for `Schannel`.
- doh: update RFC URL.
- drop redundant parenthesis.
- fix indentation, whitespace.

Closes #18756

2 months agoperlcheck: parallelize
Viktor Szakats [Fri, 26 Sep 2025 18:57:16 +0000 (20:57 +0200)] 
perlcheck: parallelize

Follow-up to 34b1e146e42f2dbac5c89414a2a0458a8729a255 #18745

Closes #18750

2 months agocf-ip-happy: mention unix domain path, not port number
Daniel Stenberg [Fri, 26 Sep 2025 14:30:34 +0000 (16:30 +0200)] 
cf-ip-happy: mention unix domain path, not port number

In the connect error message if a unix domain socket was used.

Reported-by: kuchara on github
Ref: #18748
Closes #18749

2 months agoperlcheck: add script, run in CI, fix fallouts
Viktor Szakats [Wed, 24 Sep 2025 23:54:28 +0000 (01:54 +0200)] 
perlcheck: add script, run in CI, fix fallouts

Add script to run all Perl sources through `perl -c` to ensure no
issues, and run this script via GHA/checksrc in CI.

Fallouts:
- fix two repeated declarations.
- move `shell_quote()` from `testutil.pm` to `pathhelp.pm`, to
  avoid circular dependency in `globalconfig.pm`.

Closes #18745

2 months agoopenldap: check ber_sockbuf_add_io() return code
Daniel Stenberg [Fri, 26 Sep 2025 11:53:04 +0000 (13:53 +0200)] 
openldap: check ber_sockbuf_add_io() return code

The man page says nothing about what the return code means but Howard
Chu tells me it is 0 on success, -1 on fail.

Help-by: Howard Chu
Closes #18747

2 months agotool_progress: handle possible integer overflows
Daniel Stenberg [Fri, 26 Sep 2025 07:43:19 +0000 (09:43 +0200)] 
tool_progress: handle possible integer overflows

The progress meters max out at 2^63 bytes.

Reported-by: BobodevMm on github
Fixes #18744
Closes #18746

2 months agohttp: handle user-defined connection headers
Stefan Eissing [Mon, 22 Sep 2025 13:48:07 +0000 (15:48 +0200)] 
http: handle user-defined connection headers

When there is more than one user-supplied 'Connection: ' header, add
values that curl needs internally to the first one and emit all
subsequent ones thereafter.

Fixes #18662
Reported-by: Evgeny Grin (Karlson2k)
Closes #18686

2 months agoRELEASE-NOTES: synced
Daniel Stenberg [Thu, 25 Sep 2025 21:35:31 +0000 (23:35 +0200)] 
RELEASE-NOTES: synced

2 months agoopenssl: fail the transfer if ossl_certchain() fails
Daniel Stenberg [Sat, 20 Sep 2025 20:32:23 +0000 (22:32 +0200)] 
openssl: fail the transfer if ossl_certchain() fails

Since it would indicate errors to the degree that continuing would just
risk hiding the earlier errors or make things weird.

Inspired by a report in Joshua's sarif data

Closes #18646

2 months agoGHA: update dependency ruff and github/codeql-action
renovate[bot] [Thu, 25 Sep 2025 15:03:08 +0000 (15:03 +0000)] 
GHA: update dependency ruff and github/codeql-action

- update github/codeql-action digest to 303c0ae
- update dependency ruff to v0.13.2

Closes #18716
Closes #18734

2 months agolibssh: acknowledge SSH_AGAIN in the SFTP state machine
Daniel Stenberg [Thu, 25 Sep 2025 14:38:49 +0000 (16:38 +0200)] 
libssh: acknowledge SSH_AGAIN in the SFTP state machine

Reported in Joshua's sarif data

Closes #18740

2 months agolibssh: clarify myssh_block2waitfor
Daniel Stenberg [Thu, 25 Sep 2025 14:32:18 +0000 (16:32 +0200)] 
libssh: clarify myssh_block2waitfor

Fixed misleading comment. Simplified the bit setup.

Reported in Joshua's sarif data

Closes #18739

2 months agoGHA: use `pyspelling` directly
Viktor Szakats [Thu, 25 Sep 2025 12:50:15 +0000 (14:50 +0200)] 
GHA: use `pyspelling` directly

To avoid depending on Docker Hub, an Docker image and a GitHub Action.
Also to simplify running this check on a local machine.

Pending question if Dependabot and Mend/Renovate will automatically pick
up `requirements-docs.txt`.

Also:
- enable parallel spellchecking. (also to win back the time lost with
  installing components directly from Debian and pip.)
- pin `pyspelling`.
- link to official `pyspelling` docs.

Closes #18736

2 months agosocks: handle error in verbose trace gracefully
Stefan Eissing [Thu, 25 Sep 2025 10:00:57 +0000 (12:00 +0200)] 
socks: handle error in verbose trace gracefully

Adjust the flow to always succeed in verbose trace of connect.

Reported in Joshua's sarif data

Closes #18722

2 months agotftp: only check address if it was stored
Daniel Stenberg [Thu, 25 Sep 2025 14:19:56 +0000 (16:19 +0200)] 
tftp: only check address if it was stored

If recvfrom() fails, it might not have stored an address.

Follow-up to c4f9977c66bbb05a837a7eb03004dd79c3cc9b44

Pointed out by CodeSonar

Closes #18738

2 months agoschannel_verify: use more human friendly error messages
Daniel Stenberg [Thu, 25 Sep 2025 12:52:38 +0000 (14:52 +0200)] 
schannel_verify: use more human friendly error messages

Closes #18737

2 months agoGHA: set `HOMEBREW_NO_AUTO_UPDATE=1` for Linuxbrew
Viktor Szakats [Thu, 25 Sep 2025 12:38:48 +0000 (14:38 +0200)] 
GHA: set `HOMEBREW_NO_AUTO_UPDATE=1` for Linuxbrew

In an attempt to make `brew install` commands initialize faster.

Often this command started with 20-50 seconds of delay before this
patch. This is an attempt to make it launch faster.

Cherry-picked from #18736

2 months agoGHA/checksrc: drop no longer used `DEBIAN_FRONTEND` env
Viktor Szakats [Thu, 25 Sep 2025 12:34:46 +0000 (14:34 +0200)] 
GHA/checksrc: drop no longer used `DEBIAN_FRONTEND` env

Follow-up to 7d5f8be532c19ec73063aaa4f27057047bdae5ac #18708
Cherry-picked from #18736

2 months agoKNOWN_BUGS: telnet code does not handle partial writes properly
Daniel Stenberg [Thu, 25 Sep 2025 11:40:54 +0000 (13:40 +0200)] 
KNOWN_BUGS: telnet code does not handle partial writes properly

Reported in Joshua's sarif data

Closes #18735

2 months agoGHA: bump pip `cryptography`, relax `impacket` version requirement
Viktor Szakats [Thu, 25 Sep 2025 11:14:36 +0000 (13:14 +0200)] 
GHA: bump pip `cryptography`, relax `impacket` version requirement

Bump `cryptography` to a newer version that fixes two known OpenSSL
vulnerabilities reported by Dependabot.

To make it work, also allow `impacket` 0.11.0, because it allows any
pyOpenSSL version, while 0.12.0 pinned it to a single version that
happens to be incompatible with the bugfixed `cryptography` version.

Also: drop spaces from `requirements.txt` files. Bots don't add them,
though they seem to be preferred in the official documentation:
https://pip.pypa.io/en/stable/reference/requirements-file-format/

https://github.com/fortra/impacket/blob/impacket_0_11_0/requirements.txt
https://github.com/fortra/impacket/blob/impacket_0_12_0/requirements.txt

Follow-up to 7d5f8be532c19ec73063aaa4f27057047bdae5ac #18708

Closes #18731

2 months agoopenssl: set io_need always
Stefan Eissing [Thu, 25 Sep 2025 11:31:17 +0000 (13:31 +0200)] 
openssl: set io_need always

When OpenSSL reports SSL_ERROR_WANT_READ, set the io_need explicitly.
It should have already been set by the BIO, but be safe.

Reported in Joshua's sarif data

Closes #18733

2 months agotransfer: avoid busy loop with tiny speed limit
Stefan Eissing [Thu, 25 Sep 2025 11:25:29 +0000 (13:25 +0200)] 
transfer: avoid busy loop with tiny speed limit

When a transfer has a speed limit less than 4, the receive loop early
exits without receiving anything, causing a busy loop for that transfer.

Perform that check only after the first receive has been done.

Reported in Joshua's sarif data

Closes #18732

2 months agoquiche: when ingress processing fails, return that error code
Stefan Eissing [Thu, 25 Sep 2025 11:17:48 +0000 (13:17 +0200)] 
quiche: when ingress processing fails, return that error code

Instead of a general CURLE_RECV_ERROR.

Reported in Joshua's sarif data

Closes #18730

2 months agowolfssl: fix error check in shutdown
Stefan Eissing [Thu, 25 Sep 2025 11:11:58 +0000 (13:11 +0200)] 
wolfssl: fix error check in shutdown

When trying to send the TLS shutdown, use the return code
to check for the cause.

Reported in Joshua's sarif data

Closes #18729

2 months agorustls: fix comment describing cr_recv()
Stefan Eissing [Thu, 25 Sep 2025 10:59:36 +0000 (12:59 +0200)] 
rustls: fix comment describing cr_recv()

The comments on `cf_recv()` function were outdated and described
calling conventions that no longer are true.

Reported in Joshua's sarif data

Closes #18728

2 months agombedtls: check result of setting ALPN
Stefan Eissing [Thu, 25 Sep 2025 10:53:37 +0000 (12:53 +0200)] 
mbedtls: check result of setting ALPN

The result of setting the negotiated ALPN was not checked, leading
to reporting success when it should not have.

Reported in Joshua's sarif data

Closes #18727

2 months agoquiche: fix verbose message when ip quadruple cannot be obtained.
Stefan Eissing [Thu, 25 Sep 2025 10:46:09 +0000 (12:46 +0200)] 
quiche: fix verbose message when ip quadruple cannot be obtained.

Reported in Joshua's sarif data

Closes #18726

2 months agoopenssl-quic: handle error in SSL_get_stream_read_error_code
Stefan Eissing [Thu, 25 Sep 2025 10:38:02 +0000 (12:38 +0200)] 
openssl-quic: handle error in SSL_get_stream_read_error_code

The return code of SSL_get_stream_read_error_code() was not checked
in one location, but others. Make that consistent.

Reported in Joshua's sarif data

Closes #18725

2 months agoopenssl: clear retry flag on x509 error
Stefan Eissing [Thu, 25 Sep 2025 10:11:15 +0000 (12:11 +0200)] 
openssl: clear retry flag on x509 error

When loading the trust anchors and encountering an error, clear
a possibly set retry flag.

Reported in Joshua's sarif data

Closes #18724

2 months agongtcp2: fix early return
Stefan Eissing [Thu, 25 Sep 2025 10:07:25 +0000 (12:07 +0200)] 
ngtcp2: fix early return

On a failed tls handshake, the receive function returned without
restoring the current data.

Reported in Joshua's sarif data

Closes #18723

2 months agoopenssl-quic: check results better
Stefan Eissing [Thu, 25 Sep 2025 09:49:45 +0000 (11:49 +0200)] 
openssl-quic: check results better

Fail on errors from SSL_handle_events().
Force quit Caddy test instance that is left hanging longer with
openssl-quic tests for unknown reasons.

Reported in Joshua's sarif data

Closes #18720

2 months agowolfssl: check BIO read parameters
Stefan Eissing [Thu, 25 Sep 2025 09:25:17 +0000 (11:25 +0200)] 
wolfssl: check BIO read parameters

Check parameters passed more thoroughly and assure that current 'data'
also exists.

Reported in Joshua's sarif data

Closes #18718

2 months agovtls: alpn setting, check proto parameter
Stefan Eissing [Thu, 25 Sep 2025 09:15:15 +0000 (11:15 +0200)] 
vtls: alpn setting, check proto parameter

When setting the negotiated alpn protocol, either then length
must be 0 or a pointer must be passed.

Reported in Joshua's sarif data

Closes #18717

2 months agosocks: rewwork, cleaning up socks state handling
Stefan Eissing [Tue, 26 Aug 2025 13:54:32 +0000 (15:54 +0200)] 
socks: rewwork, cleaning up socks state handling

Restructured the code in the following ways:

* add terminal states SUCCESS and FAILED
* split SOCK4 and SOCK5 states to be more clear
* use `bufq` for send/recv of SOCK messages
* reduce SOCKS4 states, more speaking names
* for most states, move code into static function
* reduce SOCKS5 states, more speaking names
* add helpers for traversing to FAILED state
* add helper to flush bufq
* add hepler to read minimum amount into bufq

Closes #18401