1418 Commits

Author SHA1 Message Date
Viktor Szakats
cf4a62725d CI: two display name tweaks
- use `AM`/`CM` where missing.
  In GHA/linux-old and AppVeyor CI.
  To denote autotools and CMake, and to align with rest of the jobs.

- rename `Old Linux` to `Linux Old` to align with the rest of Linux
  jobs on GitHub web views sorted by name.

Closes #19316
2025-11-01 02:24:17 +01:00
Viktor Szakats
d29f14b9cf tests: replace significant invisible spaces with macros
To make them explicit, visible, avoid being accidentally trimmed.
Also prevents Git warnings, e.g. on `git am`.

Also:
- runtests: add support for `%spc%` and `%tab%` macros.
- test59: delete non-significant line-ending space.
- spacecheck.pl: drop line-ending whitespace exception for tests.

Closes #19300
2025-10-31 17:15:33 +01:00
renovate[bot]
a83eae4d53 GHA: update libressl/portable to v4.2.1
Closes #19283
2025-10-30 16:21:52 +01:00
renovate[bot]
614895c045 GHA: update pyspelling to v2.12
Closes #19262
2025-10-29 08:32:28 +01:00
renovate[bot]
d3e7bef1ef GHA: update reuse to v6.2.0
Closes #19257
2025-10-29 08:31:47 +01:00
Viktor Szakats
ab20bb47cf GHA/linux: make OpenLDAP local build smaller
By disabling its `slapd` component, that's not needed for curl.

Cache size: 2.7 -> 1.7 MB

Also merge two `make` invocations.

Closes #19250
2025-10-27 07:17:32 +01:00
renovate[bot]
c59bf90186 GHA: update nghttp2/nghttp2 to v1.68.0
Closes #19238
2025-10-25 17:58:18 +02:00
Viktor Szakats
a3793ee7e3 GHA/windows: delete MSYS2 ARM64 workaround
Follow-up to 5249b99a70 #18438
Follow-up to c4e776cafa #17103

Closes #19234
2025-10-25 00:19:00 +02:00
renovate[bot]
af8c98a0f3 GHA: bump GitHub artifact Actions
- actions/download-artifact: v5.0.0 -> v6.0.0
- actions/upload-artifact: v4.6.2 -> v5.0.0

Closes #19232
2025-10-25 00:19:00 +02:00
Viktor Szakats
71d1eec675 tidy-up: miscellaneous
- cmake/Find*: make double quotes consistent.
- drop redundant parenthesis.
- GHA/checksrc: sync a step name with others.
- whitespace.

Closes #19233
2025-10-25 00:19:00 +02:00
Viktor Szakats
f4293cd81e GHA/dependabot: group updates
To avoid update spam and PR that can't be applied on top of each other.

Ref: #19217 #19218 #19219

Closes #19220
2025-10-24 15:05:15 +02:00
Viktor Szakats
7d0261c228 GHA/checksrc: extend zizmor to Dependabot, set cooldown periods
Closes #19216
2025-10-24 14:01:04 +02:00
Viktor Szakats
87ab1cd255 GHA/fuzz: try fixing concurrency group deadlock
```
Fuzzer
Canceling since a deadlock was detected for concurrency group:
'Fuzzer-82fa9862dfa3083d4014d6dcfb721a7278e66f0b' between a top level workflow and 'Fuzzing'
```
https://github.com/curl/curl/actions/runs/18778617351

Follow-up to 82fa9862df #19215
2025-10-24 13:46:14 +02:00
Viktor Szakats
82fa9862df GHA: set concurrency: where missing
To silence zizmor 1.16.0 warnings.

Also:
- http3-linux: replace hard-coded workflow name with variable.
  Follow-up to a8174176b5 #13841
- codeql: set `cancel-in-progress: true`.
  zizmor apparently does not allow `false` in pedantic mode anymore:
  https://github.com/zizmorcore/zizmor/pull/1227
