Commit Graph

1555 Commits

Author SHA1 Message Date
Viktor Szakats
0bfd2645ca
GHA/windows: set lookup-only in build-cache jobs
To save a few seconds by not actually restoring the cache, just checking
if there is cache hit.

Follow-up to fb44e44d92 #20456

Closes #20512
2026-02-04 03:07:29 +01:00
Viktor Szakats
d442be2ce3
typos: silence false positives found in C code
Closes #20500
2026-02-03 00:59:41 +01:00
dependabot[bot]
47734f3244
GHA: bump GHA and pip dependencies
- update `actions/checkout` from 6.0.1 to 6.0.2
- update `ruff` from 0.14.11 to 0.14.14
- update `cryptography` from 46.0.3 to 46.0.4
- update `psutil` from 7.2.1 to 7.2.2
- update `websockets` from 15.0.1 to 16.0

Closes #20490
Closes #20491
2026-02-01 16:40:37 +01:00
Viktor Szakats
b619952b82
GHA/windows: fix typo in test number [ci skip]
Follow-up to 3ae234b2a3 #20462
2026-01-30 00:24:21 +01:00
Viktor Szakats
d60f1006b0
GHA/macos: merge an autotools job into a cmake one, drop an iOS job
Merging the two macOS jobs saves 4-5 minutes. The dropped iOS Ninja job
saves 0.5-1 minute. (Keep the two slow iOS jobs to maintain variation.)

Number of Apple jobs is 32 after this patch.

Also:
- skip building tests and example in iOS autotools to save 30-40s.

Closes #20467
2026-01-29 03:10:21 +01:00
Dan Fandrich
3509a41494 docs: document the need for a 64-bit type and stdint.h
These are requirements above and above C89.

Ref: #20406

Closes #20384
2026-01-28 08:45:56 -08:00
Viktor Szakats
3ae234b2a3
GHA/windows: mark test 3001 flaky in native Windows jobs
It has been happening for a long time.

Example:
```
test 3001...[HTTPS localhost, last subject alt name matches, CN does not match]

 3001: protocol FAILED!
 There was no content at all in the file log/7/server.input.
 Server glitch? Total curl failure? Returned: 56
== Contents of files in the log/7/ directory after test 3001
=== Start of file commands.log
 ../src/curl.exe -q --output log/7/curl3001.out  --include --trace-ascii log/7/trace3001 --trace-time -4 --cacert ./certs/test-ca.crt https://localhost:64259/3001 > log/7/stdout3001 2> log/7/stderr3001
=== End of file commands.log
=== Start of file http_server.log
 13:57:47.951283 Running HTTP IPv4 version on port 64256
=== End of file http_server.log
=== Start of file https_stunnel.log
 2026.01.28 13:57:48 LOG5[ui]: stunnel 5.76 on x64-pc-mingw32-gnu platform
 2026.01.28 13:57:48 LOG5[ui]: Compiled/running with OpenSSL 3.5.4 30 Sep 2025
 [...]
 2026.01.28 13:57:49 LOG5[0]: Service [curltest] accepted connection from 127.0.0.1:64281
 2026.01.28 13:57:51 LOG3[0]: s_connect: connect 127.0.0.1:64256: Connection refused (WSAECONNREFUSED) (10061)
 2026.01.28 13:57:51 LOG3[0]: No more addresses to connect
 2026.01.28 13:57:51 LOG5[0]: Connection reset: 0 byte(s) sent to TLS, 0 byte(s) sent to socket
=== End of file https_stunnel.log
=== Start of file server.cmd
 Testnum 3001
=== End of file server.cmd
=== Start of file stderr3001
 curl: (56) Recv failure: Connection was reset
=== End of file stderr3001
[...]
RUN: Unknown server on our https port: 64259 (56)
```

Ref: https://github.com/curl/curl/actions/runs/21440845836/job/61743268798?pr=20461

Closes #20462
2026-01-28 15:47:36 +01:00
renovate[bot]
3b1c2a1510
GHA: update openssl/openssl to v3.6.1
Closes #20449
2026-01-28 08:08:07 +01:00
Viktor Szakats
fb44e44d92
GHA/windows: fix shell, fix GHA fail to share cache between arm and intel Windows
A cache entry created by windows-2022 is not picked up by
windows-11-arm. Also a cache created by windows-11-arm is not picked up
by windows-2022. Possibly related to this filed in 2025 June:
https://github.com/actions/cache/issues/1622. Also tried
`enableCrossOsArchive` to no avail. Unclear if these two runners count
as distinct operating systems, I'd guess not. Cache entries are
identical on the web UI. Via GH API they show up with the same cache key
bot different "version" (hash) and different sizes, possibly due to the
zstd vs. gzip bug above.

Fixing (identical error text on either runner):
```
Error: Failed to restore cache entry. Exiting as fail-on-cache-miss is set. Input key: Windows-stunnel-5.76-amd64
```

Also fix a silly typo in the shell value.

Follow-up to 0f54ca6150 #20454
Closes #20456
2026-01-28 02:33:57 +01:00
Viktor Szakats
0f54ca6150
GHA/windows: cache stunnel
To avoid hammering `stunnel.org`.

Follow-up to 7c3a4a4b4c #20410

Closes #20454
2026-01-27 19:58:48 +01:00
Viktor Szakats
63d75de95d
GHA: sync up configure option order across builds
Closes #20423
2026-01-26 12:08:47 +01:00
Daniel Stenberg
ca7ef4b817
BUG-BOUNTY.md: we stop the bug-bounty end of Jan 2026
Remove mentions of the bounty and hackerone.

Closes #20312
2026-01-26 08:26:28 +01:00
Viktor Szakats
4516023152
GHA: switch 3 more small jobs to ubuntu-slim
Follow-up to 30c49db6f7 #20431

Closes #20433
2026-01-25 19:29:24 +01:00
Viktor Szakats
30c49db6f7
GHA: use ubuntu-slim image in 3 jobs
For small jobs using no parallelism, and which still use x64 for faster
`apt install`. x64 1-core (vs. 4), 5GB RAM (vs. 16), no Linuxbrew,
no arm64.

Refs:
https://docs.github.com/en/actions/reference/runners/github-hosted-runners
https://github.blog/changelog/2026-01-22-1-vcpu-linux-runner-now-generally-available-in-github-actions/
285cf722f0/images/ubuntu-slim/ubuntu-slim-Readme.md

Closes #20431
2026-01-25 18:54:12 +01:00
Viktor Szakats
6f7ce1e45f
GHA: set --enable-option-checking=fatal where missing
Closes #20422
2026-01-25 04:54:16 +01:00
Viktor Szakats
64728418ff
GHA/codeql: improve perf on Windows, enable CURL_WERROR=ON, and more
- set `CURL_DROP_UNUSED=ON` for Windows (MSVC) to make the analysis step
  faster: 1m30s -> 1m15s

- enable `CURL_WERROR=ON` in all builds, to catch potential build issues
  in addition to running CodeQL. To make these builds useful as regular
  build tests too.

- add links to CodeQL Actions documentation.

- delete test data C files after checkout in an attempt to remove them
  from CodeQL code coverage stats.

Closes #20418
2026-01-24 13:10:26 +01:00
Viktor Szakats
7c3a4a4b4c
GHA/windows: install stunnel manually, enable for Cygwin
Replace Chocolatey install with direct download and unpack. To reduce
CI dependencies (Chocolatey, NuGet), improve install performance
(10s -> 1s) and hopefully reliability. Last but not least to enable it
for the Cygwin CI job.

Caveats:
- Need to bump stunnel versions manually (2-3 times a year).
  Renovate could likely do it, but I failed to understand its
  documentation and miss tooling/interface to make tests.
- FIPS not enabled. (can be done if necessary)
- Possibly losing checksum verification (not sure if Chocolatey did it
  automatically for this package.)

Also:
- Increase minimum tests by 100 for the Cygwin job.

Ref: #16819 (earlier attempt)
Ref: https://www.stunnel.org/archive/
Ref: https://www.githubstatus.com/incidents/cqb5hcy0gx18
Follow-up to d176f58a20 #20413
Follow-up to 19b1e44660 #20409

Closes #20410
2026-01-23 17:38:06 +01:00
Viktor Szakats
19b1e44660
GHA/windows: fail CI early on stunnel install failure
Before this patch CI silently ignored stunnel install failures. This
pushed the failure to the test run step due to not meeting the minimum
number of tests.

Make the root cause obvious by failing early in this case.

Reported-by: Stefan Eissing
Follow-up to 3f1cd809ee #19942
Ref: https://github.com/curl/curl/actions/runs/21245626382/job/61134101176?pr=20397
Ref: #16819

Closes #20409
2026-01-23 12:44:43 +01:00
Viktor Szakats
9bcdfb3809
GHA/distcheck: bump old cmake, switch to arm64 for performance
Bump CMake version in CMake integration tests for better performance
(8x on macOS, 2-3x on Windows) and native arm64 binaries.

- bump old CMake in integration tests to v3.19.8 (was: v3.11.4)
- switch to native arm64 CMake binaries on macOS.
- switch Linux CMake integration job to arm64.

