]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
7 days agourlapi: allow more path characters "raw" when asked to URL encode bagder/urlapi-path-urlencode 18024/head
Daniel Stenberg [Thu, 24 Jul 2025 16:36:28 +0000 (18:36 +0200)] 
urlapi: allow more path characters "raw" when asked to URL encode

Setting the path component to contain the letters:

    ! $ & ' ( ) { } [ ] * + , ; = : @

now leaves them un-encoded when CURLU_URLENCODE is used.

Amended test 1560 to verify.

Reported-by: Jeroen Ooms
Fixes #17977

7 days agocurl_ngtcp2: extend callback tables for nghttp3 1.11.0 and ngtcp2 1.14.0
Viktor Szakats [Fri, 25 Jul 2025 14:40:26 +0000 (16:40 +0200)] 
curl_ngtcp2: extend callback tables for nghttp3 1.11.0 and ngtcp2 1.14.0

An emergency update to initialize callbacks to NULL.

May need further updates, e.g. to provide the recommended random
generator callback for nghttp3.

Fixing potential crashes at runtime in curl-for-win 8.15.0_3, and these
build warnings:
```
/home/appveyor/projects/curl-for-win/curl/lib/vquic/curl_ngtcp2.c:836:1:
warning: missing field 'begin_path_validation' initializer [-Wmissing-field-initializers]
  836 | };
      | ^
/home/appveyor/projects/curl-for-win/curl/lib/vquic/curl_ngtcp2.c:1186:1:
warning: missing field 'recv_origin' initializer [-Wmissing-field-initializers]
 1186 | };
      | ^
2 warnings generated.
```
Ref: https://ci.appveyor.com/project/curlorg/curl-for-win/builds/52462852#L14821

Also causing all `GHA/curl-for-win` jobs to fail:
https://github.com/curl/curl/actions/runs/16523625082?pr=18010

Ref: https://github.com/ngtcp2/nghttp3/releases/tag/v1.11.0
Ref: https://github.com/ngtcp2/ngtcp2/releases/tag/v1.14.0
Ref: https://github.com/curl/curl-for-win/commit/ff788c81e44f998d0d41f362d442a7e97cc0fd46

Closes #18019

7 days agotidy-up: more whitespace/indent, comments
Viktor Szakats [Mon, 14 Jul 2025 15:08:05 +0000 (17:08 +0200)] 
tidy-up: more whitespace/indent, comments

Also a couple of minor formatting updates in the root `CMakeLists.txt`.
One swap to `#ifdef`.

Closes #17929

7 days agoCODE_STYLE: sync with recent `checksrc.pl` updates
Viktor Szakats [Fri, 25 Jul 2025 00:41:21 +0000 (02:41 +0200)] 
CODE_STYLE: sync with recent `checksrc.pl` updates

Follow-up to ef2ccf862f8fbfe5cb86cb716aead57694a95ef5 #17840
Follow-up to f9656445ba275efca02994808f1a89cf055e5e44 #17764

Closes #18015

7 days agowindows: include `wincrypt.h` before `iphlpapi.h` for mingw-w64 <6
Viktor Szakats [Thu, 24 Jul 2025 12:44:03 +0000 (14:44 +0200)] 
windows: include `wincrypt.h` before `iphlpapi.h` for mingw-w64 <6

Required for mingw-w64 5.x (and older) builds targeting a Windows 7+.

mingw-w64 6+ fixed `mprapi.h` (included indirectly via `iphlpapi.h`)
to include `wincrypt.h` for the missing types.

MSVC is not affected because SDK 7.1a (the oldest MS SDK curl supports),
`mprapi.h` does include `wincrypt.h`.

Make sure to include `wincrypt.h` before including `iphlpapi.h` as
a workaround. `wincrypt.h` is used unconditionally even though it's
not available in UWP. This is safe in this context, because we use
`iphlpapi.h` for `if_nametoindex`, which is not supported and used
in UWP builds.

This fixes auto-detection that missed detecting `if_nametoindex` in
the affected combination, and this build error in non-unity builds:
```
In file included from D:/my-cache/mingw32/i686-w64-mingw32/include/iprtrmib.h:9:0,
                 from D:/my-cache/mingw32/i686-w64-mingw32/include/iphlpapi.h:17,
                 from D:/a/curl/curl/lib/url.c:63:
D:/my-cache/mingw32/i686-w64-mingw32/include/mprapi.h:865:3: error: unknown type name 'CERT_NAME_BLOB'
   CERT_NAME_BLOB *certificateNames;
   ^~~~~~~~~~~~~~
D:/my-cache/mingw32/i686-w64-mingw32/include/mprapi.h:887:3: error: unknown type name 'CRYPT_HASH_BLOB'
   CRYPT_HASH_BLOB certBlob;
   ^~~~~~~~~~~~~~~
```
Ref: https://github.com/curl/curl/actions/runs/16497057672/job/46645264552?pr=18012#step:10:140

This combination is not normally tested in CI. It was caught in
the `dl-mingw, CM 6.4.0-i686 schannel !unity Win7` job while working
on another PR.

Follow-up to 0d71b18153c8edb996738f8a362373fc72d0013b #17413
Ref: #18009
Closes #18012

7 days agocurl_setup.h: move UWP detection after `config-win32.h` (revert)
Viktor Szakats [Thu, 24 Jul 2025 19:05:26 +0000 (21:05 +0200)] 
curl_setup.h: move UWP detection after `config-win32.h` (revert)

This change wasn't good because `config-win32.h` does rely on the UWP
detection result to set `USE_WIN32_CRYPTO` and LDAP macros. While it
fixed one issue, it created another.

It seems better to revert, and focus on reducing and/or eventually
dropping the logic within `config-win32.h` that alters `_WIN32_WINNT`.
It may not be necessary anymore with a minimum of VS2008 (soon VS2010).
The logic is also absent from cmake builds, without causing issues.

Could affect UWP winbuild/project-file builds. These are theoretical
builds because neither build method is prepared to target UWP.

Reverts 792a61e2047782b85da0332cf298a747ce11e8e6 #17980
Ref: https://github.com/curl/curl/pull/17980#issuecomment-3114462492

Closes #18014

8 days agowindows: drop unused `curlx/version_win32.h` includes
Viktor Szakats [Thu, 24 Jul 2025 09:06:32 +0000 (11:06 +0200)] 
windows: drop unused `curlx/version_win32.h` includes

- lib/connect.c: unused since:
  71b7e0161032927cdfb4e75ea40f65b8898b3956 #10141

- lib/curl_sspi.c: unused since:
  0d71b18153c8edb996738f8a362373fc72d0013b #17413

Cherry-picked from #18009
Closes #18011

8 days agoRELEASE-NOTES: synced
Daniel Stenberg [Wed, 23 Jul 2025 21:14:21 +0000 (23:14 +0200)] 
RELEASE-NOTES: synced

8 days agohmac: return error if init fails
Daniel Stenberg [Wed, 23 Jul 2025 14:50:22 +0000 (16:50 +0200)] 
hmac: return error if init fails

They can actually happen in OOM situtations.

Reported-by: Philippe Antoine
Closes #18008