- codeql: sync concurrency setting with the rest of the jobs.
  (I'm not sure this is correct, or why it was previously special-cased.)

Expressions used (before and after this patch):
- `group: ${{ github.workflow }}-${{ github.event.sha }}-${{ github.event.target_url }}`
  for GHA/appveyor-status.
- `group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}`
  for all the rest.

Ref: https://github.com/curl/curl/actions/runs/18776245057/job/53571438139?pr=19209

Closes #19215
2025-10-24 13:38:11 +02:00
Viktor Szakats
c96b7c4636 des: merge curl_des into curl_ntlm_core.c
`curl_des.c` contained a single, short, function
`Curl_des_set_odd_parity()`, called from `curl_ntlm_core.c` alone.

Move it there, and define it only when needed.

Follow-up to 300876a7a6
Follow-up to 8cc70db2db

Closes #19209
2025-10-24 12:39:27 +02:00
Viktor Szakats
4a6fbd5e1d NTLM: disable if DES support missing from OpenSSL or mbedTLS
Make autotools and cmake detect DES support in OpenSSL and mbedTLS.
Forward feature macros to C and omit NTLM from the feature preview list.
Use the feature macros in source. This ensure that `-V` output matches
the preview.

OpenSSL doesn't support DES when built with `no-des` or `no-deprecated`.
mbedTLS 4.x no longer supports it, and it's possible to disable it in
<4 with `scripts/config.py unset MBEDTLS_DES_C`.

Before this patch this worked for
mbedTLS 4 only, and with a regression for pending PR #16973.

Also:

- drop NTLM feature check from `curl_setup.h` in favour of autotools/
  cmake feature macros. This makes `curl_setup.h` no longer need
  to include an mbedTLS header, which in turn makes tests/server build
  without depending on mbedTLS.
  Fixing, in #16973:
  ```
  In file included from tests/server/first.h:40,
                   from bld/tests/server/servers.c:3:
  lib/curl_setup.h:741:10: fatal error: mbedtls/version.h: No such file or directory
    741 | #include <mbedtls/version.h>
        |          ^~~~~~~~~~~~~~~~~~~
  ```
  Ref: https://github.com/curl/curl/actions/runs/18689537893/job/53291322012?pr=16973
  Ref: #19181 (initial fix idea)
  Follow-up to 3a305831d1 #19077

- move back mbedTLS header include and version check from
  `curl_setup.h` to each source which consumes mbedTLS.

- GHA/http3-linux: drop workaround that disabled NTLM for
  `no-deprecated` OpenSSL builds.
  Follow-up to 006977859d #12384

- curl_ntlm_core: drop pointless macro `CURL_NTLM_NOT_SUPPORTED`.
  Follow-up to 006977859d #12384

Closes #19206
2025-10-24 12:12:20 +02:00
Viktor Szakats
96717dea4c GHA/labeler: add FindGnuTLS.cmake
Follow-up to 1966c86d71 #19163
Cherry-picked from #16973
2025-10-22 18:58:10 +02:00
Viktor Szakats
ea6455b7a4 spelling: subdirectories
Closes #19180
2025-10-21 17:18:35 +02:00
Viktor Szakats
ccec2fae1b GHA/curl-for-win: drop libssh
Switch back to default libssh2.

The distribution server has reliability issues (this time it works
locally though):
```
++ curl [...] --output pkg.bin https://www.libssh.org/files/0.11/libssh-0.11.3.tar.xz --output pkg.sig https://www.libssh.org/files/0.11/libssh-0.11.3.tar.xz.asc
curl: (92) HTTP/2 stream 1 was not closed cleanly: INTERNAL_ERROR (err 2) [4x]
```
Ref: https://github.com/curl/curl/actions/runs/18651134321/job/53169147048#step:3:2391

There is also no official mirror that I know of.

Ref: af8e1aa4b0 #18257

Closes #19162
2025-10-20 14:22:14 +02:00
Viktor Szakats
3986149c04 GHA/windows: delete remains of Perl Win32-Process* caching
Follow-up to c8d6643df2 #19083
2025-10-20 00:25:23 +02:00
Viktor Szakats
d8a7aad061 GHA/windows: drop git config core.autocrlf input steps
CI works without it now. For an inexplicable reason, this single `git`
command took 9 seconds per job, making this patch save more than
2 minutes per workflow run. It was also the only step using PowerShell.

Closes #19150
2025-10-19 23:00:50 +02:00
Viktor Szakats
e779650a86 GHA/curl-for-win: update container image envs
Follow-up to 1f31ff06ad

Closes #19129
2025-10-19 01:30:19 +02:00
Viktor Szakats
373855a4da GHA/curl-for-win: add minimal Linux build
A bit more minimal build than the one used for trurl. To stress test
a build with most features disabled.

Costs 40 seconds, of which 6 is the build, rest is installing tools.

Ref: 5b385001d5
Ref: 3ee10692c7

Follow-up to 5af2457848 #17818

Closes #17961
2025-10-17 17:27:12 +02:00
renovate[bot]
74147acd17 GHA: update dependency ruff to v0.14.1
Closes #19085
2025-10-17 16:19:42 +02:00
renovate[bot]
9568109f71 GHA: update ngtcp2/ngtcp2 to v1.17.0
Closes #19092
2025-10-17 14:25:09 +02:00
Viktor Szakats
3a305831d1 mbedtls: add support for 4.0.0
After this patch libcurl requires (as already documented)
the `curl_global_init()` call when using the `curl_formadd()` API with
mbedTLS.

Note: NTLM is not supported with mbedTLS 4+, because it lacks
the necessary crypto primitive: DES.

Also:
- lib: de-dupe mbedTLS minimum version checks into `curl_setup.h`.
- lib: initialize PSA Crypto as part of `curl_global_init()`.
  For MD5, SHA-256, `curl_formadd()`, and MultiSSL builds with mbedTLS
  but where mbedTLS isn't the default backend.
- lib1308: fix to call `curl_global_init()` (for the Form API).
- curl_ntlm_core: disable with mbedTLS 4+.
- md4: disable mbedTLS implementation when building against 4.x.
- md5: use mbedTLS PSA Crypto API when available, otherwise use
  the default local implementation.
- sha256: use mbedTLS PSA Crypto API when available, otherwise use
  the default local implementation.
- vtls/mbedtls: drop PSA Crypto initialization in favor of
  `curl_global_init()`.
- vtls/mbedtls: use PSA Crypto random API with all mbedTLS versions.
- vtls/mbedtls: do the same for the SHA-256 callback.
- autotools: detect mbedTLS 4+, and disable NTLM for 3.x.
- cmake: disable NTLM for mbedTLS 3.x.
- GHA/linux: keep building mbedTLS 3.x manually and use it in
  an existing job, while also enabling pytest in it.
- GHA/linux: bump to mbedTLS 4.0.0.
  Closes #19075
  Closes #19074

Refs:
https://github.com/Mbed-TLS/mbedtls/releases/tag/mbedtls-4.0.0
https://github.com/Mbed-TLS/mbedtls/blob/mbedtls-4.0.0/docs/4.0-migration-guide.md
https://github.com/Mbed-TLS/mbedtls/blob/mbedtls-4.0.0/tf-psa-crypto/docs/1.0-migration-guide.md [404]
https://github.com/Mbed-TLS/TF-PSA-Crypto/blob/tf-psa-crypto-1.0.0/docs/1.0-migration-guide.md
https://github.com/Mbed-TLS/TF-PSA-Crypto/blob/tf-psa-crypto-1.0.0/docs/psa-transition.md
627f727bbe/docs/4.0-migration-guide

Closes #19077
2025-10-17 11:50:48 +02:00
Viktor Szakats
c8aaa5d2f2 scripts: pass -- before passing xargs
Also:
- GHA/checkdocs: escape `.` in -E regex expression.

Closes #19076
2025-10-16 20:45:28 +02:00
Viktor Szakats
3c0604bba4 GHA: sync up curl -V step descriptions
Also to make it easier to recognize.

Also:
- GHA/linux-old: split steps to match other jobs.
- GHA: add `--disable` where missing.

Closes #19084
2025-10-16 20:18:25 +02:00
Viktor Szakats
c8d6643df2 GHA/windows: stop installing Perl Win32-Process* modules
It's complex and did not help stabilizing CI runs.

Hard to say, but I'm suspicious it's related to the CI errors
-1073741502, 0xC0000142, seen in the 'build examples' and
'disk space used' steps.

Ref: #18526
Reverts 52775a7fb4 #18296
Closes #19083
2025-10-16 18:53:44 +02:00
Viktor Szakats
800b0bec18 GHA: bump LibreSSL to 4.2.0
Also move back URLs to GitHub, sources are available there again.

Ref: https://github.com/libressl/portable/releases/tag/v4.2.0
Ref: https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-4.2.0-relnotes.txt
Ref: #19050
Ref: #19081

Closes #19082
2025-10-16 16:51:08 +02:00
Viktor Szakats
0855f30709 kerberos: bump minimum to 1.3 (2003-07-08), drop legacy logic
Previous minimum was: 1.2.4 (2002-02-28)

- assume `gssapi/gssapi.h` header for MIT Kerberos.

  Drop logic detecting this header, and drop alternate logic including
  a bare "gssapi.h". Bare `gssapi.h` is Heimdal-specific. MIT Kerberos
  added support for it for Heimdal compatibility on 2006-11-09,
  redirecting to `gssapi/gssapi.h`. MIT Kerberos supported the latter
  header in the 1990s already.

  Ref: 40e1a016f9 (2008-03-06)
  Ref: d119352001 (2006-11-09)

- configure.ac: stop using `HAVE_GSSAPI_GSSAPI_H`.

  Added in 2010 to support "ancient distros such as RHEL-3" where
  `gssapi/gssapi_krb5.h` did not include `gssapi/gssapi.h`.

  MIT Kerberos includes it since commit:
  d9e959edfa (2003-03-06)
  Released in 1.3 (2003-07-08).

  Bump minimum required version to avoid this issue.

  Reverts cca192e58f (2010-04-16)

Ref: https://web.mit.edu/kerberos/dist/historic.html
Ref: https://sources.debian.org/src/krb5/

Closes #18992
2025-10-10 19:47:08 +02:00
Viktor Szakats
fc9b215fde CI.md: refresh
Closes #18973
2025-10-10 19:47:08 +02:00
Viktor Szakats
9442dd480e GHA/linux: test GNU GSS with autotools, cmake, valgrind and scan-build
The cmake build is running runtests with valgrind. The autotools one is
running scan-build.

Also:
- ignore two memleaks with GNU GSS detected by valgrind.
- add comment on support status of `GSS_C_DELEG_POLICY_FLAG`.

Closes #19008
2025-10-10 17:33:17 +02:00
Viktor Szakats
e5950b2d37 kerberos: stop including gssapi/gssapi_generic.h
It's a legacy MIT Kerberos header that's no longer used by curl since:
355bf01c82 (2015-01-09)

There were still mentions of it after this patch, when using versions
<1.2.3, but those versions aren't supported since:
9918541795 (2008-06-12)

This header remains in use by autotools and cmake to detect MIT Kerberos
(vs. Heimdal, which doesn't have it.)

Ref: https://github.com/curl/curl/pull/18978#issuecomment-3387414995

Closes #18990
2025-10-10 13:59:19 +02:00
Viktor Szakats
801ebf1e1a GHA: rename config files to match pyspelling
To make it more obvious what needs to be looked at when pyspelling is
reporting an issue.

Follow-up to 95e50ad694 #18756
Closes #18974
2025-10-09 14:17:32 +02:00
Viktor Szakats
8be9a26451 build: drop Heimdal support, update docs, replace with MIT Kerberos in CI
The kerberos5 library Heimdal is one of three GSS libraries curl support.
It has a memory leak triggered by the new test in #18917 and the project
seems mostly abandoned.

Drop support and steer users to the MIT krb5 or GNU GSS libraries.

Co-authored-by: Daniel Stenberg

Ref: #18928
Closes #18928
Closes #18932
2025-10-09 02:27:29 +02:00
Viktor Szakats
9fe8ba5c27 GHA/linux-old: sync terminology with other jobs [ci skip]
Cherry-picked from #18932
2025-10-09 01:21:05 +02:00
Viktor Szakats
bbce304c0b GHA/linux-old: dump logs on configure failure
As done in other jobs, but here tailored to old cmake.

The logs generated by ancient CMake aren't super useful though.

Cherry-picked from #18932
Closes #18948
2025-10-08 16:10:40 +02:00
dependabot[bot]
29093f0ee8 GHA: bump dependencies
- cryptography from 44.0.1 to 46.0.2 in tests/http
- ruff from 0.13.2 to 0.14.0 in .github/scripts
- reuse from 6.0.0 to 6.1.2 in .github/scripts
- github/codeql-action from 3.30.5 to 4.30.7

Closes #18941
Closes #18942
Closes #18943
Closes #18945
Closes #18947
2025-10-08 16:07:58 +02:00
Viktor Szakats
c951fe7e6d GHA/dependabot: tweak dir list to avoid a dupe, rename .txt file to avoid the bot
It correctly picked all pips, but also picked
`tests/http/requirements.txt` twice and also
`.github/scripts/codespell-ignore.txt`. Try avoid these issues with this
patch.

Follow-up to 6a31e3137a #18939

Closes #18946
2025-10-08 14:58:32 +02:00
Viktor Szakats
6a31e3137a GHA/dependabot: find more pip deps, tweak commit prefix
Before this patch the Dependabot updater was only picking up
`tests/requirements.txt`:
https://github.com/curl/curl/network/updates/26616523/jobs

Also prefix commit messages with `GHA:`.

Bug: https://github.com/curl/curl/pull/18761#issuecomment-3381147189
Follow-up to b04137c1c6 #18761

Closes #18939
2025-10-08 14:46:00 +02:00
Viktor Szakats
3800a26582 GHA/checksrc: also run on .md file changes
To avoid missing e.g. codespell issue when updating Markdown files only,
as in 82fd9edb0e #18927

Follow-up to 0b54ce6ffc

Closes #18935
2025-10-08 14:33:57 +02:00
Viktor Szakats
df70a68984 cmake: support building some complicated examples, build them in CI
Build these examples when the necessary dependencies are present:
- cacertinmem, usercertinmem (OpenSSL/fork)
- multi-uv (libuv)
- multithread, threaded-ssl (pthread)
- sessioninfo (GnuTLS)

Indicate the necessary dependency via a `Required:` comment placed in
the source file. A single dependency per source is supported as of now.
The name of the dependency should match the variable used within
the cmake scripts, which in turn matches the macro used in the config
header. E.g. for GnuTLS it's `USE_GNUTLS`.

Also:
- GHA/macos: build examples in two job to test GnuTLS and pthread ones.
- GHA/linux: enable libuv to test it with examples.

Follow-up to 6bb7714032 #18914
Closes #18909
2025-10-07 19:09:02 +02:00
Stefan Eissing
357808f4ad multi: add notifications API
Add infrastructure to colled and dispatch notifications for transfers
and the multi handle in general. Applications can register a callback
and en-/disable notification type the are interested in.

Without a callback installed, notifications are not collected. Same when
a notification type has not been enabled.

Memory allocation failures on adding notifications lead to a general
multi failure state and result in CURLM_OUT_OF_MEMORY returned from
curl_multi_perform() and curl_multi_socket*() invocations.

Closes #18432
2025-10-07 10:55:31 +02:00
Viktor Szakats
6f0e212f6e tidy-up: miscellaneous (cont.)
- examples: replace magic numbers with `sizeof()`.
- typos: drop rules no longer needed after excluding tests/data.
- typos: move an exception inline.
- alpha-sort lists.
- fix indentation, whitespace.

Closes #18898
2025-10-06 22:33:38 +02:00
Viktor Szakats
13f10add17 REUSE: bump reuse to v6, add more fences to fix issues
Closes #18895
Closes #18897
2025-10-06 20:54:26 +02:00
Viktor Szakats
beeb1ae762 GHA/configure-vs-cmake: reduce windows cross-toolchain apt installs
Download size: 277 MB -> 65 MB (installed: 1293 MB -> 401 MB)

Also as a workaround for Azure Ubuntu mirror slowdown issues:
https://github.com/curl/curl/actions/runs/18289326469/job/52072333582?pr=18866

Follow-up to 0455d8772a #18509

Closes #18896
2025-10-06 20:09:13 +02:00
Viktor Szakats
0833121305 GHA/http3-linux: cleanup cache entry name after prev
To avoid duplicate `no-deprecated` in the cache entry name.

Follow-up to c96bf36557 #18833

Closes #18853
2025-10-05 14:07:42 +02:00
Daniel Stenberg
bb4326d72b GHA: remove the hacktoberfest label action
No one cares about hacktoberfest anymore.

Closes #18849
2025-10-05 13:41:22 +02:00
Viktor Szakats
c96bf36557 GHA: drop quictls 3.3.0 builds in favor of openssl 3.5+
- http3-linux: move local nghttpx (nghttp2) build to openssl (from
  quictls). Also tried LibreSSL, but it made some HTTP/2 tests fails.

- http3-linux: drop quictls ngtcp2 build.

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

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

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

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

- renovate: drop quictls bump detection.

Closes #18833
2025-10-04 17:49:21 +02:00