]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
14 months agotests: remove all valgrind disble instructions
Daniel Stenberg [Fri, 20 Sep 2024 14:28:27 +0000 (16:28 +0200)] 
tests: remove all valgrind disble instructions

Closes #14983

14 months agolibssh2: use the Curl_* memory functions to avoid memdebug
Daniel Stenberg [Fri, 20 Sep 2024 15:27:26 +0000 (17:27 +0200)] 
libssh2: use the Curl_* memory functions to avoid memdebug

This prevents our torture tests from detecting and getting trapped by
memory leaks in libssh2.

Closes #14984

14 months agolibssh.c: handle EGAINS during proto-connect correctly
Stefan Eissing [Fri, 20 Sep 2024 14:06:25 +0000 (16:06 +0200)] 
libssh.c: handle EGAINS during proto-connect correctly

The implementation did not check the poll flags when a ssh_connect()
EAGAINed. Also the poll check did not allow for both directions
to be signalled by libssh, which it does.

This appeared during CI testing with higher paralellism.

Closes #14982

14 months agomulti.c: make stronger check for paused transfer before asserting
Stefan Eissing [Fri, 20 Sep 2024 13:58:21 +0000 (15:58 +0200)] 
multi.c: make stronger check for paused transfer before asserting

With higher parallelism in CI, the ASSERT triggered on pause tests.
Strengthen the check. We might want to think about removing
KEEP_RECV_PAUSE|KEEP_SEND_PAUSE altogether.

Closes #14981

14 months agotests/valgrind.pm: fix warnings with no valgrind report to show
Daniel Stenberg [Fri, 20 Sep 2024 06:50:22 +0000 (08:50 +0200)] 
tests/valgrind.pm: fix warnings with no valgrind report to show

"readline() on closed filehandle $val at valgrind.pm line 45."

Closes #14977

14 months agoGHA/linux: fix installing valgrind, libpsl for rustls job, other cleanups
Viktor Szakats [Fri, 20 Sep 2024 10:30:52 +0000 (12:30 +0200)] 
GHA/linux: fix installing valgrind, libpsl for rustls job, other cleanups

Move them from `install_steps` to `install_packages`.

Also:
- stop installing valgrind for the event-based job where valgrind is
  explicitly disabled with tflags `-n`.
- stop installing valgrind for the hyper job. It wasn't enabled (by
  accident) before, and when actually enabled, it fails to pass tests:
  ```
  TESTFAIL: These test cases failed: 11 25 28 30 36 37 43 45 69 78 88
    90 94 129 153 154 155 158 160 170 176 178 187 193 207 217 233 234
    243 257 262 276 287 302 309 317 318 330 376 379 388 394 395 398
    415 427 440 441 493 497 498 547 548 551 552 555 590 599 644 650
    1031 1067 1071 1079 1089 1090 1104 1127 1128 1141 1142 1168 1172
    1174 1197 1239 1244 1261 1297 1314 1412 1416 1424 1430 1431 1432
    1433 1434 1473 1479 1480 1511 1531 1909 2081 2306 3015 3102
  ```
  Ref: https://github.com/curl/curl/actions/runs/10957987291/job/30427294361?pr=14979#step:41:50381
  Hyper is also scheduled for removal in February 2025.

Closes #14979

14 months agoGHA/windows: add MSVC vcpkg MSH3 job
Tal Regev [Thu, 19 Sep 2024 19:09:23 +0000 (22:09 +0300)] 
GHA/windows: add MSVC vcpkg MSH3 job

Refs: #14927 #14932 #14971
Closes #14922

14 months agoCI: disable dependency tracking in Circle CI jobs
Viktor Szakats [Fri, 20 Sep 2024 01:40:47 +0000 (03:40 +0200)] 
CI: disable dependency tracking in Circle CI jobs

Follow-up to 4521eac45aedf7a1d50f70eca5fbdbefdcb09942 #13794
Closes #14975

14 months agoGHA: keep default pkgconf, do not replace with pkg-config on Linux
Viktor Szakats [Thu, 19 Sep 2024 22:51:35 +0000 (00:51 +0200)] 
GHA: keep default pkgconf, do not replace with pkg-config on Linux

Ubuntu has the `pkgconf` package installed by default that implements
the `pkg-config` command. Switch CI `apt` commands over to `pkgconf`
to avoid replacing it in every job run.

Avoids:
```
The following packages will be REMOVED:
  pkgconf r-base-dev
The following NEW packages will be installed:
  [...] pkg-config [...]
```
https://github.com/curl/curl/actions/runs/10949915766/job/30404126342?pr=14972#step:2:20

Closes #14974

14 months agounit1660: fix unreachable code warning in no-SSL builds
Viktor Szakats [Wed, 4 Sep 2024 01:25:09 +0000 (03:25 +0200)] 
unit1660: fix unreachable code warning in no-SSL builds

Or no-HTTP, no-HSTS builds, also MSH3 builds.

CMake, VS2022, Debug, x64, no SSL, Static, Build-only:
```
C:\projects\curl\tests\unit\unit1660.c(46,1): error C2220: the following warning is treated as an error
C:\projects\curl\tests\unit\unit1660.c(46,1): warning C4702: unreachable code
```
Ref: https://ci.appveyor.com/project/curlorg/curl/builds/50531210/job/cjewvo9agavthr3o#L216

Required-by: #14922
Cherry-picked from #14772
Closes #14971

14 months agocmake: allow building tests in unity mode
Viktor Szakats [Mon, 2 Sep 2024 22:26:26 +0000 (00:26 +0200)] 
cmake: allow building tests in unity mode

Makes building tests noticeably faster.

Apply changes/fixes/workarounds to make Unity work:
- rename test variables to avoid collisions or shadowing each other when
  combined into single units.
- add workaround to avoid applying `lib/memdebug.h` overrides to system
  headers declaring/defining `getaddrinfo()`/`freeaddrinfo()` for
  `tests/server/resolve.c`. This replaces a previous workaround that
  worked for that specific source.
- rename test macro `CTRL` clashing with Cygwin `sys/ioctl.h`.
- add include guard to `test.h`.

Also:
- exclude `tests/http/clients` which are all single-source. (like
  `docs/examples`.)

Build time improvements for tests:
- AppVeyor CI:
  - MSVC 2008, 2010: 1 minute faster (4m8s -> 2m56s, 3m19s -> 2m24s)
  - MSVC 2022 arm64: 3.5 minutes faster (10m18s -> 6m48s)
  before: https://ci.appveyor.com/project/curlorg/curl/builds/50522785
  after: https://ci.appveyor.com/project/curlorg/curl/builds/50522942
- GHA:
  - Cygwin: 1.5 minutes faster (3m13s -> 1m43s)
    before: https://github.com/curl/curl/actions/runs/10681535327/job/29605384398
    after: https://github.com/curl/curl/actions/runs/10680818726/job/29603130637
  - Windows:
    before: https://github.com/curl/curl/actions/runs/10680818713
    after: https://github.com/curl/curl/actions/runs/10683850187
    - MSYS2, mingw-w64: 1 minute faster
    - MSVC: 30 seconds faster (3m17s -> 2m48s)
  - macOS: double speed (39s -> 18s)
    before: https://github.com/curl/curl/actions/runs/10680818753/job/29603133447
    after: https://github.com/curl/curl/actions/runs/10683850174/job/29612914515
  - Linux: almost double speed (30/31s -> 18s)
    before: https://github.com/curl/curl/actions/runs/10681535311/job/29605387156
    after: https://github.com/curl/curl/actions/runs/10680818721/job/29603133976
  - non-native: no obvious effect.
    before: https://github.com/curl/curl/actions/runs/10680818722
    after: https://github.com/curl/curl/actions/runs/10683850187
  - Old Linux: Unity mode not supported by old CMake, no effect.