8 days agowindows: target version macro tidy-ups
Viktor Szakats [Sun, 20 Jul 2025 21:24:26 +0000 (23:24 +0200)] 
windows: target version macro tidy-ups

- autotools: stop checking for `WINVER` to detect thread-safety.
  To sync with implementation in `easy_lock.h` and with cmake.

- replace numeric version with `_WIN32_WINNT_VISTA`.

- `_WIN32_WINNT_VISTA` is always defined via `setup-win32.h`,
  don't check for it.

Closes #17981

8 days agotests: unset some envs instead of blanking them
Viktor Szakats [Tue, 22 Jul 2025 01:14:43 +0000 (03:14 +0200)] 
tests: unset some envs instead of blanking them

After 7cf8414fabc3063cc3d2121eacec4a6daa4164a8 #12862, `VAR=` no longer
removes the env variable, but sets it to an empty/blank value instead.
To remove an env, `VAR` shall be used (without the assigment operator.)

`SSL_CERT_FILE`, `CURL_HOME`, `HOME`, `XDG_CONFIG_HOME`, were added
before the change above. Make tests unset these envs again, as their
commit messages suggest, instead of blanking them. It does not change
the outcome of the tests.

Ref: 764e4f066d5719e68fa0d6b0b0d9efa0625c5c15 #8213
Ref: e992770e8d16e4be2a3da8aa2cef5cfc12e22372 #6600

Folllow-up to 7cf8414fabc3063cc3d2121eacec4a6daa4164a8 #12862
Cherry-picked from #17988
Closes #17994

8 days agotest428: re-enable for Windows
Viktor Szakats [Tue, 22 Jul 2025 00:54:46 +0000 (02:54 +0200)] 
test428: re-enable for Windows

The unexplained error in AppVeyor CI tests are not hit in CI after
moving those tests to GHA. Re-enable to run this test on Windows.

Revisit if the error is seen again on Windows.

Errors seen earlier in AppVeyor CI:
https://ci.appveyor.com/project/curlorg/curl/builds/49120834
https://ci.appveyor.com/project/curlorg/curl/builds/49123802 (with debug lines)

In these jobs:
CMake, VS2010, Debug, x64, no SSL, Static
CMake, mingw-w64, gcc 7, Debug, x64, Schannel, Static, Unicode
CMake, mingw-w64, gcc 9, Debug, x64, Schannel, Static, Unity
CMake, mingw-w64, gcc 6, Debug, x86, Schannel, Static

Test log from the 'gcc 9` job above (with debug lines):
```
 test 0428...[Expand environment variables within config file]

  428: protocol FAILED!
  There was no content at all in the file log/server.input.
  Server glitch? Total curl failure? Returned: 26
 == Contents of files in the log/ dir after test 428
 === Start of file cmd
  --variable %FUNVALUE
  --variable %VALUE2
  --variable %BLANK
  --variable %curl_NOT_SET=default
  --expand-data 1{{FUNVALUE}}2{{VALUE2}}3{{curl_NOT_SET}}4{{BLANK}}5\{{verbatim}}6{{not.good}}7{{}}
 === End of file cmd
 === Start of file commands.log
  ../src/curl.exe --output log/curl428.out  --include --trace-ascii log/trace428 --trace-time http://127.0.0.1:1593/428 -K log/cmd > log/stdout428 2> log/stderr428
 === End of file commands.log
 === Start of file server.cmd
  Testnum 428
 === End of file server.cmd
 === Start of file stderr428
  getenv of 'FUNVALUE' returned 0xee65d2
  getenv of 'VALUE2' returned 0xee7a42
  getenv of 'BLANK' returned (nil)
  curl: Variable 'BLANK' import fail, not set
  curl: log/cmd:3: '--variable' variable expansion failure
  curl: cannot read config from 'log/cmd'
  curl: option -K: error encountered when reading a file
  curl: try 'curl --help' for more information
 === End of file stderr428
```

Env comparison:
Fail: https://ci.appveyor.com/project/curlorg/curl/builds/49123802/job/2a4w7i21npys9pd3
```
-- curl version=[8.6.1-DEV]
-- The C compiler identification is GNU 9.1.0
-- Found Perl: C:/msys64/usr/bin/perl.exe (found version "5.30.0").
-- Found _WIN32_WINNT=0x0601
* curl 8.6.1-DEV (Windows).
* libcurl/8.6.1-DEV Schannel zlib/1.2.11
* Features: alt-svc AsynchDNS Debug HSTS HTTPS-proxy IPv6 Kerberos Largefile libz NTLM SPNEGO SSL SSPI threadsafe TrackMemory UnixSockets
* Disabled: xattr
* System: MSYS_NT-10.0-14393 APPVYR-WIN 3.0.7-338.x86_64 2019-07-11 10:58 UTC x86_64 Msys
```

OK (this PR): https://github.com/curl/curl/actions/runs/16439564668/job/46456976494
```
-- curl version=[8.15.1-DEV]
-- The C compiler identification is GNU 9.5.0
-- Found Perl: C:/msys64/usr/bin/perl.exe (found version "5.38.4")
-- Found _WIN32_WINNT=0x0601
* curl 8.15.1-DEV (Windows).
* libcurl/8.15.1-DEV Schannel libpsl/0.21.5
* Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns ldap ldaps mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet tftp ws wss
* Features: alt-svc AsynchDNS Debug HSTS HTTPS-proxy IPv6 Kerberos Largefile NTLM PSL SPNEGO SSL SSPI threadsafe TrackMemory UnixSockets
* Disabled: xattr, win32-ca-search-safe, override-dns
* System: MINGW64_NT-10.0-20348 runnervm51nrn 3.6.3-ab81aae6.x86_64 2025-07-01 18:20 UTC x86_64 Msys
```

Follow-up to 7cf8414fabc3063cc3d2121eacec4a6daa4164a8
Ref: https://github.com/curl/curl/pull/12862#issuecomment-1929548070
Ref: 0f0edc283c340e8ddddc763b48d2f835b2270ab4 #12862

Closes #17991

8 days agotests: fix UTF-8 detection, per-test `LC_*` settings, CI coverage
Viktor Szakats [Wed, 16 Jul 2025 02:25:08 +0000 (04:25 +0200)] 
tests: fix UTF-8 detection, per-test `LC_*` settings, CI coverage

- runtests: fix `codeset-utf8` feature detection. Before this patch it
  detected if the calling environment had UTF-8 enabled. If not, UTF-8
  tests were all skipped. After this patch, it detects if UTF-8 is
  supported by the calling environment regardless of what's currently
  enabled.
  Follow-up to 0b70b23ef4d007031bc2ae4fc63d5ed9136bc2b5 #15039

- GHA/linux: sync `codeset-test` to also reset `LC_CTYPE` and
  `LC_NUMBER`. To give it more spin.
  Follow-up to c221c0ee5935497168c52686a9d8cc87b45bbca9 #17938

- GHA/macos: fix to actually enable `codeset-test`. Also set `LC_ALL`,
  which seems necessary to trigger issues.
  Follow-up to c221c0ee5935497168c52686a9d8cc87b45bbca9 #17938

