]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
4 weeks agomake test1459 use the new option bagder/knownhosts 18859/head
Daniel Stenberg [Mon, 6 Oct 2025 09:30:24 +0000 (11:30 +0200)] 
make test1459 use the new option

4 weeks agofixup the docs
Daniel Stenberg [Mon, 6 Oct 2025 09:30:18 +0000 (11:30 +0200)] 
fixup the docs

4 weeks agoUpdate docs/cmdline-opts/knownhosts.md
Daniel Stenberg [Mon, 6 Oct 2025 05:53:00 +0000 (07:53 +0200)] 
Update docs/cmdline-opts/knownhosts.md

fixup mistake

Co-authored-by: Viktor Szakats <vszakats@users.noreply.github.com>
4 weeks agofixup docs/options-in-versions
Daniel Stenberg [Sun, 5 Oct 2025 21:27:31 +0000 (23:27 +0200)] 
fixup docs/options-in-versions

4 weeks agofixup spelling
Daniel Stenberg [Sun, 5 Oct 2025 21:23:55 +0000 (23:23 +0200)] 
fixup spelling

4 weeks agotool_getparam: add --knownhosts
Daniel Stenberg [Sun, 5 Oct 2025 21:19:13 +0000 (23:19 +0200)] 
tool_getparam: add --knownhosts

To allow users to specify a known hosts file that is not the default
one: ~/.ssh/known_hosts

URL: https://github.com/curl/curl/discussions/18784

4 weeks agourl: make Curl_init_userdefined return void
Daniel Stenberg [Sun, 5 Oct 2025 12:07:39 +0000 (14:07 +0200)] 
url: make Curl_init_userdefined return void

It cannot actually return an error, so the parent function does not need
to check for error and have an exit path that cannot be reached.

Pointed out by CodeSonar

Closes #18855

4 weeks agostrerror: drop workaround for SalfordC win32 header bug
Viktor Szakats [Sun, 5 Oct 2025 16:36:06 +0000 (18:36 +0200)] 
strerror: drop workaround for SalfordC win32 header bug

Follow-up to ccf43ce91dd9a56f30a4029377126e4c83c7f08a #15957

Closes #18857

4 weeks agoGHA/http3-linux: cleanup cache entry name after prev
Viktor Szakats [Sun, 5 Oct 2025 09:08:40 +0000 (11:08 +0200)] 
GHA/http3-linux: cleanup cache entry name after prev

To avoid duplicate `no-deprecated` in the cache entry name.

Follow-up to c96bf36557ea2302e4cb838ee1e4bb9827fecee7 #18833

Closes #18853

4 weeks agotelnet: print DISPlay LOCation in printsub without mutating buffer
Joshua Rogers [Sun, 5 Oct 2025 03:07:54 +0000 (11:07 +0800)] 
telnet: print DISPlay LOCation in printsub without mutating buffer

Closes #18852

4 weeks agotelnet: use pointer[0] for "unknown" option instead of pointer[i]
Joshua Rogers [Sun, 5 Oct 2025 02:57:29 +0000 (10:57 +0800)] 
telnet: use pointer[0] for "unknown" option instead of pointer[i]

i is taken from pointer[length-2] (often the IAC byte) before we do
length -= 2, so using pointer[i] indexes an arbitrary/stale byte
unrelated to the option code. pointer[0] is the suboption’s option code
per the telnet SB format, so printing pointer[0] yields correct, stable
diagnostics.

Closes #18851

4 weeks agocpool: make bundle->dest an array; fix UB
Joshua Rogers [Sun, 5 Oct 2025 02:38:14 +0000 (10:38 +0800)] 
cpool: make bundle->dest an array; fix UB

Replace `char *dest[1]` with a proper `char dest[1]` array in
cpool_bundle. This removes undefined behavior from memcpy (writing past
the declared object) while keeping the same key semantics: dest_len is
strlen+1 (includes NUL), and hash add/delete calls remain unchanged.

Closes #18850

4 weeks agoGHA: remove the hacktoberfest label action
Daniel Stenberg [Sat, 4 Oct 2025 21:17:32 +0000 (23:17 +0200)] 
GHA: remove the hacktoberfest label action

No one cares about hacktoberfest anymore.

Closes #18849

4 weeks agochecksrc: fix possible endless loops/errors in the banned function logic
Viktor Szakats [Sat, 4 Oct 2025 11:04:29 +0000 (13:04 +0200)] 
checksrc: fix possible endless loops/errors in the banned function logic

By quoting the search expression to be replaced. This avoid the issue
when the code leading up to a banned function contained regex characters
that the script did not explicitly handle, e.g. `+`.

Assisted-by: Daniel Stenberg
Ref: https://perldoc.perl.org/functions/quotemeta
Follow-up to dd37d6970cfd8b4cf47ebd469f03772813b92c23 #18775

Closes #18845

4 weeks agounit1664: drop casts, expand masks to full values
Viktor Szakats [Sat, 4 Oct 2025 00:53:02 +0000 (02:53 +0200)] 
unit1664: drop casts, expand masks to full values

Follow-up to 4deea9396bc7dd25c6362fa746a57bf309c74ada #18814

Closes #18838

4 weeks agoGHA: drop quictls 3.3.0 builds in favor of openssl 3.5+
Viktor Szakats [Fri, 3 Oct 2025 14:40:28 +0000 (16:40 +0200)] 
GHA: drop quictls 3.3.0 builds in favor of openssl 3.5+