Closes #14765

14 months agolib: fix unity builds with BearSSL, MSH3, Quiche, OmniOS
Viktor Szakats [Fri, 6 Sep 2024 12:09:40 +0000 (14:09 +0200)] 
lib: fix unity builds with BearSSL, MSH3, Quiche, OmniOS

- fix MSH3 static symbol clash.
- fix Quiche static symbol clash.
- fix local macro clash with BearSSL header.
- fix local macro clash with OmniOS system header.
  ```
  In file included from ../../lib/urldata.h:197,
                     from ../../lib/altsvc.c:32,
                     from libcurlall.c:2:
    ../../lib/cf-socket.h:55:25: error: expected ':', ',', ';', '}' or '__attribute__' before '.' token
       55 | #define sa_addr _sa_ex_u.addr
          |                         ^
    In file included from ../../lib/urldata.h:197,
                     from ../../lib/altsvc.c:32,
                     from libcurlall.c:2:
    ../../lib/cf-socket.h:55:25: error: expected ':', ',', ';', '}' or '__attribute__' before '.' token
       55 | #define sa_addr _sa_ex_u.addr
          |                         ^
  ```
  Ref: https://github.com/curl/curl/actions/runs/10738314933/job/29781644299?pr=14772#step:3:6115

Discovered while adding support for "unity" builds for autotools.

Required-by: #14922
Cherry-picked from #14815
Closes #14932

14 months agotests: Only log warnings or worse by default in smbserver
Dan Fandrich [Tue, 17 Sep 2024 22:14:31 +0000 (15:14 -0700)] 
tests: Only log warnings or worse by default in smbserver

There shouldn't be anything displayed during a normal run, but only if
server debugging is enabled. Also, set log_file to a magic value to
disable it, otherwise impacket installs its own logger that messes with
what we want.

Closes #14950

14 months agoruntests.md: Suggest a value for -j for torture tests
Dan Fandrich [Thu, 19 Sep 2024 18:15:35 +0000 (11:15 -0700)] 
runtests.md: Suggest a value for -j for torture tests

14 months agotests: Fix keyword for test1411
Dan Fandrich [Tue, 17 Sep 2024 22:11:25 +0000 (15:11 -0700)] 
tests: Fix keyword for test1411

14 months agoGHA/torture: bump test parallelism to `-j10`
Viktor Szakats [Thu, 19 Sep 2024 16:06:52 +0000 (18:06 +0200)] 
GHA/torture: bump test parallelism to `-j10`

- Linux !FTP: 21m43 -> 5m15
- Linux FTP: 14m55 -> 3m34

before: https://github.com/curl/curl/actions/runs/10944468673
after: https://github.com/curl/curl/actions/runs/10945446163

Closes #14970

14 months agocmake: sync torture test parallelism with autotools
Viktor Szakats [Thu, 19 Sep 2024 15:56:11 +0000 (17:56 +0200)] 
cmake: sync torture test parallelism with autotools

Follow-up to 8ad3597d2dca4209fb19563b0a611a9944fa579b #14960
Closes #14969

14 months agotidy-up: rename `CURL_WINDOWS_APP` to `CURL_WINDOWS_UWP`
Viktor Szakats [Thu, 12 Sep 2024 11:58:53 +0000 (13:58 +0200)] 
tidy-up: rename `CURL_WINDOWS_APP` to `CURL_WINDOWS_UWP`

Rename internal macro to make its purpose more obvious.

After this patch `grep -i uwp` shows all the code related to UWP.

Ref: https://curl.se/mail/lib-2024-09/0014.html
Closes #14881

14 months agocmake, `Makefile.mk`: use `-isystem` for dep headers, silence BearSSL issues
Viktor Szakats [Mon, 2 Sep 2024 21:34:13 +0000 (23:34 +0200)] 
cmake, `Makefile.mk`: use `-isystem` for dep headers, silence BearSSL issues

Patch started out for working around compiler warnings in BearSSL latest
tarball release v0.6 (2018-08-14) and Apple clang 14 with CMake.

Then turned into patching CMake and `Makefile.mk` builds to use
`-isystem` instead `-I` when adding header directories for
dependencies. This avoids compiler warnings in dependency headers,
syncing behaviour with autotools.

Also:
- `Makefile.mk`: add support for BearSSL.
- delete warning suppression for mbedTLS headers. No longer necessary
  after this patch.
  Follow-up to 434db995a7566a76f6a16391897816ddd1011adc #12720

Silenced BearSSL warnings:
```
In file included from curl/lib/vtls/bearssl.c:28:
In file included from bearssl/inc/bearssl.h:127:
bearssl/inc/bearssl_hash.h:727:5: warning: 'BR_DOXYGEN_IGNORE' is not defined, evaluates to 0 [-Wundef]
    ^
bearssl/inc/bearssl_hash.h:745:5: warning: 'BR_DOXYGEN_IGNORE' is not defined, evaluates to 0 [-Wundef]
    ^
In file included from curl/lib/vtls/bearssl.c:28:
In file included from bearssl/inc/bearssl.h:136:
bearssl/inc/bearssl_ssl.h:1253:20: warning: implicit conversion loses integer precision: 'unsigned int' to 'uint16_t' (aka 'unsigned short') [-Wimplicit-int-conversion]
        cc->version_min = version_min;
                        ~ ^~~~~~~~~~~
bearssl/inc/bearssl_ssl.h:1254:20: warning: implicit conversion loses integer precision: 'unsigned int' to 'uint16_t' (aka 'unsigned short') [-Wimplicit-int-conversion]
        cc->version_max = version_max;
                        ~ ^~~~~~~~~~~
bearssl/inc/bearssl_ssl.h:1327:28: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint16_t' (aka 'unsigned short') [-Wimplicit-int-conversion]
        ctx->protocol_names_num = num;
                                ~ ^~~
5 warnings generated.
```

(These warnings were fixed in BearSSL Git master in 2019 via
2893441f2efd4603ddd6d7f49011bdda096a4a87 and
ecdf89770ee82dfea6186fb4369cff3d06cd852e.)

Also these two cases, which are caused by an unidentified component
(outside curl) cranking up MSVC warnings in external headers to `/W4`
when ZLIB is deselected:
https://github.com/curl/curl/pull/14859#issuecomment-2351809153

mbedTLS 3.6.1:
```
C:\vcpkg\installed\x64-windows\include\psa\crypto_struct.h(254,13): error C2220: the following warning is treated as an error [D:\a\curl\curl\bld\lib\libcurl_object.vcxproj]
  (compiling source file 'CMakeFiles/libcurl_object.dir/Unity/unity_0_c.c')
C:\vcpkg\installed\x64-windows\include\psa\crypto_struct.h(254,13): warning C4200: nonstandard extension used: zero-sized array in struct/union [D:\a\curl\curl\bld\lib\libcurl_object.vcxproj]
  (compiling source file 'CMakeFiles/libcurl_object.dir/Unity/unity_0_c.c')
```
Ref: https://github.com/curl/curl/actions/runs/10842694205/job/30107466989?pr=14859#step:10:29