- tests/data: replace `LC_CTYPE` env with `LC_ALL` in all tests
  requiring a locale. Also to avoid potential issues with a blank or
  unset `LC_ALL`, as seen earlier. And to ensure that the override works
  on all platforms (as tested in CI.)
  Slight downside is that this now resets the language/culture to `C`.
  Ref: b4c9982382469398115cc0e3e0747e79db083455 #4743
  Ref: 23208e330ac0c2164d59971baf79e87c45da1840 #4738

- replace `en_US.UTF-8` with `C.UTF-8` to be language/culture-agnostic.

- TEST-SUITE.md: drop `UTF-8` as a requirement for tests.
  Tests shall work (or least be skipped) without UTF-8 support.

Tests requiring UTF-8 locale:
165, 962, 963, 964, 965, 966, 967, 1448, 1560, 2046, 2047
Tests requiring UTF-8 locale, but passing without one anyway:
955, 956, 957, 958, 959, 960, 961, 968, 1034, 1035

Spec 1997: https://pubs.opengroup.org/onlinepubs/7908799/xbd/envvar.html
Spec 2008: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html

Ref: c221c0ee5935497168c52686a9d8cc87b45bbca9 #17938
Ref: 7cf8414fabc3063cc3d2121eacec4a6daa4164a8
Ref: 4c140a56283703161e5f26ae022bad694a481603
Ref: 28faaacee287b019bcf2961da3bf2f91d331bcbd #2436
Ref: ecd1d020abdae3c3ce3643ddab3106501e62e7c0

Closes #17988

8 days agobuild: fix build errors/warnings in rare configurations
Viktor Szakats [Fri, 18 Jul 2025 16:17:06 +0000 (18:17 +0200)] 
build: fix build errors/warnings in rare configurations

- vtls: fix unused variable and symbols.
- ftp: fix unused variable.
- http: fix unused variables.
- smtp: fix unsued variable.
- wolfssl: fix unused variable with !proxy.
- libssh: fix unused argument.
- curl_trc: sync guards between declaration and definition.
- curl_trc: add missing guard for `Curl_trc_ssls` when !verbose.
- curl_trc: fix errors with !http + http3.
- curl_trc: fix missing function with !http + nghttp2.
- cf-h2-proxy: disable when !http + nghttp2, to avoid calling undeclared
  functions.
- sha256: fix missing declaration in rare configs.
- md4: fix symbol conflict when building GnuTLS together with AWS-LC or
  wolfSSL. By prioritizing the latter two. AWS-LC has no option
  to disable the clashing symbol. wolfSSL does, but the most seamless is
  to skip including GnuTLS's standalone `md4.h` to avoid the clash.
- build: fix errors with !http + nghttp2.
- build: catch !ssl + ssls-export combination in source. Convert
  build-level errors to warnings.
- build: fix errors with !http + http3.
- build: fix building curl tool and unit1302 in rare combinations.
  By always compiling base64 curlx functions.

- cmake: add `_CURL_SKIP_BUILD_CERTS` internal option.
  To disable automatically building certs with the testdeps target.
  To improve performance when testing builds.
  (used locally to find the failing builds fixed in this PR.)

Closes #17962

8 days agoCI: update glibc in linux-old build 18007/head
Dan Fandrich [Wed, 23 Jul 2025 18:24:07 +0000 (11:24 -0700)] 
CI: update glibc in linux-old build

Also, change the host because Debian itself is no longer hosting Buster
packages.

Reported-by: nevakrien on Github
Ref: #17997
Closes #18007

8 days agocmake: fix to disable Schannel and SSPI for non-Windows targets
Viktor Szakats [Fri, 18 Jul 2025 21:43:32 +0000 (23:43 +0200)] 
cmake: fix to disable Schannel and SSPI for non-Windows targets

Fixing:
```
In file included from lib/vtls/vtls.c:50:
In file included from lib/vtls/../urldata.h:314:
lib/vtls/../curl_sspi.h:41:10: fatal error: 'security.h' file not found
   41 | #include <security.h>
      |          ^~~~~~~~~~~~
1 error generated.

lib/curl_sspi.h:41:10: fatal error: 'security.h' file not found
   41 | #include <security.h>
      |          ^~~~~~~~~~~~
1 error generated.
```

Cherry-picked from #17988

8 days agocmake: fix `ENABLE_UNIX_SOCKETS=OFF` with pre-fill enabled on unix
Viktor Szakats [Sat, 19 Jul 2025 22:16:09 +0000 (00:16 +0200)] 
cmake: fix `ENABLE_UNIX_SOCKETS=OFF` with pre-fill enabled on unix

Cherry-picked from #17988

8 days agocmake: keep websockets disabled if HTTP is disabled
Viktor Szakats [Sat, 19 Jul 2025 21:46:01 +0000 (23:46 +0200)] 
cmake: keep websockets disabled if HTTP is disabled

Syncing with autotools, and fixing the `Protocols:` verifier test.

Cherry-picked from #17988

8 days agocmake: capitalize 'Rustls' in the config summary
Viktor Szakats [Sun, 20 Jul 2025 00:38:02 +0000 (02:38 +0200)] 
cmake: capitalize 'Rustls' in the config summary

Cherry-picked from #17988

9 days agopytest: add SOCKS tests and scoring
Stefan Eissing [Mon, 21 Jul 2025 10:23:06 +0000 (12:23 +0200)] 
pytest: add SOCKS tests and scoring

Configure curl with `--with-test-sockd=<path to sockd>` for a locally
installed dante sockd server and new `test_40_*` will verify that
down- and uploads work via SOCKS.

Invoke scorecard.py with `--socks4` or `--socks5` to run performance
tests with SOCKS. Note that SOCKS is not supported for HTTP/3.

Ref: #17969
Closes #17986

9 days agohttp: const up readonly H2_NON_FIELD
Caolán McNamara [Tue, 22 Jul 2025 13:48:26 +0000 (14:48 +0100)] 
http: const up readonly H2_NON_FIELD

Closes #17996

9 days agotest1: raise alloc limits
Stefan Eissing [Wed, 23 Jul 2025 07:41:23 +0000 (09:41 +0200)] 
test1: raise alloc limits

After failures on certain build/platform combinations.

See: https://github.com/curl/curl/actions/runs/16464320627/job/46537983882?pr=17992

Closes #18004

9 days agodocs: fix name in curl_easy_ssls_export man page
Stefan Eissing [Tue, 22 Jul 2025 11:10:13 +0000 (13:10 +0200)] 
docs: fix name in curl_easy_ssls_export man page

The name of the man page was wrongly given as curl_easy_sssl_export
which seems to have confused our HTTML man page generation.

Reported-by: Qriist on github
Ref: https://github.com/curl/curl-www/issues/458

Closes #17995

9 days agotest1148: drop redundant `LC_NUMBER=` env setting
Viktor Szakats [Tue, 22 Jul 2025 10:19:22 +0000 (12:19 +0200)] 
test1148: drop redundant `LC_NUMBER=` env setting

No longer necessary after a previous change made sure to strip
the '100.0%' number from the result, before checking it. The dot is
a regex character catching any decimal separator.

