]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
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

6 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

6 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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

6 weeks agolib: upgrade/multiplex handling
Stefan Eissing [Fri, 8 Aug 2025 10:15:25 +0000 (12:15 +0200)] 
lib: upgrade/multiplex handling

Improvements around HTTP Upgrade: and multiplex hanndling:

* add `Curl_conn_set_multiplex()` to set connection's multiplex
  bit and trigger "connchanged" events
* call `Curl_conn_set_multiplex()` in filters' `CF_CTRL_CONN_INFO_UPDATE`
  implementation where other connection properties are updated.
  This prevents connection updates before the final filter chain
  is chosen.
* rename enum `UPGR101_INIT` to `UPGR101_NONE`
* rename connection bit `asks_multiplex` to `upgrade_in_progress`
* trigger "connchanged" when `upgrade_in_progress` clears
* rename `WebSockets` to `WebSocket` as it is the common term
  used in documentation

Closes #18227

6 weeks agosocks_sspi: bail out on too long fields
Daniel Stenberg [Thu, 25 Sep 2025 09:30:24 +0000 (11:30 +0200)] 
socks_sspi: bail out on too long fields

A probably unnecessary precaution but since the field sizes are 16 bit in the
protocol this makes sure to fail if they would ever be larger as that would go
wrong.

Reported in Joshua's sarif data

Closes #18719

6 weeks agoGHA/checksrc: run `reuse` directly, merge into the linters workflow
Viktor Szakats [Thu, 25 Sep 2025 09:53:47 +0000 (11:53 +0200)] 
GHA/checksrc: run `reuse` directly, merge into the linters workflow

To eliminate dependencies on an Action, Docker Hub and to simplify.

Closes #18721

6 weeks agoGHA: update dependency ruff to v0.13.1
renovate[bot] [Thu, 25 Sep 2025 08:48:20 +0000 (08:48 +0000)] 
GHA: update dependency ruff to v0.13.1

6 weeks agosocks_gssapi: remove superfluous releases of the gss_recv_token
Daniel Stenberg [Thu, 25 Sep 2025 08:35:40 +0000 (10:35 +0200)] 
socks_gssapi: remove superfluous releases of the gss_recv_token

Reported in Joshua's sarif data

Closes #18714

6 weeks agocf-h2-proxy: break loop on edge case
Stefan Eissing [Thu, 25 Sep 2025 08:42:24 +0000 (10:42 +0200)] 
cf-h2-proxy: break loop on edge case

nghttp2 always consumes the memory, but be safe in case it ever decideds
to not to.

Fixes J2
Reported in Joshua's sarif data
Closes #18715

6 weeks agoGHA: use pip `requirements.txt` with pins, and more venv
Viktor Szakats [Wed, 24 Sep 2025 15:22:52 +0000 (17:22 +0200)] 
GHA: use pip `requirements.txt` with pins, and more venv

- requirements.txt: shorten copyright headers.

- requirements.txt: pin packages to versions.

- GHA/windows: use `tests/requirements.txt`.
  Pick a `cryptography` package version that satifies both `impacket`
  and pytests dependencies.

- GHA/checksrc: move pip deps into a new `requirements.txt`.
  To make Dependabot detect and bump them.

- GHA/checksrc: replace apt packages for python test deps with pip
  install `tests/**/requirements.txt` to a venv.

- GHA/checksrc: use venv and drop `--break-system-packages`.

- GHA/linux: fix to actually activate venvs.
  Follow-up to 2638570241cb9e68240d7621f0213916334a4765 #15578

- GHA/linux: fixup (did not cause an issue)
  Follow-up to d75785c7dea214d12525beb659694d3fcc483731 #18660

- GHA: create venvs later, simplify commands.

- GHA: sync pip command-line options, e.g. drop progress-bar,
  everywhere.

Assisted-by: Dan Fandrich
Closes #18708

6 weeks agoOS400: fix a use-after-free/double-free case
Patrick Monnerat [Wed, 24 Sep 2025 23:14:19 +0000 (01:14 +0200)] 
OS400: fix a use-after-free/double-free case

Closes #18713

6 weeks agosocks_gssapi: remove the forced "no protection"
Daniel Stenberg [Sun, 21 Sep 2025 21:34:37 +0000 (23:34 +0200)] 
socks_gssapi: remove the forced "no protection"

If a protected connection is requested, don't claim to drop down to "no
protection".

Reported in Joshua's sarif data

Closes #18712

6 weeks agosocks_gssapi: make the gss_context a local variable
Daniel Stenberg [Thu, 25 Sep 2025 06:45:53 +0000 (08:45 +0200)] 
socks_gssapi: make the gss_context a local variable

Reported-by: Stanislav Fort
Closes #18711

6 weeks agombedtls: handle WANT_WRITE from mbedtls_ssl_read()
Daniel Stenberg [Mon, 22 Sep 2025 09:27:27 +0000 (11:27 +0200)] 
mbedtls: handle WANT_WRITE from mbedtls_ssl_read()

The mbedtls_ssl_read() function is documented to be able to also return
MBEDTLS_ERR_SSL_WANT_WRITE, so act on that accordingly instead of
returning error for it.

Assisted-by: Stefan Eissing
Reported in Joshua's sarif data
Closes #18682

6 weeks agoKNOWN_BUGS: Access violation sending client cert with SChannel
Daniel Stenberg [Mon, 22 Sep 2025 08:09:18 +0000 (10:09 +0200)] 
KNOWN_BUGS: Access violation sending client cert with SChannel

It seems we can select between crashing or leaking sensitive files
because Schannel is buggy.

Closes #17626
Closes #18679