nghttp3 1.5.0:
```
C:\vcpkg\installed\x64-windows\include\nghttp3\nghttp3.h(2678,1): error C2220: the following warning is treated as an error [D:\a\curl\curl\bld\lib\libcurl_object.vcxproj]
  (compiling source file 'CMakeFiles/libcurl_object.dir/Unity/unity_0_c.c')
  C:\vcpkg\installed\x64-windows\include\nghttp3\nghttp3.h(2678,1): warning C4324: 'nghttp3_pri': structure was padded due to alignment specifier [D:\a\curl\curl\bld\lib\libcurl_object.vcxproj]
  (compiling source file 'CMakeFiles/libcurl_object.dir/Unity/unity_0_c.c')
```
Ref: https://github.com/curl/curl/actions/runs/10871875297/job/30166233862?pr=14859#step:10:28

Closes #14763

14 months agocmake: delete unused `NEED_LBER_H`, `HAVE_LDAP_H`
Viktor Szakats [Mon, 26 Aug 2024 11:53:41 +0000 (13:53 +0200)] 
cmake: delete unused `NEED_LBER_H`, `HAVE_LDAP_H`

Both are used by `./configure` internally, not by curl C code.
CMake adds `NEED_LBER_H` to `CURL_TEST_DEFINES`, which is used by
`curl_internal_test()`, but there is no LDAP-related test made with that
call.

Thus, stop detecting and publishing these from CMake.

`NEED_LBER_H` added in 7320e53d9e17b22cacea77a89ecaa8348513f0e1.
`HAVE_LDAP_H` added in 4c5307b45655ba75ab066564afdc0c111a8b9291 (initial CMake commit).

Closes #14690

14 months agotets: testrunner fairness
Stefan Eissing [Thu, 19 Sep 2024 13:59:20 +0000 (15:59 +0200)] 
tets: testrunner fairness

Collect all ready runners from select() and process in a loop. This
assures fairness in processing among all runners.

Formerly, only the first ready runner in the list of all was processed,
leading to later runners being delayed in processing and reporting
overly long test durations.

Also, reduce the backend idle timeout for the h2/h3 test servers so that
process shutdowns take less time.

Closes #14967

14 months agocmake/FindNGTCP2: use library path as hint for finding the crypto module
Viktor Szakats [Thu, 12 Sep 2024 01:34:31 +0000 (03:34 +0200)] 
cmake/FindNGTCP2: use library path as hint for finding the crypto module

It allows finding the ngtcp2 crypto interface library automatically when
using a custom `NGTCP2_LIBRARY`.

Before this patch the library location had to be added via
`CMAKE_LIBRARY_PATH` or by other means.

Also add empty lines for readability / uniformity.

Fixes https://github.com/curl/curl-for-win/blob/8b8909e1206de1dcca356a8dd33eb1e4ffeea7fd/curl.sh#L289
Closes #14905

14 months agobuild: `buildinfo.txt` improvements
Viktor Szakats [Sat, 7 Sep 2024 00:43:35 +0000 (02:43 +0200)] 
build: `buildinfo.txt` improvements

- cmake: drop `configure.os`.
  This also includes OS version, but thus far it's not important enough
  to include it.