Follow-up to 17c18fbc3015b5dc0580d16a4ff5bcf2fd88b449 #5194
Ref: #2436
Cherry-picked from #17988
Closes #17993

9 days agoGHA/non-native: FreeBSD 14.3
Viktor Szakats [Tue, 22 Jul 2025 17:48:38 +0000 (19:48 +0200)] 
GHA/non-native: FreeBSD 14.3

Follow-up to f097eaea183e7c1f7c8f765f3074e725e58bb652 #18000
Closes #18001

9 days agoGHA: update cross-platform-actions/action action to v0.29.0
renovate[bot] [Tue, 22 Jul 2025 15:18:21 +0000 (15:18 +0000)] 
GHA: update cross-platform-actions/action action to v0.29.0

Closes #18000

9 days agoGHA: update debian:bookworm-slim Docker digest to 2424c18
renovate[bot] [Tue, 22 Jul 2025 15:18:15 +0000 (15:18 +0000)] 
GHA: update debian:bookworm-slim Docker digest to 2424c18

Closes #17999

10 days agolib1560: fix memory leak when run without UTF-8 support
Viktor Szakats [Tue, 22 Jul 2025 14:44:45 +0000 (16:44 +0200)] 
lib1560: fix memory leak when run without UTF-8 support

The issue is missed in CI, because valgrind jobs all run with UTF-8
support.

Fixing:
```
test 1560...[URL API]
 valgrind ERROR ==13362== 104 bytes in 1 blocks are definitely lost in loss record 1 of 1
==13362==    at 0x484D953: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==13362==    by 0x48E1302: curl_dbg_calloc (in /curl/bld/lib/libcurl.so.4.8.0)
==13362==    by 0x4931D12: curl_url (in /curl/bld/lib/libcurl.so.4.8.0)
==13362==    by 0x14F658: get_parts (in /curl/bld/tests/libtest/libtests)
==13362==    by 0x150AC6: test_lib1560 (in /curl/bld/tests/libtest/libtests)
==13362==    by 0x17F5D5: main (in /curl/bld/tests/libtest/libtests)
```
Ref: https://github.com/curl/curl/actions/runs/16446352985/job/46479298080?pr=17988#step:41:3007

Follow-up to 7d1ca2e7e1a3b9d3ba70f587f6bc5e83f905afd5 #17933

Closes #17998

11 days agocurl: tool_read_cb fix of segfault
Stefan Eissing [Mon, 21 Jul 2025 13:56:19 +0000 (15:56 +0200)] 
curl: tool_read_cb fix of segfault

When transfers read client input without an upload file, the check if
upload file is '.' strcompared a NULL.

Add test 1548 to reproduce and verify fix.

Reported-by: d1r3ct0r
Fixes #17978
Closes #17987

11 days agotest1560: set locale/codeset with `LC_ALL` (was: `LANG`), test in CI
Viktor Szakats [Tue, 15 Jul 2025 19:37:51 +0000 (21:37 +0200)] 
test1560: set locale/codeset with `LC_ALL` (was: `LANG`), test in CI

To fix running test 1560 when `LC_ALL` is set to something unexpected
(e.g. `C`). Also syncing it with the rest of tests.

Also:
- GHA/linux: enable `libidn2` in more jobs.
  Also to enable test 1560 reproducing this issue in more jobs.
- GHA/linux: run tests with `LC_ALL=C` in one of the jobs.
- GHA/linux: switch to the non-deprecated package name for libidn2.
- GHA/macos: run tests with non-default locale settings in one job.
- GHA/macos: enable AppleIDN in that job.

Ref: https://github.com/curl/curl/pull/17933#issuecomment-3074582840
Follow-up to f27262b17965aefa7c6bf41bd40b01b4f97407bd #10196

Closes #17938

11 days agotidy-up: `Curl_thread_create()` callback return type
Viktor Szakats [Thu, 10 Jul 2025 15:59:59 +0000 (17:59 +0200)] 
tidy-up: `Curl_thread_create()` callback return type

Replace repeat `#ifdef` code with a macro for the return type of
the thread function.

Also:
- always define `CURL_STDCALL`, allowing to use it without guards.
- lib1307: drop single-use macro `CAINFO`.

Closes #17889

11 days agocurl_fnmatch, servers: drop local macros in favour of `sizeof()`
Viktor Szakats [Fri, 11 Jul 2025 11:48:13 +0000 (13:48 +0200)] 
curl_fnmatch, servers: drop local macros in favour of `sizeof()`

Closes #17898

11 days agoGHA/checksrc: expand spellcheck, fix issues found
Viktor Szakats [Fri, 11 Jul 2025 19:50:23 +0000 (21:50 +0200)] 
GHA/checksrc: expand spellcheck, fix issues found

- codespell: break logic out into its own runnable script. Allowing
  to run it on local machines.
- codespell: install via `pip`, bump to latest version.
- codespell: show version number in CI log.
- codespell: drop no longer needed word exception: `msdos`.
- codespell: include all curl source tree, except `packages` and
  `winbuild`. Drop an obsolete file exclusion.
- add new spellchecker job using the `typos` tool. It includes
  the codespell dictionary and a couple more. Use linuxbrew to install
  it. This takes 10 seconds, while installing via `cargo` from source
  would take over a minute.
- codespell: introduce an inline ignore filter compatible with `cspell`
  Make `typos` recognize it, too. Move single exceptions inline.

Fix new typos found. Also rename variables and words to keep
spellchecking exceptions at minumum. This involves touching some tests.
Also switch base64 strings to `%b64[]` to avoid false positives.

Ref: https://github.com/crate-ci/typos/blob/master/docs/reference.md
Ref: https://github.com/codespell-project/codespell?tab=readme-ov-file#inline-ignore
Ref: https://github.com/codespell-project/codespell/issues/1212#issuecomment-1721152455
Ref: https://cspell.org/docs/Configuration/document-settings

Closes #17905

11 days agocurl_setup.h: move UWP detection after `config-win32.h`
Viktor Szakats [Sun, 20 Jul 2025 20:52:31 +0000 (22:52 +0200)] 
curl_setup.h: move UWP detection after `config-win32.h`

To honor a `_WIN32_WINNT` set by `config-win32.h`.

Closes #17980

11 days agowindows: fix `if_nametoindex()` detection with autotools, improve with cmake
Viktor Szakats [Sun, 20 Jul 2025 23:57:26 +0000 (01:57 +0200)] 
windows: fix `if_nametoindex()` detection with autotools, improve with cmake

- autotools: fix auto-detection on the Windows platform.
  It was mis-detected when targeting Windows XP/2003 64-bit.
  It was permanently undetected when building for Windows 32-bit.
  ```
  lib/url.c: In function 'zonefrom_url':
  lib/url.c:1802:18: error: implicit declaration of function 'if_nametoindex' [-Wimplicit-function-declaration]
   1802 |       scopeidx = if_nametoindex(zoneid);
        |                  ^~~~~~~~~~~~~~
  lib/url.c:1802:18: error: nested extern declaration of 'if_nametoindex' [-Werror=nested-externs]
  ```
  Ref: https://github.com/curl/curl/actions/runs/16405598782/job/46351023138?pr=17982#step:10:29