Speed gains:
- Linux: 2m -> 1m30s
- macOS: 9-10m -> 1m15s
- Windows: 6-7m -> 2m43s

Before:
https://github.com/curl/curl/actions/runs/21255697172
https://github.com/curl/curl/actions/runs/21255020621

After:
https://github.com/curl/curl/actions/runs/21272021446

With this, CI is:
- no longer testing deprecated CMake versions.
  Follow-up to a7c974e038 #19902
- not testing the next (from 2026 April) minimum 3.18, but going for
  3.19 instead. For arm64 binaries on both macOS and Linux. There is
  no 3.18-specific CMake code in curl.

Cherry-picked from #20407
Closes #20408
2026-01-23 12:39:43 +01:00
Viktor Szakats
86190dccb3
GHA: migrate 3 linter jobs to arm64
Also to make them finish as fast or overall faster.

checkdocs/proselint:
before: https://github.com/curl/curl/actions/runs/21255607528/job/61169136666 22s
after: https://github.com/curl/curl/actions/runs/21266680535/job/61207470652?pr=20403 19s

checksrc/spellcheck, linters, REUSE:
before: https://github.com/curl/curl/actions/runs/21255607522/job/61169137076 3m11s
after: https://github.com/curl/curl/actions/runs/21266680282/job/61207475282?pr=20403 2m27s
typos: 13s -> 28s
pytype: 2m24s -> 1m24s

checksrc/misc checks:
before: https://github.com/curl/curl/actions/runs/21255607522/job/61169137176 2m29s
after: https://github.com/curl/curl/actions/runs/21266680282/job/61207475248?pr=20403 2m5s
shellcheck: seems larger and slower on arm64. 33 -> 45MB, 1s -> 3s
badwords: 2m1s -> 1m35s

Closes #20403
2026-01-22 23:44:47 +01:00
Viktor Szakats
b81341e8f5
tidy-up: Markdown, clang-format nits
- drop leading indent from Markdown.
- switch to Markdown section markers where missing.
- move `&&` and `||` to the end of the line (C, Perl).
- openssl: add parenthesis to an if sub-expression.
- misc clang-format nits.
- unfold Markdown links.
- SSL-PROBLEMS.md: drop stray half code-fence.

Closes #20402
2026-01-22 23:44:47 +01:00
Viktor Szakats
9e9adfddbf
GHA/linux: rename intel to intelc to avoid mixup with <pkg>-intel
To avoid unnecessarily installing Intel C for any `<pkg>-intel` locally
built dependency.

Follow-up to ab8ccaed24 #20392
Follow-up to d9fe60d457 #20248

Closes #20400
2026-01-22 18:42:46 +01:00
Viktor Szakats
ab8ccaed24
GHA/linux: move mbedTLS and wolfSSL valgrind jobs to arm64
For significantly better performance.

AM wolfssl-opensslextra valgrind 1:  6m53s -> 4m15s
AM wolfssl-opensslextra valgrind 2:  6m47s -> 4m25s
CM mbedtls gss valgrind 1:           8m33s -> 4m31s
CM mbedtls gss valgrind 2:           8m39s -> 4m34s
('after' times corrected for 'install prereq' differences)

before: https://github.com/curl/curl/actions/runs/21255607562
after: https://github.com/curl/curl/actions/runs/21257368016

Also tried rustls, but that'd require linux arm64 release binaries at:
https://github.com/rustls/rustls-ffi/releases

Closes #20392
2026-01-22 18:27:51 +01:00
Viktor Szakats
66ad54e46b
cmake: add CURL_DROP_UNUSED option to reduce binary sizes
To enable known linker options dropping unused, dead, code and data from
the executables built.

Useful to reduce binary sizes for curl, libcurl shared lib and apps
linking static libcurl. It's effective on both "unity" and non-unity
builds. Aligning "unity" build sizes with default, non-unity ones.

Supported platforms: Apple, MSVC, llvm/clang and GCC on all tested
platforms: Linux, BSDs, Windows, MSYS2/Cygwin, Android, MS-DOS.

Notes:
- Static libraries grow 20-30% with non-Apple toolchains.
  This effect is controlled by separate, optional compiler flags on
  non-Apple. This patch enables them automatically for public binaries
  (libcurl and curl tool), and leaves them off for internal/test ones.
- MSVC enables this option by default for 'Release' configurations.
  The curl build option has no effect on it.
- Observed effect on VS2010 is negligible. VS2012+ is recommended.
- Works with LTO, Fil-C.
- No observed/conclusive effect on build speed.
- On Windows with clang/gcc (mingw-w64/MSYS2/Cygwin) it also enables
  `-fno-asynchronous-unwind-tables` as a workaround to make
  the toolchain options actually work.
  Ref: https://sourceware.org/bugzilla/show_bug.cgi?id=11539
  Thanks-to: Andarwinux

Also:
- GHA: enable in Linux and MinGW jobs to test it. Size changes:

  - linux aws-lc H3:
    curl: 2000000 -> 1937152, libcurl.a: 2065724 -> 2716532 bytes
  - macos clang HTTP-only:
    curl: 1364376 -> 128799 bytes, libcurl.a: unchanged
  - macos llvm MultiSSL:
    curl: 410056 -> 405720, libcurl.dylib: 1350336 -> 1348480 bytes
  - mingw schannel c-ares U:
    curl: 1588736 -> 1507328, libcurl-d.a: 3322040 -> 3884746 bytes
    bld: 34 -> 35MB

- GHA: enable in MSVC and Apple jobs to reduce disk footprint, with no
  obvious downside. Size changes:

  - AppVeyor CI VS2019:
    curl: 2339840 -> 1295872, libcurl-d.dll: 3155968 -> 1900544 bytes
    bld: 161 -> 97MB
  - AppVeyor CI VS2022 clang-cl:
    curl: 2933248 -> 2332160, libcurl-d.lib: 4762688 -> 5511330 bytes
    bld: 133 -> 121MB
  - AppVeyor CI VS2022 HTTP-only:
    curl: 3514368 -> 2177024, libcurl-d.lib: 2538420 -> 3151740 bytes
    bld: 137 -> 83MB
  - GHA intel:
    curl: 2629120 -> 2023424, libcurl-d.lib: 4366652 -> 5350670 bytes
    bld: 86 -> 69MB
  - GHA arm64:
    curl: 2832896 -> 2063872, libcurl-d.lib: 4690616 -> 5597250 bytes
    bld: 82 -> 66MB

Refs:
https://maskray.me/blog/2021-02-28-linker-garbage-collection
https://web.archive.org/web/20110811230637/msdn.microsoft.com/en-us/library/bxwfs976.aspx (VS2010)
https://learn.microsoft.com/cpp/build/reference/opt-optimizations
https://learn.microsoft.com/cpp/build/reference/gy-enable-function-level-linking

Closes #20357
2026-01-22 17:08:20 +01:00
Viktor Szakats
9996cab546
GHA: strip Windows/MS-DOS/Android binaries to see their real size
Unstripped size hides effective binary sizes due to the added debug
information. E.g. `--gc-sections` may inflate unstripped binaries, while
their unstripped size decreases. To see if binary size optimization
options work, it's more useful to observe unstripped size.

Ref: #20357
Follow-up to 4cf43508e8 #20355