- http3-linux: move local nghttpx (nghttp2) build to openssl (from
  quictls). Also tried LibreSSL, but it made some HTTP/2 tests fails.

- http3-linux: drop quictls ngtcp2 build.

- http3-linux: build local openssl with `no-deprecated`.
  (previously tested in the quictls local build.)

- http3-linux: explicitly disable LDAP in cmake openssl jobs.
  cmake builds auto-detect OpenLDAP (autotools don't), and when enabled,
  linking curl fails because system `libsasl.so` requires MD5 openssl
  functions, which are missing from openssl no-deprecated builds.

- macos: move options tested in quictls jobs to other ones.

- linux: drop unused quictls local build. (it was used for msh3.)
  Follow-up to 91138b014d960d2ef6ce9cd0ca237d0220b2458d #17729

- renovate: drop quictls bump detection.

Closes #18833

4 weeks agoexamples: fix two build issues surfaced with WinCE
Viktor Szakats [Sat, 4 Oct 2025 02:33:49 +0000 (04:33 +0200)] 
examples: fix two build issues surfaced with WinCE

Both may apply to rare non-WinCE Windows builds too.

- fix gcc 4.4.0 preprocessor error:
  ```
  docs/examples/http2-upload.c:43:8: error: "_MSC_VER" is not defined
  ```
  Ref: https://github.com/curl/curl/actions/runs/18238150607/job/51935502616

- fix wrong header order:
  Inlcude `windows.h` after `winsock2.h` via `curl/curl.h`.

Regressions from 45438c8d6f8e70385d66c029568524e9e803c539 #18823

Closes #18843

4 weeks agoexamples: drop unused `curl/mprintf.h` includes
Viktor Szakats [Sat, 4 Oct 2025 02:51:19 +0000 (04:51 +0200)] 
examples: drop unused `curl/mprintf.h` includes

Follow-up to 45438c8d6f8e70385d66c029568524e9e803c539 #18823

Closes #18842

4 weeks agoopenssl: fix build for v1.0.2
Viktor Szakats [Sat, 4 Oct 2025 02:12:17 +0000 (04:12 +0200)] 
openssl: fix build for v1.0.2

```
lib/vtls/openssl.c: In function 'asn1_object_dump':
lib/vtls/openssl.c:299:42: error: passing argument 3 of 'i2t_ASN1_OBJECT' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
  299 |   int i = i2t_ASN1_OBJECT(buf, (int)len, a);
      |                                          ^
In file included from /home/runner/djgpp/include/openssl/objects.h:965,
                 from /home/runner/djgpp/include/openssl/evp.h:94,
                 from /home/runner/djgpp/include/openssl/x509.h:73,
                 from /home/runner/djgpp/include/openssl/ssl.h:156,
                 from lib/curl_ntlm_core.c:71,
                 from bld/lib/CMakeFiles/libcurl_static.dir/Unity/unity_0_c.c:88:
/home/runner/djgpp/include/openssl/asn1.h:921:58: note: expected 'ASN1_OBJECT *' {aka 'struct asn1_object_st *'} but argument is of type 'const ASN1_OBJECT *' {aka 'const struct asn1_object_st *'}
  921 | int i2t_ASN1_OBJECT(char *buf, int buf_len, ASN1_OBJECT *a);
      |                                             ~~~~~~~~~~~~~^
```
Ref: https://github.com/curl/curl/actions/runs/18236773678/job/51931937131?pr=18039

Follow-up to bb46d42407cd0503a9c499b4646af594a4db4947 #18647

Closes #18841

4 weeks agolib: drop unused include and duplicate guards
Viktor Szakats [Sat, 4 Oct 2025 01:11:09 +0000 (03:11 +0200)] 
lib: drop unused include and duplicate guards

Closes #18839

4 weeks agotests: stop overriding system printf symbols
Viktor Szakats [Thu, 2 Oct 2025 14:01:15 +0000 (16:01 +0200)] 
tests: stop overriding system printf symbols

To make the source code match the functions called at runtime.
And to avoid the preprocessor trick that may introduces build issues.

Before this patch, libtests, tunits and units were calling a mixture
of curl and system printf calls, then transformed them all to curl
printf calls by including `curl_printf.h`.

Changes made:
- tests: stop including `curl_printf.h`.
- libtest: switch a couple of outlier system printf calls to curl
  printf.
- unit: use more curl printf to avoid casts and show whole values.
- unit: switch remaining calls to curl printf explicitly.
- tunit: switch to call curl printf explicitly.
- libtest, tunit, unit: ban system printf.
- unit1307, unit1607, unit1609, unit1652, unit1655, unit3214: bump
  types/masks to avoid casts.

After this patch:
- libtests, tunits, units: use exclusively curl printf.
  (as before, but explicitly, without relying on redefinitions.)
- servers: is unchanged (it can only use system printf).

Closes #18814

4 weeks 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

4 weeks 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

4 weeks 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

4 weeks 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

4 weeks 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

4 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

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

5 weeks 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

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

Closes #18788

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

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

Follow-up to 34b1e146e42f2dbac5c89414a2a0458a8729a255 #18745

Closes #18750

5 weeks 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

5 weeks 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

6 weeks 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

6 weeks 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

6 weeks 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

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

6 weeks 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

6 weeks 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

6 weeks 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

6 weeks 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

6 weeks 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