Reported-by: LoRd_MuldeR
  Fixes #17979

  Without this patch the workaround for the 8.15.0 release is:
  `export ac_cv_func_if_nametoindex=0` for Windows XP/2003 64-bit.

  Background: Checking for the `if_nametoindex()` function via
  `AC_CHECK_FUNCS()` (autotools) or `check_function_exists()` (cmake) do
  not work on Windows, for two reasons:
  - the function may be disabled at compile-time in Windows headers
    when targeting old Windows versions (XP or WS2003 in curl context)
    via `_WIN32_WINNT`. But it's always present in the system implib
    `iphlpapi` where these checks are looking.
  - for 32-bit Windows the function signature in the implib requires
    a 4-byte argument, while these checks always use no arguments,
    making them always fail.

- cmake: call `if_nametoindex` dynamically with mingw-w64 v1.0.
  This mingw-w64 version lacks prototype and implib entry for it.

- cmake: add auto-detection for Windows and use as a fallback for
  non-pre-fill cases.

- cmake: disable pre-fill with `_CURL_PREFILL=OFF`. (for testing)

- cmake: disable pre-fill for untested compilers. (i.e. non-MSVC,
  non-mingw64)

- GHA/windows: make an autotools job build for Windows XP.

Follow-up to 0d71b18153c8edb996738f8a362373fc72d0013b #17413

Closes #17982

11 days agomulti event: remove only announced
Stefan Eissing [Thu, 17 Jul 2025 11:31:44 +0000 (13:31 +0200)] 
multi event: remove only announced

When a socket is closed, only inform the application
socket callback about it if the socket had been announced
before to the callback.

Reported-by: yaoy6 on github
Fixes #17949
Closes #17950

11 days agopytest: increase server KeepAliveTimeout
Stefan Eissing [Sat, 19 Jul 2025 11:37:54 +0000 (13:37 +0200)] 
pytest: increase server KeepAliveTimeout

When CI is not able to give clients enough cpu, the default Apache
KeepAliveTimeout of 5 seconds may trigger and cause tests to fail.

Increase the timeout to 30 seconds for reliability.

Ref: #17963
Closes #17968

11 days agobuild: enable _GNU_SOURCE on GNU/Hurd
Pino Toscano [Sun, 20 Jul 2025 07:24:37 +0000 (09:24 +0200)] 
build: enable _GNU_SOURCE on GNU/Hurd

Unconditionally enable _GNU_SOURCE when building on GNU/Hurd; this way
it is possible to properly use/rely on GNU extensions e.g. accept4(),
memrchr(), and the GNU strerror_r().

Closes #17975

11 days agoeasy handle: check validity on external calls
Stefan Eissing [Fri, 18 Jul 2025 07:15:00 +0000 (09:15 +0200)] 
easy handle: check validity on external calls

In each external API function passing a `CURL *` into the library, check
`GOOD_EASY_HANDLE()` if its magic is still there.

Ref: #17957
Closes #17958

11 days agovquic-tls: fix SSL backend type for QUIC connections using gnutls
Stefan Eissing [Sun, 20 Jul 2025 07:46:46 +0000 (09:46 +0200)] 
vquic-tls: fix SSL backend type for QUIC connections using gnutls

Fix the copy&paste error when querying ssl info for gnutls
on QUIC connections.

Reported-by: Harry Sintonen
Closes #17976

12 days agomultissl: initialize when requesting a random number
Viktor Szakats [Sat, 19 Jul 2025 13:21:31 +0000 (15:21 +0200)] 
multissl: initialize when requesting a random number

To fix test 1308 in MultiSSL builds.

Failure was caused by the random number generator virtual function being
NULL, instead of pointing to the implementation in the runtime-selected
TLS backend. This could happen in MultiSSL builds when a functionality
was asking for a random number without triggering a VTLS function table
initialization first. Such functionality is MIME, or form data via MIME.

The reason CI did not catch it in an earlier MultiSSL GHA/windows job,
is that it was a debug-enabled one. In debug-enabled builds the test
runner was overriding the random number generator for all tests.

Fixed this by moving the override to the tests requiring it, via
1fcf22585fa3d87a50c9dddc688d962978c0c120 #17971, enabling debug builds
to catch this issue.

Enable MultiSSL in two CI jobs, to verify this patch.

Fixing:
```
test 1308...[formpost tests]

libtests returned 44, when expecting 0
 1308: exit FAILED
[...]
=== Start of file stderr1308
 URL: log/3/test-1308
 tests/libtest/lib1308.c:70 Assertion 'res == 0' FAILED: curl_formget returned error
 tests/libtest/lib1308.c:72 Assertion 'total_size == 518' FAILED: curl_formget got wrong size back
 tests/libtest/lib1308.c:88 Assertion 'res == 0' FAILED: curl_formget returned error
 tests/libtest/lib1308.c:89 Assertion 'total_size == 899' FAILED: curl_formget got wrong size back
```
Ref: https://github.com/curl/curl/actions/runs/16387693424/job/46309536359?pr=17963#step:16:2515

Bug: https://github.com/curl/curl/pull/17963#issuecomment-3092282057

Closes #17970

12 days agoGHA/macos: drop redundant build option
Viktor Szakats [Sun, 20 Jul 2025 09:20:56 +0000 (11:20 +0200)] 
GHA/macos: drop redundant build option

Follow-up to 7c23e88d17e0939b4e01c8d05f430e167e148f4b #17973

12 days agoGHA/macos: enable QUIC API with OpenSSL
Viktor Szakats [Sat, 19 Jul 2025 20:53:08 +0000 (22:53 +0200)] 
GHA/macos: enable QUIC API with OpenSSL

In one autotools and one cmake job.

Also:
- enable OpenSSL QUIC in two more jobs.
- pytest: add checks to skip h3 tests when there is no h3 server to
  tests 26, 27a, 27b, 27c, 29 in test_02_download. Fixing:
  ```
  FAILED tests/http/test_02_download.py::TestDownload::test_02_26_session_shared_reuse[h3] - AssertionError: expected exit code 0, got 1
  [...]
  ```
  Ref: https://github.com/curl/curl/actions/runs/16392680316/job/46320739635?pr=17973

Ref: https://github.com/Homebrew/homebrew-core/pull/230515
Ref: https://github.com/Homebrew/homebrew-core/commit/6c8e3eed129ed362da8b97b94f1a5372b2289e09

Closes #17973

12 days agocmake: make `runtests` targets build the curl tool
Viktor Szakats [Sat, 19 Jul 2025 11:28:48 +0000 (13:28 +0200)] 
cmake: make `runtests` targets build the curl tool

To allow running tests just by building the `test-full` (or similar) in
a single step.

Closes #17967

12 days agoGHA/macos: add Rustls, aws-lc jobs
Viktor Szakats [Fri, 18 Jul 2025 21:09:15 +0000 (23:09 +0200)] 
GHA/macos: add Rustls, aws-lc jobs

Bind them to the (arbitrary choice of) Apple clang and gcc compilers,
respectively.

Also:
- bind existing mbedTLS job to the llvm compiler, to keep the number of
  jobs the same as before this patch.