Closes #20359
2026-01-21 16:05:17 +01:00
Viktor Szakats
59e3b693f7
windows: test non-verbose builds, fix fallouts
- schannel: fix mixed-up declaration. (originally fenced infof for
  verbose, then changed to failf with the fence kept, then fence
  removed and variable marked as verbose, when in fact it's not, but
  not tested and caught in CI.
- fix two other fallouts.
- GHA/windows: disable verbose strings in a mingw job.
- appveyor: disable verbose strings in an MSVC job.
- appveyor: add way to pass any CMake option per-job.

Cherry-picked from #20387
Follow-up to 61093e2a81 #20353

Closes #20388
2026-01-21 15:25:40 +01:00
Viktor Szakats
61093e2a81
build: fully omit verbose strings and code when disabled
When the compiler supports C99.

- map logging functions to macro stubs when verbose logging is disabled
  and the compiler is C99. Make sure these stubs silence unused variable
  warnings for non-variadic arguments.
  Before this patch they mapped to function stubs, the same codepath
  used for C89 compiler in this configuration.

- introduce new macros to tell the compiler which code to include
  when verbose code is active, or inactive:

  - `CURLVERBOSE`: defined when verbose code is active.
    To enclose blocks of code only used for verbose logging.

  - `VERBOSE(statement);`:
    compile statement when verbose code is active.
    To mark code lines only used for verbose logging.

  - `NOVERBOSE(statement);`:
    compile statement when verbose code is inactive.
    To suppress warnings for arguments passed to logging functions via
    printf masks, e.g. `NOVERBOSE((void)ipaddress);`, yet keeping
    the warning in verbose builds.

  Note these macros are not the same as `CURL_DISABLE_VERBOSE_STRINGS`.
  Verbose code is always active in C89 mode (without variadic macro
  support).

- drop existing uses of `CURL_DISABLE_VERBOSE_STRINGS` where redundant,
  or replace with the above macros. Ending up reducing the number of
  `#ifdef`s, and also the number of lines.

Assisted-by: Daniel Stenberg
Assisted-by: Jay Satiro
Reported-by: Dan Fandrich
Fixes #20341
Refs: #12105 #12167

Closes #20353
2026-01-21 13:18:35 +01:00
Viktor Szakats
dbc4603b09
CI: do not codespell RELEASE-NOTES
It contains names.

Reported-by: Daniel Stenberg
Fixes #20376
Revert 3e3d526c4c
Follow-up to 5f5e000278
Follow-up to 85cfc15601
Follow-up to 977595772c
Follow-up to 0260e8465a #17905

Closes #20378
2026-01-20 22:46:37 +01:00
Viktor Szakats
3e3d526c4c
codespell: ignore false positive found in RELEASE-NOTES 2026-01-20 17:56:45 +01:00
renovate[bot]
3d354f55b7
GHA: update ngtcp2/ngtcp2 to v1.20.0
Closes #20372
2026-01-20 16:40:34 +01:00
renovate[bot]
677374d58b
GHA: update ngtcp2/nghttp3 to v1.15.0
Closes #20371
2026-01-20 16:39:45 +01:00
Viktor Szakats
09c9afdd71
cmake: silence silly Apple clang warnings in C89 mode, test in CI
- `stdbool.h` is also included via system headers. Disabling it from curl
  does not fix it. Silencing lots of these:
  ```
  curl/lib/curlx/warnless.h:64:1: warning: '_Bool' is a C99 extension [-Wc99-extensions]
   64 | bool curlx_sztouz(ssize_t sznum, size_t *puznum);
      | ^
  /Library/Developer/CommandLineTools/usr/lib/clang/17/include/stdbool.h:24:14: note: expanded from macro 'bool'
   24 | #define bool _Bool
      |              ^
  ```

- silence `-Wcomma` warnings.
  in favor of the global silencing approach, since a couple of more of
  these were hit (in vquic, tool1622, unit1309, unit1636), and it seems
  silly to update them all.
  Revert e8189c4420 #20362

Also:
- cmake: include C standard in 'platform flags' log line.
- GHA/macos: switch a job to C89 to verify.
- GHA/linux: show 'C89' in job names.

Ref: https://cmake.org/cmake/help/v3.7/variable/CMAKE_C_STANDARD.html

Closes #20363
2026-01-20 13:05:01 +01:00
Viktor Szakats
814b54d83e
tidy-up: miscellaneous
- whitespace, indent, comments, clang-format.
- openssl: move feature guards within function blocks.
- tunit: drop redundant blocks.

Closes #20361
2026-01-20 12:37:56 +01:00
Viktor Szakats
1c377717e7
GHA/curl-for-win: add CPU to Linux minimal job name 2026-01-20 03:38:18 +01:00
Viktor Szakats
2d5a063121
build: merge TrackMemory (CURLDEBUG) into debug-enabled option
Drop separate `TrackMemory` (aka `CURLDEBUG`) debug feature.

After recent changes (thread-safety,
193cb00ce9, and updates leading up to
it), `TrackMemory` is unlikely to cause build or runtime issues.

To simplify builds and debug options, enable `TrackMemory`
unconditionally for debug-enabled (aka `DEBUGBUILD`) builds. Before
this patch, this was already the default, with an option to disable
it, or enable it in non-debug-enabled builds.

Note, in practice these two debug options already went hand in hand. It
was not possible to toggle them separately for a long time due to bugs,
before 59dc9f7e69 (2024-05-28) fixed it.

This patch also removes/deprecates separate knobs and feature flags for
`TrackMemory`:
- autotools: `--enable-curldebug`/`--disable-curldebug`
- cmake: `-DENABLE_CURLDEBUG=ON`/`OFF`
- C macro: `CURLDEBUG`
- libcurl: `CURL_VERSION_CURLDEBUG` symbol deprecated in favor
  of `CURL_VERSION_DEBUG`. They always return the same value after this
  patch.

Also:
- drop `TrackMemory` from `curl -V` output.
- rename internal `CURLDEBUG` macro to `CURL_MEMDEBUG` internally.
  To avoid confusion with `DEBUGBUILD`, but to keep guarding
  `TrackMemory`-related internals for readability.
- runtests: bind `TrackMemory` to debug feature. Keep it a separate
  test feature requirement, for clarity.
- CI: drop test builds for combinations of the two options.
- GHA/linux: no longer disable TrackMemory in the TSAN job.

Ref: https://github.com/curl/curl/pull/20328#issuecomment-3754528407

Closes #20331
2026-01-19 18:43:17 +01:00
Viktor Szakats
b8ba798d18
GHA/non-native: fix size/file listing for Android shared lib
Follow-up to 4cf43508e8 #20355
2026-01-19 16:26:43 +01:00
Viktor Szakats
4cf43508e8
CI: show curl tool and libcurl sizes
To see how they change throughout code and/or build changes.

Also:
- improve `file` output.
- tidy-ups.

Closes #20355
2026-01-19 14:12:27 +01:00
Daniel Stenberg
6aaac9dd38
vquic: drop support for OpenSSL-QUIC
- It is slower and uses more memory than the alternatives and is only
  experimental in curl.
- We disable a few tests for OpenSSL-QUIC because of flakiness
- It gets little attention from OpenSSL and we have no expectation of the
  major flaws getting corrected anytime soon.
- No one has spoken up for keeping it
- curl users building with vanilla OpenSSL can still use QUIC through the
  means of ngtcp2

Closes #20226
2026-01-17 22:49:34 +01:00
Viktor Szakats
1730407b74
windows: add build option to use the native CA store
With the same semantics as Apple SecTrust, in both libcurl and the curl
tool, when using non-Schannel TLS backends. In practice it means that
it makes TLS work without manually or implicitly configuring a CA bundle
`.crt` file, such as `curl-ca-bundle.crt`.

To enable:
- autotools: `--enable-ca-native`
- cmake: `-DCURL_CA_NATIVE=ON`
- CPPFLAGS: `-DCURL_CA_NATIVE`

When enabled:
- enables `CURLSSLOPT_NATIVE_CA` (libcurl) / `--ca-native`
  and `--proxy-ca-native` (curl tool) options by default.
- unsafe search for an on-disk CA bundle gets disabled by default.
  Equivalent to `--disable-ca-search` with autotools,
  `-DCURL_DISABLE_CA_SEARCH=ON` with CMake.
- build-time detection of CA bundle and CA path gets disabled. As with
  Apple SecTrust. This was already the default for Windows.
- native CA can be disabled at run-time with the `--no-ca-native`
  and/or `--no-proxy-ca-native` command-line options.

Rationale: This build option:
- has a repeat and active interest from packagers and users.
- helps integrating curl with Windows for those who need this.
- it also applies to macOS: #17525
  Shipped in curl 8.17.0.
- makes it trivial to use custom certs configured on the OS.
- frees applications/packagers/users from the task of securely
  distributing, and keeping up-to-date, a CA bundle.
- frees potentially many curl tool from configuring a CA bundle manually
  to access HTTPS (and other TLS) URLs. This is traditionally difficult
  on Windows because there is no concept of a universal, protected,
  non-world-writable, location on the file system to securely store
  a CA bundle.
- allows using modern features regardless of Windows version. Some of
  these features are not supported with Schannel (e.g. HTTP/3, ECH) on
  any Windows version.
- is necessary for HTTP/3 builds, where bootstrapping a CA bundle is not
  possible with Schannel, because MultiSSL is not an option, and HTTP/3
  is not supported with Schannel.

Ref: #16181 (previous attempt)
Ref: https://github.com/curl/curl/discussions/9348
Ref: https://github.com/curl/curl/issues/9350
Ref: https://github.com/curl/curl/pull/13111
Ref: https://github.com/microsoft/vcpkg/pull/46459#issuecomment-3162068701
Ref: 22652a5a4c #14582
Ref: eefd03c572 #18703

Closes #18279
2026-01-17 19:18:52 +01:00
Viktor Szakats
b17ef873ae
windows: bump minimum to Vista (from XP)
After this patch curl requires targeting Vista or newer, and a toolchain
with Vista support.

Supported MSVC compilers (VS2010+) all support Vista:
- VS2012+ target Win8 (or later) by default.
- VS2010 targets Win7 by default.

Supported mingw-w64 versions (v3+) all support Vista:
- mingw-w64 v9+ target Win10 by default.
- mingw-w64 v8 and older target Server 2003 (~XP) by default.
  After this patch it may be necessary to override the default Windows
  target version to Vista (or newer) via:
  autotools: `CPPFLAGS=-D_WIN32_WINNT=0x0600`
  cmake: `-DCURL_TARGET_WINDOWS_VERSION=0x0600`
- mingw-w64 v6+ allow changing the default at toolchain build-time.

Notes:
- For non-MSVC, non-mingw-w64 toolchains, `if_nametoindex` needs to be
  allowlisted in `curl_setup.h`, if they do support it.

Fixes #17985 (discussion)
Closes #18009
2026-01-17 11:41:49 +01:00
Viktor Szakats
9f120d2b50
GHA: silence fresh zizmor 1.21.0 warnings
- MSYS2/Cygwin bash shells are now tagged "misfeature".
  It is not something we can fix. We need these shells, and using
  documented/necessary settings to use these environments should be
  allowed without workarounds.

- untagged actions within curl's own organization are now also flagged
  as "action is not pinned to a hash (required by blanket policy)". This
  seems overkill. Making internal releases would not be helpful or
  practical. Also considering that the referred internal action uses an
  unpinned external action anyway (google/oss-fuzz/infra/cifuzz), with
  near-zero chance to fix.

Ref: https://github.com/zizmorcore/zizmor/pull/1517#issuecomment-3759740853

Closes #20339
2026-01-16 13:48:28 +01:00
Viktor Szakats
ac6264366f
tidy-up: miscellaneous
- tool_bname: scope an include.
- `endif` comments.
- Markdown fixes.
- comment tidy-ups.
- whitespace, newlines, indent.

Closes #20309
2026-01-15 13:06:13 +01:00
Viktor Szakats
4651d4c76b
badwords: catch and fix more variants of NN-bit
Closes #20304
2026-01-14 02:35:00 +01:00
dependabot[bot]
ad8374aedc
GHA: bump pip-dependencies
- update `ruff` from 0.14.10 to 0.14.11
- update `filelock` from 3.20.1 to 3.20.3 (CVE-2026-22701) (used in pytests)
- update `psutil` from 7.2.0 to 7.2.1

Closes #20300
2026-01-13 23:17:10 +01:00
Viktor Szakats
3ee1d3b573
tidy-up: merge root packages directory into projects
To simplify the directory layout.

- OS400 and vms support move from `packages` to `projects`.

- Windows README and `generate.bat` files move from `projects`
  to `projects/Windows`.

Closes #20271
2026-01-12 23:49:35 +01:00
Viktor Szakats
27a1e629b5
Makefile.am: drop stray VC project files from dist
Most files were removed 2 years ago, the remaining two do not work
without those.

Follow-up to 3d93d18ded #12288

Closes #20272
2026-01-12 22:19:40 +01:00
Viktor Szakats
13f0ede730
build: add curl-lint/lint targets, CURL_LINT cmake option
To run checksrc and spacecheck on the source tree. Also for cmake
to sync up with autotools' `checksrc` target.

- cmake: `curl-lint`
  With `-DCURL_LINT=ON`, checks run automatically for all targets.
- autotools: `lint`

Closes #20175
2026-01-12 16:45:24 +01:00
Viktor Szakats
9dc2552ed1
GHA/checkdocs: drop duplicate spacecheck job
No longer necessary after making GHA/checksrc also run on `*.md` file
changes.

Reported-by: Daniel Stenberg
Bug: https://github.com/curl/curl/pull/20266#issuecomment-3738955165
Follow-up to 3800a26582 #18935
Follow-up to 9acecc923d #15423
Closes #20268
2026-01-12 16:31:23 +01:00
Viktor Szakats
41a6eeadf6
GHA/non-native: disable FreeBSD arm CI jobs (upstream breakage)
Package manager is not finding packages.

FreeBSD 15, moving to cmake, dropping impacket, stunnel, ldap, kerberos,
could not fix it.

Closes #20267
2026-01-12 16:26:49 +01:00
Viktor Szakats
1b24428d62
GHA: delete disable-man-db hack, runners doing it by default now
Refs:
1f107542ae
https://github.com/actions/runner-images/pull/13268
https://github.com/actions/runner-images/issues/13213

Follow-up to 5acba8bc36 #17181

Closes #20254
2026-01-11 15:40:21 +01:00
Viktor Szakats
a6087d69a9
GHA: delete new apt sources adding the flaky distro source
CI workflows deleted apt package source `microsoft-prod.list` due to
flakiness seen in the past with those sources. Sources are still flaky
and they are now also used from `azure-cli.sources` which is included
by default by the runner images. Add it to the delete list.

Also: remove another new, unnecessary (for curl CI) package source seen
on the `ubuntu-24.04-arm` runner, for good measure, and performance.

Fixing:
```
Reading package lists...
E: Failed to fetch https://packages.microsoft.com/repos/azure-cli/dists/noble/InRelease  403  Forbidden [IP: 13.107.246.66 443]
E: The repository 'https://packages.microsoft.com/repos/azure-cli noble InRelease' is no longer signed.
Error: Process completed with exit code 100.
```
Ref: https://github.com/curl/curl/actions/runs/20896127602/job/60034941964?pr=20142#step:2:79

Follow-up to 303bb8785c #13473

Closes #20253
2026-01-11 15:25:19 +01:00
Viktor Szakats
219245a616
GHA: include runner CPU arch in cache keys (revert)
Turns out in practice the internal cache name contains the arch where it
matters (arm or dual-arch local builds), which is part of the cache key
string. Drop `runner.arch` to avoid two arch strings in the key.

Cache keys without an explicit arch designator mean intel.

Revert ff78af5752 #20234

Closes #20249
2026-01-11 01:42:21 +01:00
Viktor Szakats
d9fe60d457
GHA/linux: fix 'mbedtls' internal name confusion
`mbedtls-arm` and `mbedtls-prev` were matching `contains()` expressions
looking for `mbedtls`. It caused an unnecessary cache restore and an
redundant mbedtls build on bumps, and made the build flavors require
different local directory names to avoid this accidental collision.

Also drop `-threadsafe` from internal names. All local builds are.

Follow-up to 8806035344 #20240
Follow-up to 3a305831d1 #19077

Closes #20248
2026-01-11 01:01:13 +01:00
Viktor Szakats
5225e69ed9
GHA/linux: move 6 jobs with locally built dependencies to arm
All libresll jobs, wolfssl-all, and one mbedtls job.

As noted earlier, arm jobs run faster than intel ones, especially
valgrind steps that run almost twice as fast. Package install runs
slower, but this is offset by faster build and test steps, even in
non-valgrind jobs.

Follow-up to ff78af5752 #20234
Follow-up to 2b0d8dcc16 #20231

Closes #20246
2026-01-10 23:43:28 +01:00
Viktor Szakats
ff78af5752
GHA: include runner CPU arch in cache keys
To clarify the arch for cache entries, also to allow building/caching
multiple archs in parallel if necessary.

Closes #20234
2026-01-10 23:03:18 +01:00
Viktor Szakats
bfacfb2355
plan9: drop special build and orphaned references
Would need 64-bit support.

Ref: https://github.com/curl/curl/pull/20233#issuecomment-3732556015
Follow-up to 0159100f4f #20233

Closes #20243
2026-01-10 23:03:17 +01:00
renovate[bot]
f1422960bf
GHA: update awslabs/aws-lc to v1.66.2
Closes #20238
2026-01-10 12:50:39 +01:00
Daniel Stenberg
0159100f4f
lib: use (u)int64_t instead of long long
Remove config-plan9.h because it does not support 64 bit, meaning it has
not been working for years.

Closes #20233
2026-01-10 12:40:54 +01:00
Viktor Szakats
8806035344
GHA/linux: fix 'libressl' internal name confusion
`libressl-filc` was matching `contains()` expressions looking for
`libressl`, causing build confusion and failure in specific cases.

Rename `libressl` to `libressl-c` to avoid this. Also rename the cache
id for consistency, though not necessary for the fix.

Bug: https://github.com/curl/curl/actions/runs/20860412340/job/59938315276
Follow-up to c262481873 #19407
Cherry-picked from #20234

Closes #20240
2026-01-10 12:36:20 +01:00
Viktor Szakats
2b0d8dcc16
GHA: switch 12 Linux jobs to arm64
More cost-effective and seems as fast or faster than Intel.

In particular, valgrind seems to be almost 2x fast. So fast the job pair
could fit under 10 minutes if merged again (but would be the longest in
GHA/Linux.)

Installing packages is slightly slower. The package repo is Ubuntu's
which is slower than the Azure mirror used on Intel (unless Azure is
broken, which happened a lot last year).

To add to more jobs, the locally built deps also need to be migrated.

Also:
- add workaround for failing sshd server on Linux arm runners, caused by
  world-writable `HOME` directory.

Closes #20231
2026-01-09 19:35:16 +01:00
renovate[bot]
1dedcbc35d
GHA: update dependency cloudflare/quiche to v0.24.7
Closes #20224
2026-01-09 17:05:15 +01:00
Viktor Szakats
9552d9c0c0
build: detect and include inttypes.h again (revert)
Since not using `PRI*` macros, it isn't needed.

Follow-up to 13c1a93414 #20215
Revert 4c9e4e99c1 #20208

Closes #20225
2026-01-09 14:59:30 +01:00
Viktor Szakats
3402036e1a
spacecheck: exclude RELEASE-NOTES from a check 2026-01-09 09:45:30 +01:00
JimFuller-RedHat
af18d8ea1b
docs: explicitly call out Slowloris as not a security flaw
Closes #20219
2026-01-08 10:19:16 +01:00
Viktor Szakats
d8f6175edc
GHA/macos: switch one H3 pytest job to cmake
To:
- see if build tool makes a difference for flaky 8x pytest slowdowns.
- to make this job finished faster.

`curl -V`, number of runtests (1793) and pytests (568/159) verified
to remain the same.

Closes #20211
2026-01-07 17:34:57 +01:00
Viktor Szakats
1b9f1c2086
GHA/non-native: restore MS-DOS jobs
In `!ssl` variant.

It's useful to catch `uint32_t` mismatches with `unsigned int` or its
printf mask.

Also add Renovate version bump rule.

It takes about 1m (autotools) + 30s (cmake) in CI.

Bug: https://github.com/curl/curl/pull/20199#discussion_r2666363334
Follow-up to 8881a52ab0 #20210
Follow-up to e70436a88a #20200
Follow-up to 0630e66cb4 #18338

Closes #20204
2026-01-07 17:07:40 +01:00
Viktor Szakats
4c9e4e99c1
build: detect and include inttypes.h again
For `PRI*` printf masks for fixed-size C99 types.

Also:
- add simple fallback for `PRIu32`, `PRIx32`, if `inttypes.h` is
  missing.

Cherry-picked from #20200
Ref: #20207
Follow-up to 4701a6d2ae #19695
Ref: 60359ad504 #12275
Closes #20208
2026-01-07 16:10:23 +01:00
Viktor Szakats
c25fdaf081
GHA/macos: merge two autotools !ssl jobs into others, switch one to cmake
Number of jobs down to 34 (from 56 at end of last year.)
Out of them 7 autotools (was 24 at end of last year.)

Also:
- stop install brew packages preinstalled.
- make some dependency options explicit.

Closes #20203
2026-01-07 12:44:42 +01:00
Viktor Szakats
5a4cd75863
GHA/macos: switch 5 jobs from autotools to cmake
To save 0.5 to 3 minutes per job.

There remain 7 main autotools jobs, plus 1 in combinations and 1 more
for iOS.

Also:
- fix to disable MQTT, WebSockets, IPFS in HTTP-only job.

Closes #20193
2026-01-06 04:15:22 +01:00
Viktor Szakats
fecc987ebf
GHA: reduce total timeouts for Linux and macOS jobs
- Linux: 25 -> 15 minutes.
- Linux H3: 45 -> 10 minutes.
- macOS: 25 -> 15 minutes.

On macOS this may catch flaky slowness seen sometimes in pytests:
https://github.com/curl/curl/pull/20187#issuecomment-3711753097

Closes #20192
2026-01-05 23:27:36 +01:00
Viktor Szakats
0ec07e38f3
GHA/macos: drop compiler matrix for macos jobs
To reduce the number of jobs, and the time spent running macos runners.
The curl codebase has just a few Apple-specific parts, and they remain
well-covered after this patch.

Makes the number of jobs 24, down from 32.

Perhaps more jobs could be merged or dropped, and CPU use reduced by
moving some to cmake. Unique, but not Apple-specific jobs may also be
moved to Linux.

Follow-up to b869932392 #20178

Closes #20187
2026-01-05 19:43:23 +01:00
Viktor Szakats
9f1838e965
GHA/macos: enable Apple IDN and SecTrust for combination jobs
Closes #20185
2026-01-05 11:00:19 +01:00
Viktor Szakats
b869932392
GHA/macos: reduce number of combination jobs
- drop autotools (except one) from combination jobs.
  They seem to add little value over cmake ones, yet take a lot of time
  even after restricting them to shared libs.

  20-25s to install autotools via Homebrew, for each 11 jobs. autoreconf
  taking 10s, configure 25s, build 30-35s. A total of 1m30s to 1m45s per
  job. Sometimes jumping up to 2-4 minutes.

  Compare this to 20-25s total job times with cmake.

  Keep one job with an indentical cmake pair to help detecting
  build-tool-specific fallouts.

- drop more combination jobs.
  To avoid overlap with main build jobs.

Reducing number of jobs to 9, from 22 (-13),
total job time to 5.5 minutes, from 25 (-20m).

Before: https://github.com/curl/curl/actions/runs/20637652089
After: https://github.com/curl/curl/actions/runs/20686390641?pr=20178

Considering the small amount of Apple-specific code in curl since
dropping Secure Transport, and that most combination issue were in
the toolchains, not curl, there is likely more room to avoid wasting
cycles (at 41 macOS + 3 iOS jobs after this patch).

Follow-up to d057b705fd #20167

Closes #20178
2026-01-04 04:01:37 +01:00
Viktor Szakats
d07024cf93
GHA: restore --shallow value for some torture tests
It also means that now all torture test-pairs use the same shallowness,
while earlier FTP used 20.

Also:
- This made macOS torture jobs slow enough to split them into 3 jobs.

Follow-up to 2cbcde90e7 #20153

Closes #20172
2026-01-03 01:02:41 +01:00
Viktor Szakats
003dddae2b
GHA/non-native: reduce workflow timeouts
Closes #20171
2026-01-02 23:43:23 +01:00
Viktor Szakats
9de7001b5e
GHA/windows: reduce workflow timeouts
From 15 to 10 minutes.

To reduce the idle wait for hung jobs from 20 to 15 minutes (hopefully),
so that the failed just can be restarted manually eariler. It appears
that GitHub Actions notices a hung job 5 minutes past the workflow
timeout (reason undiscovered).

Also: Leave extra time for torture and arm64 jobs.

Closes #20170
2026-01-02 23:43:23 +01:00
Viktor Szakats
d057b705fd
GHA: disable autotools static libcurl in many jobs
To avoid building libcurl in both static and shared flavor by default.
It results in 1.5-2.x speed-up for the curl build step in most jobs.
Saving a total of 6-7 minutes. In the Cygwin job alone it saves 1-1.5m.

Also:
- enable static + shared in a Windows job to keep testing this combo.

Follow-up to ff958fc4b2 #20159

Closes #20167
2026-01-02 22:39:28 +01:00
Viktor Szakats
7e08d56c23
GHA/linux: simplify configuring mbedTLS in two jobs
Closes #20165
2026-01-02 16:34:40 +01:00
Viktor Szakats
2cbcde90e7
GHA/linux: split valgrind jobs to job-pairs for parallelism, to finish in 10m
To make CI turnaround time shorter, by cutting the longest running jobs.
After this patch all jobs should finish around 10-11 minutes. Down from
15-16 minutes before this patch.

Suggested-by: Stefan Eissing

The fuzzing workflow is now the slowest (with a 7-minute startup time
needed to build deps from source on each run), followed by macOS
and Windows torture tests (both split in two now). Without fuzzing, it's
under 10 minutes.

Notes:
- an extra cost with job-pairs is installing prereqs,
  configuring/building curl and tests twice. GitHub doesn't support
  making a matrix job a prereq for another workflow that may fix this:
    https://github.com/orgs/community/discussions/42335
  This overhead is significant on Windows: 11m20 -> 9m20 + 8m40
- job-pairs are annoying to maintain and keep in sync.
- splitting tests into halves is a manual process and needs to be
  revisited from time to time. Possibly something to automate with
  a runtests option, e.g. with `1 of 50%` and `2 of 50%`?

Also:
- split torture tests in two equal pieces, replacing the `FTP` + `!FTP`
  split used earlier.

Related perf improvements from today:
- make scan-build 2x fast:
  ff958fc4b2 #20159
- drop build-only Testi386 fuzz workflow (from curl), saving 9m per run:
  0106023c1f
  https://github.com/curl/curl-fuzzer/pull/236

Closes #20153
2026-01-02 15:51:00 +01:00
Viktor Szakats
ff958fc4b2
GHA/linux: switch scan-build jobs to cmake (for 2x perf)
Somewhat unexpectedly, switching autotools jobs to identical (non-unity,
non-debug, same options) cmake ones, makes them complete 2x faster.
Most of it comes from cmake building shared libcurl only, while autotools
was using defaults and building both, in two separate passes. Thers is
about a minute (per job) of gain due to other reasons.

Before:
MultiSSL: 10m30: https://github.com/curl/curl/actions/runs/20656775456/job/59311070197
H3: 9m14s: https://github.com/curl/curl/actions/runs/20656775456/job/59311070204

After:
MultiSSL: 4m52s: https://github.com/curl/curl/actions/runs/20658343323/job/59315501903
H3: 4m7s: https://github.com/curl/curl/actions/runs/20658343323/job/59315501918
H3: 5m4s: https://github.com/curl/curl/actions/runs/20659294959/job/59318215987 (autotools shared only, for comparison, not merged)

Also:
- drop building examples with scan-build in the second (shorter) job.
  This offers no extra coverage over the long job that has both GnuTLS
  and OpenSSL. Saving an extra ~30s.

Closes #20159
2026-01-02 15:13:53 +01:00
Daniel Stenberg
7e48a34bf8
badwords.pl: don't mention the whitelisted finds
They obscure the real finds

Closes #20158
2026-01-02 11:21:31 +01:00
Viktor Szakats
26c437b1bb
GHA/non-native: stop building examples in a cross-job
To make the longest running FreeBSD job finish 1.5 minutes faster
(9.5m -> 8m).

Examples are still built with both autotools and cmake, one on Intel and
one on ARM.

Closes #20146
2026-01-01 23:07:03 +01:00
dependabot[bot]
ef97f47635
GHA: bump pip-dependencies
- update `ruff` from 0.14.9 to 0.14.10
- update `psutil` from 7.1.3 to 7.2.0

Closes #20141
2026-01-01 20:49:00 +01:00
dependabot[bot]
34683b552c
GHA: bump gha-dependencies
- update `github/codeql-action` from 4.31.8 to 4.31.9
- update `cross-platform-actions/action` from 0.30.0 to 0.32.0
  - support for OmniOS and FreeBSD 15.0
  - releases are now immutable

Closes #20140
2026-01-01 20:48:59 +01:00
Yedaya Katsman
660600c747
badwords: add fist -> first, fix fallouts
There are still `curl_fistrgs` in packages/OS400/curl.inc.in but
I'm not sure what that's supposed to be exactly.

Closes #20066
2025-12-31 12:21:42 +01:00
Viktor Szakats
532d134767
build: stop disabling strcpy checks with clang-tidy
Follow-up to 436e67f65b #20076

Closes #20084
2025-12-24 00:02:40 +01:00
renovate[bot]
cb9db70dbe
GHA: update ngtcp2/nghttp3 to v1.14.0
Closes #20078
2025-12-23 17:09:05 +01:00
renovate[bot]
1b4ef87dee
GHA: update ngtcp2/ngtcp2 to v1.19.0
Closes #20079
2025-12-23 17:01:38 +01:00
Viktor Szakats
424cef6733
GHA/http3-linux: set minimum number of runtest tests
Tailored for each job with a relatively tight limits. Also with no
tolerance in valgrind tests: 4 of the 4 has to be run.

Based on Test Clutch feature matrix which displays the minimum and
actual number of tests:
https://testclutch.curl.se/static/reports/feature-matrix.html

Also:
- runtests.pl: include total number of tests in the error message shown
  when the limit was not met.

Assisted-by: Dan Fandrich
Follow-up to 3f1cd809ee #19942

Closes #20050
2025-12-20 15:31:30 +01:00
Viktor Szakats
a468e605eb
openssl: drop includes unused or duplicate
Also:
- vquic-tls.h: do not include unused headers for non-H3 builds.
- autotools: stop looking for `openssl/x509.h` header.
- cmp-config.pl: delete exception for `openssl/x509.h`.
- examples: format/comment sync between the two touched files.
- openssl: drop unused `curlx/wait.h` include.

Closes #20049
2025-12-20 13:51:05 +01:00
Viktor Szakats
1892286086
cmake: match filename suffixes with file content
To:
- simplify recognizing CMake sources.
- ensure syntax highlighters use the correct file type.
- sync .h template filename with its autotools counterpart.

Also:
- cmakelint.sh: simplify, alpha sort the filelist.
- perlcheck.sh: simplify.

Closes #20039
2025-12-20 11:34:27 +01:00
dependabot[bot]
1b205078bd
GHA: bump pip-dependencies
- update `filelock` from 3.20.0 to 3.20.1 (CVE-2025-68146) (used in pytests)
- update `pytest` from 9.0.1 to 9.0.2
- update `ruff` from 0.14.8 to 0.14.9

Closes #20004
2025-12-17 00:55:26 +01:00
Viktor Szakats
61273f5812
badwords: catch and fix threading-related words
Also:
- sync newlines between the two threaded examples.

Closes #20001
2025-12-16 21:26:58 +01:00
Viktor Szakats
5431b3dd6b
build: unix socket tidy-ups
- lib: delete two unused `<sys/un.h>` includes.

- lib: drop interim macro `WIN32_SOCKADDR_UN`.
  Follow-up to 0fe9018e1a #7737
  Also fixing a potential issue of leaving unix socket support disabled
  if any header would include Windows' `afunix.h`, and define
  `UNIX_PATH_MAX` on its own.

- connect: honor unix socket disable option.

- connect: simplify unix socket PP condition.
  `USE_UNIX_SOCKETS` already means the necessary header/type are
  available, guaranteed by configure. `AF_UNIX` is already used
  elsewhere in the code without explicit checks.

- curl_setup.h: document availability of `afunix.h` on Windows more.
  It requires mingw-w64 10+ or MS SDK 10.17763.0 VS2017 15.8+.

- curl_setup.h: use `afunix.h` with mingw-w64 v10+ to start avoiding
  the local workaround if possible.

- GHA/windows: test disable unix socket option on Windows.

Ref: https://devblogs.microsoft.com/commandline/af_unix-comes-to-windows/

Closes #19989
2025-12-16 13:41:25 +01:00
Viktor Szakats
7b2783496c
GHA/non-native: fix passing some envs to the VMs
Also increase the minimum for FreeBSD.

Ref: #19987
Follow-up to 3f1cd809ee #19942
Closes #19988
2025-12-16 00:21:39 +01:00
renovate[bot]
9b3557b706
GHA/linux: update dependency pizlonator/fil-c to v0.677
Closes #19974
2025-12-15 12:51:30 +01:00
Viktor Szakats
43a95aa1bd
renovate: try bumping Fil-C on releases, not tags
CI needs the binary packages attached to the release, which appears some
time after tagging. Hopefully this patch helps getting a clean build
by the time Renovate opens its PR.

Ref: https://docs.renovatebot.com/modules/datasource/github-releases/
Ref: #19905, #19974
Closes #19975
2025-12-15 02:04:21 +01:00
renovate[bot]
e6146418df
GHA: update actions
- update actions/checkout action to v6.0.1
- update github/codeql-action action to v4.31.8
- update msys2/setup-msys2 action to v2.30.0

Closes #19962
Closes #19967
Closes #19968
2025-12-14 09:17:31 +01:00
Viktor Szakats
23f9d629f5
GHA/checksrc: fix -z position, also use --output with xmllint
Fixing:
```
fatal: option '-z' must come before non-option arguments
```
Ref: https://github.com/curl/curl/actions/runs/20183280533/job/57948203944#step:4:5

Follow-up to b5ea0736bb #19946
Closes #19958
2025-12-13 20:50:33 +01:00
renovate[bot]
72f55c1c12
GHA: update actions
- actions/cache action to v5.0.1
- actions/download-artifact to v7.0.0
- actions/upload-artifact to v6.0.0

Closes #19952
Closes #19953
2025-12-12 23:21:33 +01:00
Viktor Szakats
74494d620b
GHA: enable libssh and libssh2 in 10 more Linux jobs
To run more pytest sshd tests, and for more static analysis.

Also:
- drop redundant option from `openssl libssh2 ...` config.
- GHA/linux: enable pytest in the LTO job (to test libssh2).
- avoid both with local builds of OpenSSL-forks, due to crypto lib
  mixups causing a mixture of build error, crashes, test failures.

Follow-up to eb39fee40b #19934

Closes #19943
2025-12-12 17:41:20 +01:00
Viktor Szakats
b5ea0736bb
tests/data: add XML prolog to test files
To formalize they are now XML-compliant (with some asterisks.)

Also to help syntax highlighters work on them to make their content more
readable.

Also:
- Delete empty comment decorations.
- GHA/checksrc: simplify XML check.
- runtests: fail to load test data with XML prolog missing.

Follow-up to bfe6eb1c06 #19927
Follow-up to 87ba80a6df

Closes #19946
2025-12-12 17:17:24 +01:00
Viktor Szakats
b83fb8cde7
GHA/windows: move dl-mingw tests from 9.5.0 to 15.1.0
To see if it's less flaky. Also to finish 1m faster due to faster builds.

Closes #19947
2025-12-12 14:14:32 +01:00
Viktor Szakats
77eb6697f5
test568: fix codespell, catch it next time early in CI
Also:
- GHA/checksrc: do not exclude `tests/data/*` changes.

Follow-up to 407d2f3d57 #19944

Closes #19945
2025-12-12 13:33:51 +01:00
Viktor Szakats
e413a38190
build: disable typecheck for analyzers and Fil-C
- cmake: automatically disable typecheck when running clang-tidy,
  to avoid possible interference, and to improve performance.

- INSTALL-CMAKE: document both this, and unity=off for clang-tidy.

- GHA/linux: disable for some static analyzers CI jobs to avoid possible
  interference.

- GHA/linux: disable in Fil-C job to improve build performance.

Follow-up to 9e6f1c5efb #19637
Follow-up to fd2ca2399e #17955

Closes #19941
2025-12-12 12:21:45 +01:00
Viktor Szakats
3f1cd809ee
runtests: add options to set minimum number of tests, use them
To detect mistakes made in the runtests framework that reduce
the number of test runs. Before this patch it could go undetected with
a green CI.

The minimum thresholds will need light maintenance going forward (either
bumping them periodically, or adjust if some may fell below minimums for
justified reasons). We may also make minimums tighter or looser, or more
job-specific.

Latest number of test runs for each job can be seen at Test Clutch:
https://testclutch.curl.se/static/reports/feature-matrix.html

Also:
- GHA: set minimums.

Assisted-by: Dan Fandrich

Follow-up to f2a75a14dd
Follow-up to bb1391f943 #19510

Closes #19942
2025-12-12 12:20:22 +01:00
Viktor Szakats
fe8393d7db
tidy-up: miscellaneous
- drop stray duplicate empty lines in docs, scripts, test data, include,
  examples, tests.
- drop duplicate PP parenthesis.
- curl-functions.m4: move literals to the right side in if expressions,
  to match rest of the source code.
- FAQ.md: delete language designator from an URL.
- packages: apply clang-format (OS400, VMS).
- scripts/schemetable.c: apply clang-format.
- data320: delete duplicate empty line that doesn't change the outcome.
- spacecheck: extend to check for duplicate empty lines
  (with exceptions.)
- fix whitespace nits

Closes #19936
2025-12-12 04:18:48 +01:00
renovate[bot]
141ce4be64
GHA: update actions/cache action to v5
Closes #19940
2025-12-12 01:12:43 +01:00
Viktor Szakats
46429d6f44
GHA/checkdocs: re-enable proselint, update setup, fix issues found
- update configuration and invocation.
- install via pip.
- drop a file exception.
- alpha sort proselint settings.
- FILEFORMAT: update text about XML compliance.
- CI job takes 22 seconds total.

Ref: https://github.com/amperser/proselint/releases/tag/v0.16.0

Follow-up to 38bfe1c2aa #15314

Closes #19931
2025-12-11 11:42:28 +01:00
Viktor Szakats
bfe6eb1c06
runtests: drop notxml keyword, verify all test data files as XML
Follow-up to 7f3731ce14 #19595

Closes #19927
2025-12-11 00:50:18 +01:00
Viktor Szakats
0b96f7573f
GHA/checkurls: add dry run on push
To verify if the basics work.

Downside is that the scheduled (live) runs are intermixed with the dry
runs and less obvious to find in the default list:
https://github.com/curl/curl/actions/workflows/checkurls.yml

This URL filters for scheduled runs only:
https://github.com/curl/curl/actions/workflows/checkurls.yml?query=event%3Aschedule

Seems fine, because we're only interested in red runs.

Closes #19917
2025-12-10 15:11:12 +01:00
renovate[bot]
6532398af4
GHA: update dependencies and actions
- update dependency awslabs/aws-lc to v1.65.1
- update dependency pizlonator/fil-c to v0.676
- update github/codeql-action action to v4.31.7

Closes #19905
Closes #19912
Closes #19913
2025-12-10 03:46:23 +01:00
Daniel Stenberg
073b85cefe
GHA: make links get checked daily
Assisted-by: Viktor Szakats
Closes #19898
2025-12-09 16:28:23 +01:00
Viktor Szakats
f450f3801b
GHA/windows: re-enable taskkill
Nothing conclusive for the last ~30 days when `taskkill` was made
a no-op. Jobs remained flaky with all known failure modes. Sometimes
they finish green on the first run, sometimes they fail. Hard to say
more without comparing detailed stats for this period and the
preceding (or upcoming) one.

In almost all runs, the PID to be killed did not exist at the time of
check.

Follow-up to 2701ac6a4d #19421
Closes #19897
2025-12-09 14:46:00 +01:00
Daniel Stenberg
3dd1ffdeb0
FAQ/TODO/KNOWN_BUGS: convert to markdown
- convert to markdown
- auto-generate the TOCs on the website, remove them from the docs
- cleanups
- spellchecked
- updated links

Closes #19875
2025-12-09 10:52:56 +01:00
Viktor Szakats
70d71e8761
tests/data: move section data to external files
To make the test files XML-compliant, and the expected results
possibly easier to manage by keeping them in `.md`, `.html`, `.1`
and `.txt` files.

Non-XML-compliant files are down to 31 (1.6%) after this patch.

Closes #19882
2025-12-09 10:12:49 +01:00
dependabot[bot]
cc853ddc3d
GHA: bump pip-dependencies ruff, psutil, pytest
- update `ruff` from 0.14.5 to 0.14.8
- update `psutil` from 7.1.2 to 7.1.3
- update `pytest` from 8.4.2 to 9.0.1

Closes #19876
2025-12-08 15:37:43 +01:00
Viktor Szakats
7dd5bb77c3
CI/windows: add torture tests with Schannel
With Schannel and Unicode, `-shallow=13`. It finishes in 12 minutes,
making it the slowest Windows job. It's still on par with torture jobs
on other platforms (though they manage to fit `-shallow=25`).

Also `-shallow=13` still caught leaks in multiple tests.

Also:
- test2300: exclude from CI Windows torture tests.
- experimental.

The downside of going with deeper torture tests, is that it requires
increasing the job timeout. This in turns means that a hung job takes
more minutes to be killed (due to GitHub bugs where a hung step does not
honor the per-step timeout on Windows, another bug where a hung job gets
killed +5 minutes above the workflow timeout, and another bug (or
feature?) where other failed/hung jobs in the the workflow cannot be
restarted till the last job finishes or gets killed. And all this
probably related to a Perl bug which makes it hang on fork errors, which
is turn related to Cygwin/MSYS2 runtime bugs which breaks fork in case
of curl's mixed MSYS2-Perl/native-curl-binaries environment.)
The end result in longer forced waits before being able to restart flaky
jobs, which slows down iterations and annoying.

Also tried:
- non-c-ares job: detected known issues much less often.
- replaced libidn2 with WinIDN: detected known issues much less often.
- runtests -j9-j20 values: did not make a difference.
- other `-shallow` values: 20 is the max feasible, but comes with the
  downside described above.

Ref: #19675 (reboot of)
Follow-up to f08417c425 #19863

Closes #19865
2025-12-08 13:08:14 +01:00
Daniel Stenberg
ab9beda1b3
docs: switch more URLs to https://
Normalize using https:// almost everywhere instead of http://

Closes #19872
2025-12-08 12:57:51 +01:00
renovate[bot]
c56ee2ab78
GHA/linux: update dependency pizlonator/fil-c to v0.675
Closes #19873
2025-12-08 12:16:57 +01:00
Viktor Szakats
81e5e2434e
GHA/linux: blind try to make Renovate detect Fil-C releases
0.675 has been out for 2 weeks, Renovate did not detect it with
`semver-partial`. Try with `semver-coerced`.

Refs:
https://docs.renovatebot.com/modules/versioning/semver-coerced/
https://docs.renovatebot.com/modules/versioning/semver-partial/

Follow-up to 16c6ea36cc #19391
2025-12-08 12:06:22 +01:00
Daniel Stenberg
51587f6f14
mdlinkcheck: detect and check "raw" links
- URLs specified outside of the markdown []() are now extracted and
  checked

- also check TODO, FAQ and KNOWN_BUGS

- more aggressive avoiding to check github.com/curl/curl, all uses of
  example domains and some more established URLs on the curl.se site

- list all errors in the end to make them easier to spot in CI logs

Closes #19848
2025-12-05 23:41:41 +01:00
Viktor Szakats
0476e4fc65
tidy-up: one more round of formatting nits
Closes #19835
2025-12-04 19:30:59 +01:00
Viktor Szakats
7a1e99eefa
badwords: check FAQ with allowlisted 'will', fix a typo
Also:
- badwords.pl: add support for filename:word exceptions.
- badwords.pl: handle `-w` file open errors.

Ref: https://github.com/curl/curl/pull/19817#issuecomment-3612386568
Closes #19837
2025-12-04 19:30:08 +01:00
Viktor Szakats
1753de9d7a
GHA/checksrc: give more time for slow Azure servers [ci skip]
Sometimes 1 minutes is too short to install 39.4 kB of archives.

Ref: https://github.com/curl/curl/actions/runs/19898949860/job/57036965452
2025-12-03 16:34:10 +01:00
Viktor Szakats
d993d46eb1
GHA/windows: install MSYS2 c-ares only when used
Closes #19820
2025-12-03 04:45:26 +01:00
Viktor Szakats
e25a3c6734
GHA/curl-for-win: drop WINE install, do not run curl after build
To reduce to amount of Debian packages to install, which hopefully
removes some flakiness due to sometimes very slow Azure package
distro servers. Possible also making these jobs finish 20s faster.

Windows from Debian | llvm               | gcc
:------------------ | :----------------: | :----------------:
build time          |  2m41s  ->  2m20s  |  3m19s  ->  2m57s
installed packages  |  288    ->  142    |  247    ->  99
downloads           |  403 MB ->  240 MB |  297 MB -> 134 MB
disk space          | 2132 MB -> 1289 MB | 1582 MB -> 739 MB

Before: https://github.com/curl/curl/actions/runs/19765983026
After: https://github.com/curl/curl/actions/runs/19766373960?pr=19749

Ref: 02149b7e36

Closes #19749
2025-11-28 15:39:12 +01:00
Viktor Szakats
48939a4575
GHA/linux-old: add support for using custom CMake versions
Install CMake from the Kitware GitHub release archive. To allow choosing
its version independently from the OS.

Switch to 3.7.0 (from 3.7.2) to test the earliest supported version.
Also tested OK with 3.18.4 and 3.7.2.

The download and install step takes 1-2 seconds.

Follow-up to c9e50e9e39 #19737

Closes #19738
2025-11-28 03:11:33 +01:00
renovate[bot]
9d059e27d1
GHA: update dependency pyspelling to v2.12.1
Closes #19712
2025-11-28 02:53:40 +01:00
renovate[bot]
e7c2f5bf53
GHA: update dependency google/boringssl to v0.20251124.0
Closes #19685
2025-11-28 02:53:40 +01:00
Viktor Szakats
5c275f7fef
GHA/linux-old: stop installing groff, it is unused 2025-11-28 02:40:19 +01:00
Viktor Szakats
c1deea4c58
GHA/http3-linux: add H3 valgrind tests
Ref: #19714
Ref: #19717

Closes #19719
2025-11-27 16:05:42 +01:00
Viktor Szakats
c8b76ff42f
GHA/http3-linux: fix broken h3 server in non-openssl jobs, for more pytests
It also revealed 3 failing earlydata tests with two backends on Linux,
seen earlier on macOS:
```
LibreSSL     before: 571 passed, 141 skipped in 45.34s
LibreSSL      after: 736 passed,  95 skipped in 68.08s

aws-lc       before: 571 passed, 141 skipped in 78.87s
aws-lc        after: 736 passed,  95 skipped in 66.71s

BoringSSL    before: 511 passed, 201 skipped in 46.47s
BoringSSL     after: 676 passed, 155 skipped in 63.96s

GnuTLS       before: 515 passed, 197 skipped in 48.31s
GnuTLS        after: 688 passed, 140 skipped in 67.79s (3 failed)

wolfSSL      before: 541 passed, 171 skipped in 52.49s
wolfSSL       after: 714 passed, 114 skipped in 83.84s (3 failed)

OpenSSL      before: 757 passed,  74 skipped in 65.43s
OpenSSL       after: 757 passed,  74 skipped in 65.06s

OpenSSL-quic before: 741 passed,  90 skipped in 62.85s
OpenSSL-quic  after: 741 passed,  90 skipped in 57.20s

quiche       before: 511 passed, 201 skipped in 45.94s
quiche        after: 664 passed, 167 skipped in 59.57s
```
Before: https://github.com/curl/curl/actions/runs/19734972379
After: https://github.com/curl/curl/actions/runs/19736703398?pr=19723

Failures address via: 0081c5b126 #19730

Ref: #19724

Closes #19723
2025-11-27 15:57:52 +01:00
Viktor Szakats
7a10f49322
badwords: make some words match case-insensitively
Also:
- wcurl.md: sync with upstream to pass the badwords check.

Ref: 11f840cddd
Ref: https://github.com/curl/wcurl/pull/79

Closes #19713
2025-11-27 15:10:34 +01:00
Viktor Szakats
71e9920fcd
GHA: add timeouts to mitigate hung brew install step
Ref: https://github.com/curl/curl/actions/runs/19736703410/job/56550251534?pr=19723

Closes #19726
2025-11-27 15:05:08 +01:00
Viktor Szakats
2acdc4f549
autotools: add nettle library detection via pkg-config (for GnuTLS)
Also:
- fix to restore full state when gnutls canary function is not found.
- fix indentation.

Closes #19703
2025-11-26 12:39:30 +01:00
Viktor Szakats
4041eea61e
GHA/http3-linux: build nettle manually for GnuTLS 3.8.11+
GnuTLS 3.8.11 started requiring a nettle version new enough to be
missing from Ubuntu LTS released a year ago. To keep up testing it,
build nettle from source. Besides the necessary one time effort this
has the downside that nettle updates now need to be done manually
a couple of times per year when renovate detects one. (if I got the
renovate formula correct to catch the tag format).

Also:
- switch the local GnuTLS build to use the release tarball instead of
  the Git repo and calling the script `bootstrap`. The script could
  potentially download source code using the cleartext `git:` protocol.
  It's also downloading lots of content, including a full OpenSSL repo.

Ref: 955f7a7fc2/NEWS (L41-L44)
Follow-up to 905b718de3 #19642
Follow-up to a439fc0e37 #19613

Closes #19680
2025-11-26 02:16:49 +01:00
renovate[bot]
3696ac4e29
GHA: update dependency ngtcp2/nghttp3 to v1.13.1
Closes #19664
2025-11-24 17:41:50 +01:00
Viktor Szakats
d03712169b
cmake: add support for libbacktrace, fix two build issues
Also:
- memdebug: fix symbol collision in unity builds.
- memdebug: fix compiler warning by making a variable static.

Follow-up to c77bed81a2 #19657

Closes #19666
2025-11-24 14:29:29 +01:00
renovate[bot]
4d04a03016
GHA: update ngtcp2/nghttp3 to v1.13.0 from v1.12.0
Closes #19654
2025-11-23 23:51:04 +01:00
renovate[bot]
74cf7725d7
GHA: update ngtcp2/ngtcp2 to v1.18.0 from v1.17.0
Closes #19655
2025-11-23 23:49:56 +01:00
Daniel Stenberg
905b718de3
Revert "GHA: update gnutls/gnutls to 3.8.11 from 3.8.10"
This reverts commit a439fc0e37.

It requires a version of libnettle that is not included in these Ubuntu
versions: "Libnettle 3.10 was not found"

Closes #19642
2025-11-21 22:39:39 +01:00
renovate[bot]
a439fc0e37
GHA: update gnutls/gnutls to 3.8.11 from 3.8.10
Closes #19613
2025-11-21 16:00:34 +01:00
Viktor Szakats
9e6f1c5efb
build: add build-level CURL_DISABLE_TYPECHECK options
Usage:
- autotools: `--disable-typecheck` (or `--enable-typecheck` (default))
- cmake: `-DCURL_DISABLE_TYPECHECK=ON`.

To disable `curl_easy_setopt()`/`curl_easy_getinfo()` type checking with
supported (new) gcc and clang compilers. It is useful to improve build
performance for the `tests/libtest` target. In particular the CodeQL
analyzer may take above an hour to compile with type checking enabled,
and disabling it brings it down to seconds. On local machines it may
also cut build times in half when build testdeps, depending on platform
and compiler.

Other than these cases, we recommend leaving type checking enabled.

Ref: fdacf34aae #19632

Also:
- GHA/codeql: use it.
- test1165: check in `include/curl`.
- lib1912: delete stray todo comment.
- spelling and comment nits.

Closes #19637
2025-11-21 13:48:35 +01:00
Daniel Stenberg
de7ee1c962
GHA: disable TLS in the linux-old build
There are no supported TLS libraries left in "stretch".
2025-11-21 10:37:33 +01:00
Viktor Szakats
b4220bde0b
GHA/checksrc: switch xmllint job to Linux (from macOS)
macOS was chosen because xmllint comes preinstalled, saving the prereq
install step. But, macOS's xmllint jobs sometimes doesn't finish in 1m
(instead of under 1 second) and gets cancelled, causing flaky failures.
Go with Linux and an install phase (of 15s) instead.

Examples:
https://github.com/curl/curl/actions/runs/19558021722/job/56004334495

Closes #19634
2025-11-21 04:01:27 +01:00
Viktor Szakats
fdacf34aae
GHA/codeql: add tweak to successfully build libtests for CodeQL
Turns out the cause of CodeQL hangs (or probably just extreme long
compile) is the header `curl/typecheck-gcc.h`. By accident I noticed
that the preprocessed output of libtests.c is 75 MB (megabytes). This
is much higher than the amounf of source code hinted, also compared to
e.g. units.c or other build targets. The reason for the extreme size
is each easy option call pulling in the large checker logic defined
in this header.

By compiling with `-DCURL_DISABLE_TYPECHECK`, preprocessed output drops
to 2.2 MB (34x), and the libtests target builds without issues.

Also build all tests and examples with the Linux HTTP/3 config, covering
3 more files.

With these, CodeQL C coverage is 893 out of 930 (96%) (was: 645 69%)

Follow-up to 71fc11e6bb #18695
Follow-up to a333fd4411 #18557
Follow-up to b4922b1295 #18564

Closes https://github.com/vszakats/curl/pull/11
Closes #19632
2025-11-21 03:48:16 +01:00
renovate[bot]
27a7cf40bb
GHA: update dependency wolfSSL/wolfssl to v5.8.4
Closes #19633
2025-11-21 03:48:16 +01:00
renovate[bot]
c5ef882e90
GHA: update actions/checkout action to v6 from v5
Closes #19628
2025-11-20 22:27:00 +01:00
Viktor Szakats
b0d23b901f
GHA: set --buildinfo for test-torture jobs
Only the `test-ci` build target sets `--buildinfo` automatically,
since 985f39c0ce. It needs to be set
manually for other targets used in CI, such as `test-torture`,
to enable the `buildinfo.txt` dump in the runtests step.

For Test Clutch. In an attempt to re-sync `targetarch` with the rest of
macOS jobs on the feature matrix page:
https://testclutch.curl.se/static/reports/feature-matrix.html
Before this patch and possibly since the breaking update It's `aarch64e`
for torture jobs and `aarch64` for the rest

(stricly speaking `aarch64e` is the correct value for all macOS jobs, but
autotools and cmake report arm64/aarch64 without the `e`.)

Regression from 985f39c0ce #18147

Closes #19601
2025-11-19 15:48:20 +01:00