- autotools: drop redundant, autotools-only `{target|host}.vendor`.
  (it's part of the triplet in `{target|host}`.)
- swap order to `*.cpu` -> `*.os` to match triplet-order.
- cmake: drop redundant `target`.
  It's manually filled and only in a (so far) few CI jobs. Let's revisit
  when this becomes useful.
- move `buildinfo.txt` to build root.
- dist: add `buildinfo.txt` to `DISTCLEANFILES`.
- autotools: detect human readable compiler version.
- autotools: replace `XXYY` `compiler.version` with "X.Y"-style.
  (also to match cmake.)
- autotools: use distinct `compiler_id` for Apple clang: `APPLECLANG`.
  To match cmake and also because the the "X.Y"-style version number
  is the Apple version, while `XXYY` was a value roughly translated to
  mainline llvm/clang version.
- show buildinfo at the end of the configure stage, when run in CI, or
  when `CURL_BUILDINFO` or `CURL_CI` env is set.

Follow-up to 1fdea1684602a1ae2870c67b5f3e8fd34f63da95 #14802
Assisted-by: Dan Fandrich
Ref: https://github.com/curl/curl/pull/14802#issuecomment-2334942991
Closes #14822

14 months agoautotools: tidy-ups in `src/Makefile.inc`
Viktor Szakats [Fri, 6 Sep 2024 18:10:10 +0000 (20:10 +0200)] 
autotools: tidy-ups in `src/Makefile.inc`

- move `EXTRA_DIST` to the top of file.
- move `checksrc` init next to use.
- use variable `HUGE` instead of repeating a literal.

Cherry-picked from #14815
Closes #14933

14 months agobuild: limit `arc4random` detection to no-SSL configs
Viktor Szakats [Sat, 14 Sep 2024 15:37:33 +0000 (17:37 +0200)] 
build: limit `arc4random` detection to no-SSL configs

`arc4random()` is no longer used if any TLS backend is active.
Limit feature detection to builds with no TLS backend.

Closes #14909

14 months agocmake: disable default OpenSSL if BearSSL, GnuTLS or Rustls is enabled
Viktor Szakats [Sun, 8 Sep 2024 15:36:36 +0000 (17:36 +0200)] 
cmake: disable default OpenSSL if BearSSL, GnuTLS or Rustls is enabled

Disable OpenSSL by default if any of these alterntive TLS backends were
explicitly selected.

Following the logic already in place for Schannel, Secure Transport,
mbedTLS and wolfSSL.

Closes #14828

14 months agodist: drop `.in` files from `EXTRA_DIST`
Viktor Szakats [Sat, 7 Sep 2024 08:03:25 +0000 (10:03 +0200)] 
dist: drop `.in` files from `EXTRA_DIST`

Some of the `.in` files were listed in `EXTRA_DIST`. Delete them.

`.in` files (passed to `AC_CONFIG_FILES`) are added automatically
to the distro by autotools.

Closes #14821

14 months agochecksrc: check for spaces around '?', '>' and '<'
Daniel Stenberg [Wed, 18 Sep 2024 13:28:19 +0000 (15:28 +0200)] 
checksrc: check for spaces around '?', '>' and '<'

Closes #14921

14 months agolib/src: white space edits to comply better with code style
Daniel Stenberg [Wed, 18 Sep 2024 13:29:51 +0000 (15:29 +0200)] 
lib/src: white space edits to comply better with code style

... as checksrc now finds and complains about these.

Closes #14921

14 months agoTODO: IMAP upload unread
Daniel Stenberg [Thu, 19 Sep 2024 07:01:25 +0000 (09:01 +0200)] 
TODO: IMAP upload unread

Proposed-by: Nicolas George
Ref: https://curl.se/mail/archive-2024-09/0003.html
Closes #14964

14 months agocmake: drop redundant assigments
Viktor Szakats [Sun, 15 Sep 2024 18:14:46 +0000 (20:14 +0200)] 
cmake: drop redundant assigments

No need to set them `ON` again.

Closes #14924

14 months agocmake: drop redundant zlib var, rename function (internals)
Viktor Szakats [Fri, 13 Sep 2024 03:24:25 +0000 (05:24 +0200)] 
cmake: drop redundant zlib var, rename function (internals)

- drop redundant internal variable `USE_ZLIB`, rely on `HAVE_LIBZ`.

- rename `optional_dependency()` -> `curl_dependency_option()`
  Make `grep 'option('` hit this option. Namespaced.
  It has a single use with `ZLIB`.

Closes #14918

14 months agourlapi: drop unused header
Viktor Szakats [Wed, 11 Sep 2024 16:49:58 +0000 (18:49 +0200)] 
urlapi: drop unused header

Closes #14867

14 months agoprocesshelp.pm: improve `taskkill` calls (Windows)
Viktor Szakats [Wed, 18 Sep 2024 12:36:36 +0000 (14:36 +0200)] 
processhelp.pm: improve `taskkill` calls (Windows)

- drop `tasklist` call before `taskkill`.
  `taskkill` offers two ways to kill a `pid`:
  1. `-pid <pid>`
     If `<pid>` is missing it returns 128 and outputs:
     ```
     ERROR: The process "<pid>" not found.
     ```
  2. `-fi "PID eq <pid>"`
     If `<pid>` is missing, it returns 0 and outputs:
     ```
     INFO: No tasks running with the specified criteria.
     ```
  The curl runner script doesn't check the result of the call and both
  stdout and stderr are redirected to NUL.
  Meaning the `tasklist` calls pre-verifying if the PID exists are not
  necessary and we can drop them to put less strain on the runner
  environment.

- log a `taskkill` call missed earlier.
  Follow-up to e53523fef07894991c69d907a7c7794c7ada4ff4 #14859

- streamline `taskkill` calls by using the `-pid` option
  (was `-fi <filter-expression>`).

- make `taskkill` in `pidterm()` use `-t` to kill the process tree.

Ref: #11009
Closes #14959

14 months agotests: delete duplicate macro check
Viktor Szakats [Thu, 19 Sep 2024 00:17:58 +0000 (02:17 +0200)] 
tests: delete duplicate macro check

Follow-up to e9a7d4a1c8377dbcf9a2d94365f60e3e5dff48f8 #12376

Closes #14963

14 months agoCURLMOPT_PIPELINING.md: clarify that CURLPIPE_NOTHING is not default
Daniel Stenberg [Wed, 18 Sep 2024 21:04:56 +0000 (23:04 +0200)] 
CURLMOPT_PIPELINING.md: clarify that CURLPIPE_NOTHING is not default

Fixes #14961
Reported-by: Pavel Kropachev
Closes #14962

14 months agotests: testrunner reliability improvements
Stefan Eissing [Wed, 18 Sep 2024 14:32:07 +0000 (16:32 +0200)] 
tests: testrunner reliability improvements

- perform torture tests with '-j2' for shorter runtime
- when waiting on test results overly long, log the tests
  waited for and eventually log the test log directories
  for easier analysis what is wrong in CI jobs.
- sockfilt.c: treat the windows errno 109 (ERROR_BROKEN_PIPE)
  as a socket closed by the client and do not exit.
- when verifying https server, do not in addition check
  the http server behind it also
- when tearing down the stunnel of a non-responsive https
  server, tear down the http server with it

Closes #14960

14 months agolib, src, tests: added space around ternary expressions
Gabriel Marin [Sat, 14 Sep 2024 20:04:21 +0000 (23:04 +0300)] 
lib, src, tests: added space around ternary expressions

Closes #14912

14 months agoRELEASE-NOTES: synced
Daniel Stenberg [Wed, 18 Sep 2024 13:20:56 +0000 (15:20 +0200)] 
RELEASE-NOTES: synced

And bump to 8.10.2 for now

14 months agonegotiate: conditional check around GSS & SSL specific code
Jon Rumsey [Wed, 18 Sep 2024 09:31:25 +0000 (10:31 +0100)] 
negotiate: conditional check around GSS & SSL specific code

Fixes #14938
Reported-by: lomberd2 on github
Fixes #14952
Closes #14954

14 months agocurl_url_set.md: document HOST handling when URL is parsed
Daniel Stenberg [Tue, 17 Sep 2024 16:03:30 +0000 (18:03 +0200)] 
curl_url_set.md: document HOST handling when URL is parsed

When a full URL is set (parsed), the hostname component is stored URL
decoded (with default zero flags).

While perhaps surprising and inconsistent, the API has done this for
quite some time already and changigtn this now would break existing
behaviour.

Fixes #14942
Reported-by: Venkat Krishna R
Closes #14946

14 months agosendf: add condition to max-filesize check
Daniel Stenberg [Wed, 18 Sep 2024 12:09:08 +0000 (14:09 +0200)] 
sendf: add condition to max-filesize check

Since the max filesize check should not be performed while the body is
ignored.

Follow-up to aef384a7df23c5f52940112593f
Closes #14958

14 months agoRELEASE: synced curl-8_10_1
Daniel Stenberg [Wed, 18 Sep 2024 05:53:49 +0000 (07:53 +0200)] 
RELEASE: synced

8.10.1 release

14 months agoTHANKS: contributors from the 8.10.1 release
Daniel Stenberg [Wed, 18 Sep 2024 05:53:49 +0000 (07:53 +0200)] 
THANKS: contributors from the 8.10.1 release

14 months agoGHA/windows: revert enabling SSPI option
Viktor Szakats [Tue, 17 Sep 2024 16:07:32 +0000 (18:07 +0200)] 
GHA/windows: revert enabling SSPI option

Because it reduces test coverage significantly:
```
TESTINFO: "curl has SSPI support" 109 times (64, 65, 67, 68, 69, 70, 72, 81, 88 and 100 more)
```

Follow-up to e53523fef07894991c69d907a7c7794c7ada4ff4 #14859
Closes #14947

14 months agotool_cb_wrt: use "curl_response" if no file name in URL
Daniel Stenberg [Tue, 17 Sep 2024 05:41:59 +0000 (07:41 +0200)] 
tool_cb_wrt: use "curl_response" if no file name in URL

Use the same fallback for content-disposition cases as for regular -O

Add test692: verify -JO with URL without a file name

Reported-by: Brian Inglis
Fixes #14939
Closes #14940

14 months agoGHA/non-native: bump vmactions/omnios-vm from 1.0.2 to 1.0.6
dependabot[bot] [Mon, 16 Sep 2024 14:32:27 +0000 (14:32 +0000)] 
GHA/non-native: bump vmactions/omnios-vm from 1.0.2 to 1.0.6

Bumps [vmactions/omnios-vm](https://github.com/vmactions/omnios-vm) from 1.0.2 to 1.0.6.
- [Release notes](https://github.com/vmactions/omnios-vm/releases)
- [Commits](https://github.com/vmactions/omnios-vm/compare/a61ca1ebafdcb14a9d986928d070c9834ee66fd3...2f97978b477e0a014767f65ecf3656b933541460)

14 months agoGHA/windows: fix bad typo in MSVC GnuTLS stunnel condition
Viktor Szakats [Mon, 16 Sep 2024 21:49:00 +0000 (23:49 +0200)] 
GHA/windows: fix bad typo in MSVC GnuTLS stunnel condition

Regression from e53523fef07894991c69d907a7c7794c7ada4ff4 #14859

14 months agoGHA: misc updates: impacket, timeouts, mingw-w64 32-bit
Viktor Szakats [Mon, 16 Sep 2024 07:48:41 +0000 (09:48 +0200)] 
GHA: misc updates: impacket, timeouts, mingw-w64 32-bit

- NetBSD: enable impacket. Debatable if this hefty package is worth it
  for the single SMB test (1451) run curl uses it for.
  (on the upside, it seems to install instantly on NetBSD)
  It's also a versioned package name that requires active maintenance.
  The unversioned name doesn't work, though that's what the package
  search returns: https://pkgsrc.se/net/py-impacket

- FreeBSD: stop installing impacket deps explicitly.
  They are automatically installed via the impacket package.

- Linux: put time limit on test runs.
  Started hanging yesterday:
  linux: https://github.com/curl/curl/actions/runs/10875011573/job/30172946986#step:41:3731
  awslc: https://github.com/curl/curl/actions/runs/10879782864/job/30185188509
  wolfssl: https://github.com/curl/curl/actions/runs/10879782864/job/30185188509

- distcheck: reduce time limit to 15m (was 30m)
  Linux tests started to hang, so reduce the timeout from 30 minutes
  to 15. These jobs normally take 3 to 6 minutes to finish.
  https://github.com/curl/curl/actions/runs/10879479914

- Windows: add 32-bit MSYS2/mingw-w64 job.
  Follow-up to e53523fef07894991c69d907a7c7794c7ada4ff4 #14859

Closes #14929

14 months agoCI: move Azure jobs to GHA, fix fallouts, sshserver, runtests tweaks
Viktor Szakats [Wed, 11 Sep 2024 10:41:57 +0000 (12:41 +0200)] 
CI: move Azure jobs to GHA, fix fallouts, sshserver, runtests tweaks

CI:

- GHA/windows: enable OpenSSH server, SysInternals `handle`, `impacket`.
  Skip `impacket` on MSYS2 due to install failure.
  Skip OpenSSH server for old/standalone mingw-w64 (building curl
  without SSH there.)
- GHA/windows: make test tool installs a separate step.
- GHA/cygwin: enable OpenSSH server.
  Skip `impacket`: it's compiling for 7 minutes then breaks.
  Skip `stunnel` due to sluggish test run performance.
  (This update is unrelated to Azure jobs.)
- GHA/linux: migrate Linux jobs from Azure CI.
- GHA/linux: migrate scanbuild job from Azure CI.
- GHA/linux: enable libssh2 in a job. Also enable valgrind.
- CI/windows: enable SSPI in two jobs.
- CI/windows: disable zlib in one more job.
- CI/windows: improve `if` condition checking GnuTLS.
- CI/windows: ignore SFTP/SCP tests as necessary.
  - universally ignore SCP tests, they fail everywhere.
  - ignore test 612.
  - ignore test 613 616 618 with MSYS2 mingw-w64.
  - ignore test 614 with libssh.
  - ignore all SFTP with MSYS2 native.
  - ignore all SFTP with vcpkg with `libssh2[core,zlib]`.
  - ignore a couple of SFTP tests with MSYS2 mingw-w64.
  (This matches settings on Azure CI.)
- GHA/windows: ignore failing 1451 'Basic SMB request' test for
  old mingw-w64 7.3.0 (but not for 9.5.0!):
  ```
  2024-09-11 21:45:59,738 ERROR smbComNegotiate: b'NT LM 0.12\x00' is not in list
  [...]
  curl: (7) Could not connect to server
  [...]
  FAIL 1451: 'Basic SMB request' SMB
  ```
  Ref: https://github.com/curl/curl/actions/runs/10816280746/job/30007130770#step:13:3546
- CI/Azure: delete, now moved to GHA.

sshserver:

- sshserver: fix permissions for SSH host key on Windows, allowing sshd
  to launch.
- sshserver: fix initializing config paths with Cygwin/MSYS2 sshd.
- sshserver: fix initializing config paths in parallel builds.
- sshserver: delete redundant `DenyUsers`. This also opens the way
  to allow multiple usernames.
- sshserver: fix `AllowUsers` for GHA/windows, by allowing the
  domainless username again.
  Follow-up to 3ee7c676ec8ef32e3a9cb4d0fb2929a8335d58db #5721
- sshserver: fix `Deprecated option` warnings in `sshd_config`:
  ```
  D:/a/curl/curl/bld/tests/log/2/server/curl_sshd_config line 7: Deprecated option AuthorizedKeysFile2
  D:/a/curl/curl/bld/tests/log/2/server/curl_sshd_config line 25: Deprecated option KeyRegenerationInterval
  D:/a/curl/curl/bld/tests/log/2/server/curl_sshd_config line 35: Deprecated option RhostsRSAAuthentication
  D:/a/curl/curl/bld/tests/log/2/server/curl_sshd_config line 36: Deprecated option RSAAuthentication
  D:/a/curl/curl/bld/tests/log/2/server/curl_sshd_config line 37: Deprecated option ServerKeyBits
  D:/a/curl/curl/bld/tests/log/2/server/curl_sshd_config line 41: Deprecated option UseLogin
  ```
- sshserver: fix `Deprecated option` warnings in `ssh_config` with
  Cygwin/MSYS2.
- sshserver: fix dumping config files due to the filenames missing their
  full paths.
- sshserver: add workaround to make `logmsg` messages visible.
  Before this patch they only went to a file and never shown.

runtests:

- runtests: log details when these Windows commands are called:
  `handle`, `taskkill`, `tasklist`.
- runtests: add documentation links to Windows tools:
  `handle`, `taskkill`, `tasklist`, `icacls`.
- runtests: add `-t` (kill whole tree) option to `taskkill` in
  `servers.pm`, syncing it with the other `taskkill` call.
  Follow-up to bc72a78a11764558639131d51fa8e7c81ee1e113 #14488
- runtests: show warning if Sysinternals `handle` tool is missing.
- runtests: drop Windows XP Home compatibility `tskill` call.
  The call was made on all Windows versions. It's possibly overkill to
  do this, because XP Home is probably rarely used for running curl
  tests these days. In case it's needed, it'd be better to put it under
  an explicit option.
- runtests: show Perl version and path.

Fix/silence fallouts:

- unit2603: fix building with disabled HTTP support.
- unit2604: silence `-Woverlength-strings` warnings in C89 mode.
- test437, test1614: fix to pass with no-IPv6 builds.

Closes #14859

14 months agoGHA/non-native: install Perl for FreeBSD cmake jobs
Viktor Szakats [Sun, 15 Sep 2024 23:07:25 +0000 (01:07 +0200)] 
GHA/non-native: install Perl for FreeBSD cmake jobs

It was implicitly installed for autotools jobs. Install it explicitly
for cmake ones.

Closes #14928

14 months agocmake: fix MSH3 to appear on the feature list
Viktor Szakats [Sun, 15 Sep 2024 22:52:29 +0000 (00:52 +0200)] 
cmake: fix MSH3 to appear on the feature list

Closes #14927

14 months agoGHA/non-native: enable SFTP/SCP tests on FreeBSD
Viktor Szakats [Sun, 15 Sep 2024 13:54:43 +0000 (15:54 +0200)] 
GHA/non-native: enable SFTP/SCP tests on FreeBSD

It's working now. Possibly fixed in the runner env?

Closes #14920

14 months agosingleuse: drop `Curl_memrchr()` for no-HTTP builds
Viktor Szakats [Wed, 11 Sep 2024 19:48:55 +0000 (21:48 +0200)] 
singleuse: drop `Curl_memrchr()` for no-HTTP builds

Make single-use function check CI test pass by dropping the global
`Curl_memrchr()` function from the build when it has no caller.

Fixes:
```
Curl_memrchr in curl_memrchr
```
https://github.com/curl/curl/actions/runs/10816280747/job/30007145114

Seen while migrating affected job from Azure to GHA.
Ref: #14859

Closes #14919

14 months agoGHA: replace make with ninja in Cygwin, MSYS2 and mingw-w64 cmake jobs
Viktor Szakats [Sun, 15 Sep 2024 02:32:17 +0000 (04:32 +0200)] 
GHA: replace make with ninja in Cygwin, MSYS2 and mingw-w64 cmake jobs

Speed-ups:
- cygwin build: 47s -> 29s
- cygwin build tests: 3m12 -> 2m32
- MSYS2 native build: 29s -> 16s
- MSYS2 native build tests: 2m24 -> 1m52
- MSYS2/mingw-w64: already had ninja installed and used implicitly.
- linux-mingw-w64-cross: 31s -> 25s

before:
cygwin: https://github.com/curl/curl/actions/runs/10866939355/job/30155134299
windows: https://github.com/curl/curl/actions/runs/10866939361

after:
cygwin: https://github.com/curl/curl/actions/runs/10867861215/job/30157121784
windows: https://github.com/curl/curl/actions/runs/10867861208?pr=14914

Closes #14914

14 months agoGHA/non-native: replace make with ninja in cmake jobs
Viktor Szakats [Sun, 15 Sep 2024 10:42:21 +0000 (12:42 +0200)] 
GHA/non-native: replace make with ninja in cmake jobs

Comparing job times for non-native runners is unreliable, but
a speed-up is expected nonetheless.

Full job times:
- NetBSD amd64: 14m1 -> 13m15
- OpenBSD amd64: 6m14 -> 5m33
- FreeBSD arm64: 6m10 -> 5m32

Example runs:
before: https://github.com/curl/curl/actions/runs/10866939368
after: https://github.com/curl/curl/actions/runs/10870425491?pr=14917

Closes #14917

14 months agoGHA: add `valgrind` to the job titles using it, and tidy-ups
Viktor Szakats [Tue, 10 Sep 2024 14:35:17 +0000 (16:35 +0200)] 
GHA: add `valgrind` to the job titles using it, and tidy-ups

There is a 4-5x difference in test run times. Make the reason more
obvious by adding valgrind to the job names.

Also:
- tidy up job names.

Closes #14853

14 months agoGHA/macos: tidy-up
Viktor Szakats [Sun, 15 Sep 2024 02:34:53 +0000 (04:34 +0200)] 
GHA/macos: tidy-up

- drop redundant `brew autoconf`.
  It's automatically installed via `automake`.
- whitespace

14 months agoGHA/windows: use libuv for event-based tests on openssl job
Tal Regev [Wed, 11 Sep 2024 16:13:24 +0000 (19:13 +0300)] 
GHA/windows: use libuv for event-based tests on openssl job

Use libuv for event-based tests on openssl job.

Closes #14868

14 months agoGHA/windows: re-add GnuTLS after upstream fix
Tal Regev [Thu, 29 Aug 2024 14:09:56 +0000 (17:09 +0300)] 
GHA/windows: re-add GnuTLS after upstream fix

Re-add GnuTLS. The fix was in this PR:
https://github.com/microsoft/vcpkg/pull/40739

Follow-up to a5682d9cb9da3212775bb227488a343d32552fd6 #14710
Closes #14864

14 months agoGHA/macos: make impacket found by tests
Viktor Szakats [Sun, 15 Sep 2024 00:48:18 +0000 (02:48 +0200)] 
GHA/macos: make impacket found by tests

Also move impacket installation right before the test run to avoid
spending 10s installing if the build fails.

Closes #14913

14 months agoGHA/macos: replace make with ninja for cmake builds
Viktor Szakats [Sat, 14 Sep 2024 20:29:13 +0000 (22:29 +0200)] 
GHA/macos: replace make with ninja for cmake builds

Ninja performs better than GNU Make. Also the generation step is a bit
faster. The cost is installing ninja where missing from the image, and
there is no pre-existing package install step. Otherwise the
installation is fast because the tool is tiny.

(It would probably make sense to include ninja on the runner image; it's
a near zero-cost optimization opportunity for all CI jobs using cmake.)

Speed-ups:

Build step: 3s -> 1s.
Build tests step: 37s -> 22s.

before: https://github.com/curl/curl/actions/runs/10865247916/job/30151507582?pr=14911
after: https://github.com/curl/curl/actions/runs/10865301046/job/30151610055?pr=14910

Closes #14910

14 months agoGHA/macos: tidy-ups, install impacket for cmake jobs
Viktor Szakats [Sat, 14 Sep 2024 20:03:54 +0000 (22:03 +0200)] 
GHA/macos: tidy-ups, install impacket for cmake jobs

- install impacket for cmake jobs.

- stop installing autotools for cmake jobs.
  (also saving the extra seconds necessary for impacket install.)

- delete no longer necessary openssl pkg-config patch.

- `brew unlink openssl` unconditionally. This is safe, we no longer need
  it at the default path, and the condition were never met anyway for
  a while now.

- stop installing openssl, it's there on the base image.
  (it was also missed for cmake, but that's okay)

before: https://github.com/curl/curl/actions/runs/10864438947/job/30149718802
after: https://github.com/curl/curl/actions/runs/10865247916/job/30151507582

Closes #14911

14 months agohttp: make max-filesize check not count ignored bodies
Daniel Stenberg [Fri, 13 Sep 2024 15:55:05 +0000 (17:55 +0200)] 
http: make max-filesize check not count ignored bodies

Add test 477 to verify

Reported-by: MasterInQuestion on github
Fixes #14899
Closes #14900

14 months agoFTP: partly revert eeb7c1280742f5c8fa48a4340fc1e1a1a2c7075a
Daniel Stenberg [Thu, 12 Sep 2024 06:15:14 +0000 (08:15 +0200)] 
FTP: partly revert eeb7c1280742f5c8fa48a4340fc1e1a1a2c7075a

Since ASCII transfers on FTP means sending CRLF line endings, we should
still keep converting them to LF-only on platforms where text files
typically do not use CRLF.

This also DOES NOT convert existing CRLF line endings on ASCII uploads
but only does stand-alone LF => CRLF.

Regression from eeb7c1280742f5c8 shipped in 8.10.0

Reported-by: finkjsc on github
Fixes #14873
Closes #14875

14 months agotransfer: remove redundant variable use: select_bits
Daniel Stenberg [Sat, 14 Sep 2024 08:33:50 +0000 (10:33 +0200)] 
transfer: remove redundant variable use: select_bits

Follow-up to a33bcc9b53b9d6ea9f879624e8

Pointed out by CodeSonar

Closes #14907

14 months agoRELEASE-NOTES: synced
Daniel Stenberg [Fri, 13 Sep 2024 20:50:40 +0000 (22:50 +0200)] 
RELEASE-NOTES: synced

14 months agoconnect: store connection info when really done
Stefan Eissing [Fri, 13 Sep 2024 11:12:50 +0000 (13:12 +0200)] 
connect: store connection info when really done

Output the 'Connected to...' info message when the connection has been
fully established and all information is available.

Due to our happy eyeballing, we should not emit info messages in
filters, because they may be part of an eyeballing attempt and may be
discarded later for another chain.

Closes #14897

14 months agotransfer: fix sendrecv() without interim poll
Stefan Eissing [Fri, 13 Sep 2024 16:36:53 +0000 (18:36 +0200)] 
transfer: fix sendrecv() without interim poll

There was a "clever" optimization that skipped sendrecv() handling when
the transfer's pollset was empty. This happens for paused transfers, for
example.

Unforunately, if the libcurl application never calls curl_multi_poll(),
the pollset is and will aways remain empty, prevent the transfer from
progressing.

Remove this "optimization" and always try send/receive where applicable.

Fixes #14898
Reported-by: Victor Kislov
Closes #14901

14 months agovtls/rustls: support strong CSRNG data
Daniel McCarney [Thu, 12 Sep 2024 16:38:51 +0000 (12:38 -0400)] 
vtls/rustls: support strong CSRNG data

Now that the curl rustls vtls backend is using rustls 0.14 we can
address the weak random situation by using
`rustls_default_crypto_provider_random()` to provide a `Curl_ssl`
`random` callback that fills the provided buffer with cryptographically
secure random data.

The mentions in `docs/` about weak RNG when using rustls are removed as
they are no longer applicable.

Closes #14889

14 months agovtls/rustls: simplify ciphersuite skipping
Daniel McCarney [Thu, 12 Sep 2024 16:31:59 +0000 (12:31 -0400)] 
vtls/rustls: simplify ciphersuite skipping

Now that the rustls vtls backend is using rustls 0.14 we can take
advantage of `rustls_supported_ciphersuite_protocol_version()` to skip
TLS 1.3 and TLS 1.2 ciphersuites as required without needing to
interrogate the ciphersuite names as `rustls_str`s.

Closes #14889

14 months agovtls/rustls: rustls-ffi 0.14.0 update
Daniel McCarney [Thu, 12 Sep 2024 16:18:26 +0000 (12:18 -0400)] 
vtls/rustls: rustls-ffi 0.14.0 update

* Documentation is updated to describe new required version, and to link
  to the upstream README about cryptography providers.
* GitHub workflow is updated to fetch 0.14.0.
* Breaking changes in`lib/vtls/rustls.c` are addressed:
  * The `rustls_client_config_builder_build()` function now uses an out
    parameter for the built config instead of returning it directly.
    This allows the building process to fail if the default crypto
    provider state isn't appropriate, or another error condition occurs.
  * Default ciphersuites are collected using renamed functions named to
    make it clear the ciphersuites are associated with the default
    crypto provider.
  * Customization of ciphersuites is now done via
    a `rustls_crypto_provider_builder` used to instantiate a
    `rustls_crypto_provider`. The customized provider can then can be
    used with `rustls_client_config_builder_new_custom` in place of
    providing ciphersuites directly.
  * `rustls_connection_get_negotiated_ciphersuite()` now returns the
    ciphersuite ID directly.

Closes #14889

14 months agovtls/rustls: differentiate error messages
Daniel McCarney [Tue, 6 Aug 2024 17:49:03 +0000 (13:49 -0400)] 
vtls/rustls: differentiate error messages

It's easier to diagnose a problem when there is one place where the
error message can be emitted. For that reason this commit updates two
errors that were shared between other fallible operations to use unique
messages.

Closes #14889

14 months agovtls/rustls: simplify builder cleanup
Daniel McCarney [Fri, 19 Jul 2024 16:23:18 +0000 (12:23 -0400)] 
vtls/rustls: simplify builder cleanup

Don't build `config_builder` just to free the resulting config, free the
builder directly.

When `cr_init_backend` encounters an error condition setting up the
Rustls client configuration it must do something with the
`config_builder` that was constructed earlier to avoid a memory leak.

The previous implementation preferred to use a pattern of building the
builder (thus consuming it) and then freeing the built config (to avoid
a memory leak). However, the purpose/intent is clearer when we just free
the builder directly instead of building it and freeing the result.

Closes #14889

14 months agorequest: correctly reset the eos_sent flag
Stefan Eissing [Fri, 13 Sep 2024 07:58:16 +0000 (09:58 +0200)] 
request: correctly reset the eos_sent flag

Add test cases

Bug: https://marc.info/?l=git&m=172620452502747&w=2
Reported-by: Patrick Steinhardt
Closes #14895

14 months agotests: tweak lock file handling and timers
Stefan Eissing [Mon, 9 Sep 2024 11:52:44 +0000 (13:52 +0200)] 
tests: tweak lock file handling and timers

- when server are killed by a test case, do not wait for the server lock
  file to go away. These tests are mostly about client timeouts and the
  server will hang until killed.
- when killing a server successfully, check for a remaining lock file,
  log its existence and remove it.
- lower the delay timings on SLOWDOWN by half
- add SLOWDOWNDATA server command to only slow down the FTP data bytes,
  not the control ones.
- lower some timeout values

Closes #14835

14 months agoRELEASE-NOTES: synced
Daniel Stenberg [Thu, 12 Sep 2024 18:31:41 +0000 (20:31 +0200)] 
RELEASE-NOTES: synced

14 months agoautotools: fix `--with-ca-embed` build rule
Viktor Szakats [Thu, 12 Sep 2024 13:08:05 +0000 (15:08 +0200)] 
autotools: fix `--with-ca-embed` build rule

Add missing rule dependency on the user-specified CA bundle. This fixes
including it when using the curl distro tarball, and other cases.

Also:
- fix the internal name of the CA bundle to avoid nested quotes.
  It broke broke the rule dependency for the make tool.
- exclude the generated (empty) `tool_ca_embed.c` file from the distro
  tarball.
Patch-by: Daniel Stenberg
Follow-up to 8a3740bc8e558b9a9d4a652b74cf27a0961d7010 #14059
Reported-by: rampageX on github
Fixes #14879
Closes #14882

14 months agosetopt: remove superfluous use of ternary expressions
Gabriel Marin [Thu, 12 Sep 2024 13:44:23 +0000 (16:44 +0300)] 
setopt: remove superfluous use of ternary expressions

Closes #14884

14 months agoCURLMOPT_TIMERFUNCTION.m: emphasize that only a single timer should run
Daniel Stenberg [Thu, 12 Sep 2024 15:35:58 +0000 (17:35 +0200)] 
CURLMOPT_TIMERFUNCTION.m: emphasize that only a single timer should run

Closes #14886

14 months agovtls: fix `Curl_ssl_conn_config_match` doc param
Daniel McCarney [Mon, 9 Sep 2024 18:47:09 +0000 (14:47 -0400)] 
vtls: fix `Curl_ssl_conn_config_match` doc param

The configuration data compared to `candidate` comes from `data`, not
`conn`. This commit fixes the docstring to reflect this.

Closes #14887

14 months agohttp2: when uploading data from stdin, fix eos forwarding
Stefan Eissing [Thu, 12 Sep 2024 08:03:33 +0000 (10:03 +0200)] 
http2: when uploading data from stdin, fix eos forwarding

When uploading data from stdin ('-T -'), and the EOS was only detected
on a 0-length read, the EOS was not forwarded to the filters. This led
HTTP/2 to hang on not forwarding this to the server.

Added test_07_14 to reproduce and verify.

Fixes #14870
Reported-by: nekopsykose on github
Closes #14877

14 months agocmake: ensure `CURL_USE_OPENSSL`/`USE_OPENSSL_QUIC` are set in sync
Viktor Szakats [Wed, 11 Sep 2024 21:42:43 +0000 (23:42 +0200)] 
cmake: ensure `CURL_USE_OPENSSL`/`USE_OPENSSL_QUIC` are set in sync

OpenSSL must be selected (manually or by default) and detected for
`USE_OPENSSL_QUIC=ON` to work. This was documented before this patch,
but with CMake it was possible to use `USE_OPENSSL_QUIC=ON` without
an explicit or default `CURL_USE_OPENSSL=ON`, leading to a confused
internal state.

Fix by checking the QUIC condition early, showing a warning if enabled
without OpenSSL, and ignoring QUIC in such case.

Also: Fix casing of OpenSSL in option description.

Ref: #14866
Closes #14872

14 months agoGHA/macOS: add an -e test
Daniel Stenberg [Thu, 12 Sep 2024 07:19:15 +0000 (09:19 +0200)] 
GHA/macOS: add an -e test

Adds -e to runtests for using the event-based API in the tool.

Closes #14876

14 months agotest537: cap the rlimit max this test runs
Stefan Eissing [Wed, 11 Sep 2024 10:10:10 +0000 (12:10 +0200)] 
test537: cap the rlimit max this test runs

Modern debian reports a soft limit of 134217724 which makes this test
run for minutes to allocate all file descriptors. Impose a cap of 256k,
so we do not run this tests on systems with larger rlimits.

Closes #14857

14 months agoQUIC: on connect, keep on trying on draining server
Stefan Eissing [Wed, 11 Sep 2024 11:53:44 +0000 (13:53 +0200)] 
QUIC: on connect, keep on trying on draining server

Do not give up connect on servers that are in draining state. This might
indicate the QUIC server restarting and the UDP packet routing still
hitting the instance shutting down.

Instead keep on connecting until the overall TIMEOUT fires.

Closes #14863

14 months agorustls: fixed minor logic bug in default cipher selection
Jan Venekamp [Mon, 9 Sep 2024 22:10:37 +0000 (00:10 +0200)] 
rustls: fixed minor logic bug in default cipher selection

Follow-up to 1e03d4b

Closes #14840

14 months agolib: fix AF_INET6 use outside of USE_IPV6
Harry Sintonen [Wed, 11 Sep 2024 10:10:44 +0000 (13:10 +0300)] 
lib: fix AF_INET6 use outside of USE_IPV6

Closes #14858

14 months agomulti: check that the multi handle is valid in curl_multi_assign
Daniel Stenberg [Wed, 11 Sep 2024 12:12:41 +0000 (14:12 +0200)] 
multi: check that the multi handle is valid in curl_multi_assign

By requiring that the multi handle is fine, it can detect bad usage
better and by that avoid crashes. Like in the #14860 case, which is an
application calling curl_multi_assign() with a NULL pointer multi
handle.

Reported-by: Carlo Cabrera
Fixes #14860
Closes #14862

14 months agoRELEASE-NOTES: synced
Daniel Stenberg [Wed, 11 Sep 2024 06:20:09 +0000 (08:20 +0200)] 
RELEASE-NOTES: synced

Bumped to 8.10.1 for now

14 months agoruntests: accecpt 'quictls' as OpenSSL compatible
Daniel Stenberg [Tue, 10 Sep 2024 12:46:40 +0000 (14:46 +0200)] 
runtests: accecpt 'quictls' as OpenSSL compatible

And set the "OpenSSL" feature.

Follow-up to 86d4a4124e275f355320d

Closes #14850

14 months agolibcurl-docs: CURLINFO_LOCAL_* work for QUIC as well as TCP
Daniel Stenberg [Tue, 10 Sep 2024 14:27:53 +0000 (16:27 +0200)] 
libcurl-docs: CURLINFO_LOCAL_* work for QUIC as well as TCP

Also, CURLOPT_TCP_FASTOPEN is for TCP only.

Closes #14852

14 months agoRELEASE-NOTES: synced curl-8_10_0
Daniel Stenberg [Wed, 11 Sep 2024 05:36:22 +0000 (07:36 +0200)] 
RELEASE-NOTES: synced

14 months agoTHANKS: contributors from 8.10.0
Daniel Stenberg [Wed, 11 Sep 2024 05:36:22 +0000 (07:36 +0200)] 
THANKS: contributors from 8.10.0

14 months agoGHA/windows: raise test run timeouts
Viktor Szakats [Tue, 10 Sep 2024 13:11:40 +0000 (15:11 +0200)] 
GHA/windows: raise test run timeouts

Give more time for recently enabled TLS tests to complete.

Follow-up to bc72a78a11764558639131d51fa8e7c81ee1e113 #14488
Ref: #14849
Closes #14851

14 months agoCURLOPT_COOKIE.md: tiny language edit
Daniel Stenberg [Tue, 10 Sep 2024 12:22:10 +0000 (14:22 +0200)] 
CURLOPT_COOKIE.md: tiny language edit

14 months agoNTLM_WB: delete remains in tests, docs updates
Viktor Szakats [Mon, 9 Sep 2024 09:10:19 +0000 (11:10 +0200)] 
NTLM_WB: delete remains in tests, docs updates

Also update more docs to reflect the removal of NTLM_WB.

Follow-up to 50def7c881ba560ab6e0235990e8f07fa69f4bc8 #13249
Closes #14832

14 months agocd2nroff: only require "added-in" for source "libcurl"
Daniel Stenberg [Tue, 10 Sep 2024 08:21:08 +0000 (10:21 +0200)] 
cd2nroff: only require "added-in" for source "libcurl"

To allow this script to be used by trurl easier.

Closes #14844

14 months agoCURLOPT_*-docs: provide additional details
Daniel Stenberg [Tue, 10 Sep 2024 09:37:27 +0000 (11:37 +0200)] 
CURLOPT_*-docs: provide additional details

Went through CURLOPTTYPE_STRINGPOINT and CURLOPTTYPE_SLISTPOINT options
and clarified:

- what happens when setting the option *again*

- setting to NULL disables/restores to default

- libcurl does not copy the slist for options using a such

Closes #14846

14 months agotests: ignore the tests/buildinfo.txt file generated
Stefan Eissing [Tue, 10 Sep 2024 11:26:53 +0000 (13:26 +0200)] 
tests: ignore the tests/buildinfo.txt file generated

Closes #14847