- move OpenLDAP from mbedTLS over to LibreSSL to keep testing it with
  all 3 compilers.
- simplify exclusions for clang-tidy and torture jobs.
- tag clang-tidy and torture jobs via `install_steps`.
  To avoid keeping around special bool fields.

Closes #17963

12 days agotest1560: skip some URLs if UTF-8 is not supported
Sergio Durigan Junior [Thu, 17 Jul 2025 09:38:10 +0000 (05:38 -0400)] 
test1560: skip some URLs if UTF-8 is not supported

Debian CI found that `lib1560` implements tests that will fail when
UTF-8 isn't supported.  We can detect that with `nl_langinfo` and skip
the specific URLs that fail (i.e., those whose `getflags` are either
`CURLU_PUNYCODE` or `CURLU_PUNY2IDN`).

Co-authored-by: Viktor Szakats
Closes #17933

12 days agotests: set `CURL_ENTROPY` per test, not globally
Viktor Szakats [Sat, 19 Jul 2025 16:45:25 +0000 (18:45 +0200)] 
tests: set `CURL_ENTROPY` per test, not globally

Setting `CURL_ENTROPY` in debug-enabled builds overrides the code paths
responsible for random number generation. To avoid masking issue there,
this patch moves `CURL_ENTROPY` settings to each test that requires it,
and stop setting it by default for all tests (in `runner.pm`).

This makes it possible to catch random generator issues in debug-enabled
builds; extending test coverage.

To keep offering a well-defined state for tests, make `runner.pm` delete
the `CURL_ENTROPY` env, if present.

Ref: #17970

Closes #17971

12 days agotests: drop unused `CURL_FORCEHOST` envs
Viktor Szakats [Sat, 19 Jul 2025 17:47:36 +0000 (19:47 +0200)] 
tests: drop unused `CURL_FORCEHOST` envs

Also match case of the `Debug` feature name in comments.

Closes #17972

2 weeks agoGHA: update dependency wolfSSL/wolfssl to v5.8.2
renovate[bot] [Thu, 17 Jul 2025 22:33:11 +0000 (22:33 +0000)] 
GHA: update dependency wolfSSL/wolfssl to v5.8.2

Closes #17956

2 weeks agocurl/system.h: fix for GCC 3.3.x and older
Viktor Szakats [Thu, 17 Jul 2025 16:13:37 +0000 (18:13 +0200)] 
curl/system.h: fix for GCC 3.3.x and older

The guards implicitly and intentionally include clang, which reports
itself as GCC 4.2.1.

Ref: https://gcc.gnu.org/onlinedocs/gcc-3.4.6/gcc/Other-Builtins.html#Other-Builtins
Ref: https://www.haiku-os.org/guides/building/gcc-hybrid (Haiku uses gcc 2.95.3)

Follow-up to 909af1a43b5a7fed8b5a4ca145e39f46b2f50325 #16761

Reported-by: Schrijvers Luc
Fixes #17951
Closes #17954

2 weeks agoDISTROS.md: add Haiku
Viktor Szakats [Thu, 17 Jul 2025 15:32:37 +0000 (17:32 +0200)] 
DISTROS.md: add Haiku

Closes #17953

2 weeks agobuild: link to Apple frameworks required by static wolfSSL
Viktor Szakats [Wed, 16 Jul 2025 21:44:13 +0000 (23:44 +0200)] 
build: link to Apple frameworks required by static wolfSSL

To fix linking a static wolfSSL library for Apple targets.
Also stop linking `m` and `dl` on Apple platforms.

Matching logic in wolfSSL build code:
https://github.com/wolfSSL/wolfssl/blob/8bde512676fd425d72682fa020362eb9916476ad/CMakeLists.txt#L2520-L2544

Reported-by: Kai Pastor
Reported-by: Tal Regev
Bug: https://github.com/microsoft/vcpkg/pull/46444#pullrequestreview-3026575393
Ref: https://github.com/microsoft/vcpkg/pull/46444/commits/3a845c4b15066e8167bb4708007180fb6bedf40d

Closes #17945

2 weeks agognutls: some small cleanups
Stefan Eissing [Wed, 16 Jul 2025 10:22:30 +0000 (12:22 +0200)] 
gnutls: some small cleanups

- de-complex Curl_gtls_verifyserver() by splitting of static
  functions for parts of it.
- follow the `goto out` style with common deallocation code

Closes #17941

2 weeks agoopenssl: some small cleanups
Stefan Eissing [Wed, 16 Jul 2025 09:10:13 +0000 (11:10 +0200)] 
openssl: some small cleanups

- rename Curl_oss_check_peer_cert() to Curl_ossl_check_peer_cert()
- leave altname match loop after the first success when the match
  was an ip address
- remove static subj_alt_hostcheck() since it did not really do much
- use length based infof() output of altname, even though it does
  seem always to be nul terminated

Closes #17940

2 weeks agosocks: do_SOCKS5: Fix invalid buffer content on short send
Ammar Faizi [Wed, 16 Jul 2025 13:22:43 +0000 (20:22 +0700)] 
socks: do_SOCKS5: Fix invalid buffer content on short send

Ahmad Gani intercepts the sendto syscall to simulate short send, but
curl incorrectly handles it. It keeps resending the version:

  sendto(4, "\x05", 1, MSG_NOSIGNAL, NULL, 0) = 1
  sendto(4, "\x05", 1, MSG_NOSIGNAL, NULL, 0) = 1

Don't restart the buffer in the `CONNECT_SOCKS_INIT` case if
`sx->outstanding` is not zero. It should continue sending the
advanced buffer.

Fixes #17942
Reported-by: Ahmad Gani <reyuki@gnuweeb.org>
Signed-off-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>
Closes #17943

2 weeks agocurlver: bump to 8.15.1 (for now?)
Daniel Stenberg [Thu, 17 Jul 2025 22:37:51 +0000 (00:37 +0200)] 
curlver: bump to 8.15.1 (for now?)

2 weeks agoRELEASE-NOTES: synced
Daniel Stenberg [Thu, 17 Jul 2025 22:36:15 +0000 (00:36 +0200)] 
RELEASE-NOTES: synced

And bump version

2 weeks agotool_operate: avoid superfluous strdup'ing output
Daniel Stenberg [Wed, 16 Jul 2025 22:06:55 +0000 (00:06 +0200)] 
tool_operate: avoid superfluous strdup'ing output

Closes #17946

2 weeks agoRELEASE-NOTES: synced curl-8_15_0
Daniel Stenberg [Wed, 16 Jul 2025 06:19:39 +0000 (08:19 +0200)] 
RELEASE-NOTES: synced

8.15.0 release

2 weeks agoTHANKS: new contributors in 8.15.0
Daniel Stenberg [Wed, 16 Jul 2025 06:19:39 +0000 (08:19 +0200)] 
THANKS: new contributors in 8.15.0

2 weeks agoautotools: stop checking for the `pw32` platform
Viktor Szakats [Tue, 15 Jul 2025 15:41:52 +0000 (17:41 +0200)] 
autotools: stop checking for the `pw32` platform

It's most likely a reference to Posix-over-Win32 layer:

https://pw32.sourceforge.net/main.html (last updated: 2001-05-01)
https://sourceforge.net/projects/pw32/
https://sourceforge.net/projects/pw32/files/ (latest date: 2001-10-12)

Closes #17936

2 weeks agorelease-notes.pl: ignore dupes on input and output
Daniel Stenberg [Tue, 15 Jul 2025 15:43:57 +0000 (17:43 +0200)] 
release-notes.pl: ignore dupes on input and output

Re-running this script now makes it track the already mentioned
changelog entries and not add them again even if the git log contains
them.

This makes the script better handle reruns in a release branch after
rebasing on a later version of master.

Closes #17937

2 weeks agoci: consolidate openldap step into openssl krb5
Max Dymond [Tue, 15 Jul 2025 11:27:53 +0000 (12:27 +0100)] 
ci: consolidate openldap step into openssl krb5

Closes #17891

2 weeks agoci: fix ldap install location and add renovate rule for openldap
Max Dymond [Sat, 12 Jul 2025 16:04:43 +0000 (17:04 +0100)] 
ci: fix ldap install location and add renovate rule for openldap

2 weeks agoci: install libssl-dev in the openldap static test
Max Dymond [Thu, 10 Jul 2025 19:49:29 +0000 (20:49 +0100)] 
ci: install libssl-dev in the openldap static test

2 weeks agoconfigure: order LDAP after the SSL libraries
Max Dymond [Thu, 10 Jul 2025 19:39:55 +0000 (20:39 +0100)] 
configure: order LDAP after the SSL libraries

2 weeks agoldap: If ldap-lib is sufficient, add it to LIBS.
Max Dymond [Thu, 10 Jul 2025 19:34:17 +0000 (20:34 +0100)] 
ldap: If ldap-lib is sufficient, add it to LIBS.

2 weeks agoldap: avoid automake caching issues with LDAP library names
Max Dymond [Thu, 10 Jul 2025 19:15:03 +0000 (20:15 +0100)] 
ldap: avoid automake caching issues with LDAP library names

2 weeks agotest: add a test for static LDAP
Max Dymond [Thu, 10 Jul 2025 18:43:06 +0000 (19:43 +0100)] 
test: add a test for static LDAP

2 weeks agoldap: initial support for --with-ldap option
Max Dymond [Thu, 10 Jul 2025 18:31:15 +0000 (19:31 +0100)] 
ldap: initial support for --with-ldap option

Add the --with-ldap option so we can specify an include and library path for LDAP.

2 weeks agoDEPRECATE.md: add VS2005 removal to the list
Viktor Szakats [Tue, 15 Jul 2025 12:53:16 +0000 (14:53 +0200)] 
DEPRECATE.md: add VS2005 removal to the list

Follow-up to e0fd5790d94feb239f7d2457578f2a34c85cdd65 #16004

Closes #17934

2 weeks agotest3207: allow more allocations
Daniel Stenberg [Tue, 15 Jul 2025 11:39:49 +0000 (13:39 +0200)] 
test3207: allow more allocations

This limit was triggered in a PR that did not change any sizes, showing
the previous limit for this was a little tight.

Ref: #17894
Closes #17932

2 weeks agoconfig-win32: fix to set target version early
Viktor Szakats [Tue, 15 Jul 2025 08:56:28 +0000 (10:56 +0200)] 
config-win32: fix to set target version early

To set it before checking for it while enabling `HAVE_INET_NTOP` and
`HAVE_INET_PTON` for Vista (and up) targets.

May have affected winbuild or Visual Studio IDE Project Files.

Follow-up to 68fa9bf3f5d7b4fcbb57619f70cb4aabb79a51f6 #9712

Closes #17928

2 weeks agotest1706: pass include directory to `managen` for out-of-tree builds
Viktor Szakats [Fri, 11 Jul 2025 16:02:32 +0000 (18:02 +0200)] 
test1706: pass include directory to `managen` for out-of-tree builds

Fixing:
```
readline() on closed filehandle INC at ../../curl-99.98.97/tests/../scripts/managen line 1299.
```
Ref: https://github.com/curl/curl/actions/runs/16224106087/job/45811979199?pr=17877#step:3:8545

Cherry-picked from #17877
Closes #17926

2 weeks agogenserv.pl: fix newline in usage text
Viktor Szakats [Wed, 9 Jul 2025 20:21:29 +0000 (22:21 +0200)] 
genserv.pl: fix newline in usage text

Cherry-picked from #17877

2 weeks agotidy-up: whitespace/indent
Viktor Szakats [Mon, 14 Jul 2025 11:48:52 +0000 (13:48 +0200)] 
tidy-up: whitespace/indent

Closes #17925

2 weeks agoconnection: clarify `transport`
Stefan Eissing [Mon, 14 Jul 2025 09:41:59 +0000 (11:41 +0200)] 
connection: clarify `transport`

The `transport` to use for a transfer, e.g. TCP/QUIC/UNIX/UDP, is
initially selected by options and protocol used. This is set at the
`struct connectdata` as `transport` member.

During connection establishment, this transport may change due to
Alt-Svc or Happy-Eyeballing. Most common is the switch from TCP to QUIC.

Rename the connection member to `transport_wanted` and add a way to
query the connection for the transport in use via a new connection
filter query.

The filter query can also be used in the happy eyeballing attempts when
code needs to know which transport is used by the "filter below". This
happens in wolfssl initialization, as one example.

Closes #17923

2 weeks agohttp/3: report handshake with version and cipher as for TCP connections
Stefan Eissing [Mon, 14 Jul 2025 07:33:53 +0000 (09:33 +0200)] 
http/3: report handshake with version and cipher as for TCP connections

Make reporting into separate functions, to be called from QUIC handshakes
as well.

Closes #17922

2 weeks agoGHA/windows: drop Windows CE jobs from CI
Viktor Szakats [Mon, 14 Jul 2025 11:22:23 +0000 (13:22 +0200)] 
GHA/windows: drop Windows CE jobs from CI

In preparation for the removal of Windows CE support.

These jobs were also using a macOS runner, which is a waste. And it'd be
too much effort to move them over to Windows or Linux.

Follow-up to 8491e6574cde770b227ca0e1cd66548291f49661 #17379

Closes #17924

2 weeks agoGHA: move iOS jobs from non-native to macos workflow
Viktor Szakats [Sat, 12 Jul 2025 19:28:23 +0000 (21:28 +0200)] 
GHA: move iOS jobs from non-native to macos workflow

No instant benefit, but it brings all Apple jobs into the same workflow.

Then perhaps allows intergrating iOS jobs with macOS ones, and in
the meantime keep them more tightly aligned.

Closes #17912

2 weeks agoconfig-win32: fix default targets, shorten macro logic
Viktor Szakats [Sun, 13 Jul 2025 11:36:45 +0000 (13:36 +0200)] 
config-win32: fix default targets, shorten macro logic

When using winbuild or Visual Studio IDE Project Files.
To simplify and prepare for dropping support for VS2008.

Details:
- fix VS2012 default target to be Windows 8 (was Vista).
  Confirmed by CI:
  ```
  -- The C compiler identification is MSVC 17.0.61030.0
  -- Found _WIN32_WINNT=0x0602
  ```
  Ref: https://ci.appveyor.com/project/curlorg/curl/builds/51594696/job/elbl0w5n7fmoos2f#L45
  It also aligns with the default being Windows 7 for VS2010,
  and Windows Vista for VS2008.
- bump minimum target to XP (was Windows 2000) when using VS2008.
  curl requires XP.
- add Windows release names to comments for clarity.
- add hex Windows version to a comment for clarity.
- merge VS2008/VS2012 minimum/default logic and comments.
- reduce scope of local minimum/default macros.
- shorten comments to fit within line limit.

Closes #17916

2 weeks agorunner.pm: use `dirname()` in `singletest_prepare()`
Viktor Szakats [Fri, 11 Jul 2025 13:07:16 +0000 (15:07 +0200)] 
runner.pm: use `dirname()` in `singletest_prepare()`

Replacing a regex, for portability.

Reported-by: Stefan Eissing
Bug: https://github.com/curl/curl/issues/17871#issuecomment-3051830614

Cherry-picked from #17877
Closes #17900

2 weeks agoVULN-DISCLOSURE-POLICY.md: 7 days embargo is max
Daniel Stenberg [Mon, 14 Jul 2025 06:59:04 +0000 (08:59 +0200)] 
VULN-DISCLOSURE-POLICY.md: 7 days embargo is max

It was recently updated in this doc to seven, but there were *two*
numbers mentioned and only one of them was updated leaving the paragraph
quite confusing.

Follow-up to 83c90e50472f32b74e388f6e524d

Closes #17921

2 weeks agotop-complexity: also output average complexity
Daniel Stenberg [Sun, 13 Jul 2025 21:41:59 +0000 (23:41 +0200)] 
top-complexity: also output average complexity

Closes #17920

2 weeks agoRELEASE-NOTES: synced
Daniel Stenberg [Sun, 13 Jul 2025 15:44:22 +0000 (17:44 +0200)] 
RELEASE-NOTES: synced

2 weeks agotests: raise two memory limits
Daniel Stenberg [Sun, 13 Jul 2025 14:59:36 +0000 (16:59 +0200)] 
tests: raise two memory limits

Runing the tests locally without valgrind test 518 and 537 would run
over their limits.

Plus init a variable in runtests.pl to avoid a warning output.

Closes #17919

2 weeks agoaltsvc: accept 'clear' without semicolon as well
Daniel Stenberg [Sun, 13 Jul 2025 14:32:55 +0000 (16:32 +0200)] 
altsvc: accept 'clear' without semicolon as well

Extend test 1654 to verify

Fixes #17917
Reported-by: Luke Wilde
Closes #17918

2 weeks agoGHA: minor tidy-ups
Viktor Szakats [Sun, 13 Jul 2025 01:28:19 +0000 (03:28 +0200)] 
GHA: minor tidy-ups

- GHA/checksrc: make a step name more accurate.
- cmakelint.sh: make sure to run from project root.
  To make it easier to run locally.
- cmakelint.sh: use `set -eu`.

Closes #17915

2 weeks agolibcurl.m4: fix indentation
Viktor Szakats [Sun, 13 Jul 2025 00:25:49 +0000 (02:25 +0200)] 
libcurl.m4: fix indentation

Closes #17913

2 weeks agowolfssl: add support for ML_KEM hybrids
Ryan Hooper [Fri, 11 Jul 2025 14:31:49 +0000 (10:31 -0400)] 
wolfssl: add support for ML_KEM hybrids

For parity with OpenSSL 3.5

Closes #17902

2 weeks agotool_paramhelp: fix language in comments
Daniel Stenberg [Fri, 11 Jul 2025 07:23:50 +0000 (09:23 +0200)] 
tool_paramhelp: fix language in comments

and tweak the logic a little bit

Closes #17895

2 weeks agoGHA/checksrc: use Linux for CI checks, merge job into misc checks
Viktor Szakats [Sat, 12 Jul 2025 16:07:51 +0000 (18:07 +0200)] 
GHA/checksrc: use Linux for CI checks, merge job into misc checks

CI check used macOS before this patch, but with the help of Linuxbrew,
latest zizmor and shellcheck are also available on Linux.

Also:
- migrate CI checks to the misc check workflow, to make both shellcheck
  use the same, latest, shellcheck version, and to save the overhead of
  an extra workflow.

Closes #17911

2 weeks agodocs: sync -tls-earlydata support w/ CURLOPT_SSL_OPTIONS
Daniel McCarney [Sat, 12 Jul 2025 00:52:44 +0000 (20:52 -0400)] 
docs: sync -tls-earlydata support w/ CURLOPT_SSL_OPTIONS

Support for early data has been added to wolfSSL and quictls/OpenSSL.

Closes #17909

2 weeks agodocs: note SSLS-EXPORT feature in -ssl-sessions doc
Daniel McCarney [Sat, 12 Jul 2025 00:41:39 +0000 (20:41 -0400)] 
docs: note SSLS-EXPORT feature in -ssl-sessions doc

Without a libcurl built with the SSLS-EXPORT feature this command line
option produces:

  curl: option --ssl-sessions: the installed libcurl version does not support this
  curl: try 'curl --help' or 'curl --manual' for more information

Add a note of warning on the -ssl-session docs page to account for this.

Closes #17909

2 weeks agolib/vts: fix a copy-pasted early data comment typo
Daniel McCarney [Fri, 11 Jul 2025 20:19:12 +0000 (16:19 -0400)] 
lib/vts: fix a copy-pasted early data comment typo

In gtls.c there was a typo'd comment that I think was missing the word
"no" to indicate there's "no GnuTLS way to signal no EarlyData".

This commit fixes that typo, and also updates a copy-pasted instance
that made it into wolfssl.c where it should refer to the WolfSSL API
missing the capability, not GnuTLS.

Closes #17907

2 weeks agolib/vtls: log rustls negotiated KEX group name
Daniel McCarney [Fri, 11 Jul 2025 20:00:01 +0000 (16:00 -0400)] 
lib/vtls: log rustls negotiated KEX group name

Closes #17906

2 weeks agolib/vtls: prefer ciphersuite to cipher in msgs
Daniel McCarney [Fri, 11 Jul 2025 19:56:04 +0000 (15:56 -0400)] 
lib/vtls: prefer ciphersuite to cipher in msgs

Closes #17906

2 weeks agolib/vtls: prefer rustls-ffi ciphersuite name API
Daniel McCarney [Fri, 11 Jul 2025 19:52:08 +0000 (15:52 -0400)] 
lib/vtls: prefer rustls-ffi ciphersuite name API

Closes #17906

2 weeks agomisc: fix typos
Patrick Stoeckle [Fri, 11 Jul 2025 18:59:53 +0000 (20:59 +0200)] 
misc: fix typos

Just fixing some typos using: https://github.com/crate-ci/typos

Closes #17904

2 weeks agoconnect: drop unused struct member
Viktor Szakats [Fri, 11 Jul 2025 20:40:41 +0000 (22:40 +0200)] 
connect: drop unused struct member

Follow-up to 283af039c819bd8039f8d7314f924079782d5abb #14863

Closes #17908