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

13 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

13 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

13 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

13 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)

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 months agoCURLOPT_COOKIE.md: this cookie gets appended to the others
Daniel Stenberg [Mon, 9 Sep 2024 21:48:19 +0000 (23:48 +0200)] 
CURLOPT_COOKIE.md: this cookie gets appended to the others

... so it adds the risk of making the header too long. Clarify this
better.

Also: remove the PSL mention from here since it is not really relevant
for this option as this option is for specific *outgoing* cookies only.

Reported-by: Hiroki Kurosawa
Closes #14839

13 months agoGHA/linux-old: add an autoconf/automake build
Dan Fandrich [Fri, 6 Sep 2024 17:29:58 +0000 (10:29 -0700)] 
GHA/linux-old: add an autoconf/automake build

This verifies that using older autotools still works. The results of the
autoconf build should end up being identical to the second of the two
cmake builds (the difference in the platform string notwithstanding).

Closes #14816

13 months agoserver/getpart: delete unused code
Viktor Szakats [Sun, 8 Sep 2024 18:28:59 +0000 (20:28 +0200)] 
server/getpart: delete unused code

Follow-up to 2610142139d14265ed9acf9ed83cdf73d6bb4d05 #8378
Closes #14829

13 months agolib: enable strerror and strncpy checksrc warnings in subdirs
Daniel Stenberg [Mon, 9 Sep 2024 11:49:53 +0000 (13:49 +0200)] 
lib: enable strerror and strncpy checksrc warnings in subdirs

Closes #14834

13 months agocontent_encoding: avoid getting all encodings unless necessary
Daniel Stenberg [Mon, 9 Sep 2024 07:15:56 +0000 (09:15 +0200)] 
content_encoding: avoid getting all encodings unless necessary

The error_do_write() function may very well return witout needing the
listing of all encoding types so postpone that call until it is needed.

Closes #14831

13 months agounit1398: test maximum input parameters/output segments
Daniel Stenberg [Mon, 9 Sep 2024 11:16:13 +0000 (13:16 +0200)] 
unit1398: test maximum input parameters/output segments

...for the mprintf() code

Closes #14833

13 months agochecksrc: add STRNCPY as an opt-in rule to detect and error on strncpy
Daniel Stenberg [Mon, 9 Sep 2024 08:15:49 +0000 (10:15 +0200)] 
checksrc: add STRNCPY as an opt-in rule to detect and error on strncpy

make "lib/.checksrc" enable it

Closes #14830

13 months agolib: remove the final strncpy() calls
Daniel Stenberg [Mon, 9 Sep 2024 07:09:46 +0000 (09:09 +0200)] 
lib: remove the final strncpy() calls

wolfssl: use strcpy() as the target buffer is > 40 bytes

gethostname: return failure if the buffer is too small instead

Closes #14830

13 months agoasyn-thread: stop using GetAddrInfoExW on Windows
Jay Satiro [Thu, 5 Sep 2024 06:18:25 +0000 (02:18 -0400)] 
asyn-thread: stop using GetAddrInfoExW on Windows

- For the threaded resolver backend on Windows, revert back to
  exclusively use the threaded resolver with libcurl-owned threading
  instead of GetAddrInfoExW with Windows-owned threading.

Winsock (the Windows sockets library) has a bug where it does not wait
for all of the name resolver threads it is managing to terminate before
returning from WSACleanup. The threads continue to run and may cause a
crash.

This commit is effectively a revert of several commits that encompass
all GetAddrInfoExW code in libcurl. A manual review of merge conflicts
was used to resolve minor changes that had modified the code for
aesthetic or build reasons in other commits.

Prior to this change if libcurl was built with the threaded resolver
backend for Windows, and Windows 8 or later was the operating system at
runtime, and the caller was not impersonating another user, then libcurl
would use GetAddrInfoExW to handle asynchronous name lookups.

GetAddrInfoExW support was added in a6bbc87f, which preceded 8.6.0, and
prior to that the threaded resolver backend used libcurl-owned threading
exclusively on Windows.

Reported-by: IonuČ›-Francisc Oancea
Reported-by: Razvan Pricope
Ref: https://developercommunity.visualstudio.com/t/ASAN:-heap-use-after-free-in-NdrFullPoin/10654169

Fixes https://github.com/curl/curl/issues/13509#issuecomment-2225338110
Closes https://github.com/curl/curl/pull/14794

---

Revert "asyn-thread: avoid using GetAddrInfoExW with impersonation"

This reverts commit 0caadc1f24d20514eed2bf6e5ef0adc140f122c3.

Conflicts:
lib/system_win32.c

--

Revert "asyn-thread: fix curl_global_cleanup crash in Windows"

This reverts commit 428579f5d136fd473e97fe089c42ffee55b72a8f.

--

Revert "system_win32: fix a function pointer assignment warning"

This reverts commit 26f002e02ef1142a432c8dc087bd27de71ce38bf.

--

Revert "asyn-thread: use GetAddrInfoExW on >= Windows 8"

This reverts commit a6bbc87f9e9ffb46a1801dfb983e7534825ed56b.

Conflicts:
lib/asyn-thread.c
lib/system_win32.c

--

14 months agodoh: remove redundant checks
Daniel Stenberg [Sat, 7 Sep 2024 14:10:23 +0000 (16:10 +0200)] 
doh: remove redundant checks

Pointed out by CodeSonar

Closes #14823

14 months agomaketgz: fix RELEASE-TOOLS.md for daily tarballs
Dan Fandrich [Sat, 7 Sep 2024 01:17:19 +0000 (18:17 -0700)] 
maketgz: fix RELEASE-TOOLS.md for daily tarballs

The daily snapshots have no associated git tag, so provide a commit hash
instead in these cases. Fix the dpkg detection since the shell would
exit immediately without showing an error message if it weren't found.

Closes #14820

14 months agoMakefile.mk: update to use Markdown sources for manual
Viktor Szakats [Fri, 6 Sep 2024 09:36:46 +0000 (11:36 +0200)] 
Makefile.mk: update to use Markdown sources for manual

Closes #14813

14 months agoautotools: fix MS-DOS builds
Viktor Szakats [Fri, 6 Sep 2024 13:14:26 +0000 (15:14 +0200)] 
autotools: fix MS-DOS builds

- disable threaded resolver by default.
- fix forming WATT path. Requires `WATT_PATH` env.

Closes #14814

14 months agobuild: drop unused `NROFF` reference
Viktor Szakats [Fri, 6 Sep 2024 09:02:22 +0000 (11:02 +0200)] 
build: drop unused `NROFF` reference

Closes #14812

14 months agoMakefile.dist: fix `ca-firefox` target
Viktor Szakats [Fri, 6 Sep 2024 00:10:35 +0000 (02:10 +0200)] 
Makefile.dist: fix `ca-firefox` target

Follow-up to 8e22fc68e7dda43e9f0b6857b1057d0e9131a4b2 #8625

Closes #14804

14 months agocmake: fix to show features/protocols with `CURL_DISABLE_INSTALL=ON`
Viktor Szakats [Thu, 5 Sep 2024 23:42:47 +0000 (01:42 +0200)] 
cmake: fix to show features/protocols with `CURL_DISABLE_INSTALL=ON`

Follow-up to aace27b0965c10394544d1dacc9c2cb2fe0de3d3 #12287

Closes #14803

14 months agobuild: generate `buildinfo.txt` for test logs
Viktor Szakats [Thu, 5 Sep 2024 21:23:47 +0000 (23:23 +0200)] 
build: generate `buildinfo.txt` for test logs

Also:
- read `buildinfo.txt` from `runtests.pl` and dump it to the log.
- cmake: show `CROSS` target flag for cross-builds.
- cmake: add logic to detect arguments passed via the command-line.

It is meant to help filling out missing datapoints in the testclutch
matrix.

Closes #14802

14 months agoCI: update names of jobs that are now building tests [ci skip]
Viktor Szakats [Fri, 6 Sep 2024 15:14:26 +0000 (17:14 +0200)] 
CI: update names of jobs that are now building tests [ci skip]

Follow-up to d620ec67913b2c4be25e7d72f1933f0a8a3e0a2e #14700

14 months ago.dcignore: remove
Daniel Stenberg [Fri, 6 Sep 2024 08:58:47 +0000 (10:58 +0200)] 
.dcignore: remove

This was a config file for deepcode.ai, a static code analyzer that we
have not used for ages.

Closes #14811

14 months agopop3: fix multi-line with LIST arg
Stefan Eissing [Fri, 6 Sep 2024 07:43:38 +0000 (09:43 +0200)] 
pop3: fix multi-line with LIST arg

The POP3 LIST command is not multi-line when having an argument. Fix the
definition to correct the behaviour.

Reported-by: ralfjunker on github
Fixes #14801
Closes #14808

14 months agodoh: cleanups
Stefan Eissing [Wed, 4 Sep 2024 11:36:01 +0000 (13:36 +0200)] 
doh: cleanups

Mostly cleanup on identifiers of DoH code.
Always use 'Curl_doh_cleanup()' for releasing resources.

More concise and telling names (ymmv):

* prefix all static functions with 'doh_' for unity builds
* doh_encode -> doh_req_encode
* doh_decode -> doh_resp_decode
* struct dohdata -> struct doh_probes
* probe's 'serverdoh' -> 'resp_body'
* probe's 'dohbuffer' -> 'req_body'
* probe's 'headers' -> 'req_hds'
* 'dohprobe()' -> doh_run_probe()'
* 'DOH_PROBE_SLOTS' -> 'DOH_SLOT_COUNT'
* 'DOH_PROBE_SLOT_IPADDR_V4' -> 'DOH_SLOT_IPV4'
* 'DOH_PROBE_SLOT_IPADDR_V6' -> 'DOH_SLOT_IPV6'
* 'DOH_PROBE_SLOT_HTTPS' -> 'DOH_SLOT_HTTPS_RR'

Closes #14783

14 months agofirefox-db2pem: mention what "certutil" the script uses
Daniel Stenberg [Fri, 6 Sep 2024 06:28:42 +0000 (08:28 +0200)] 
firefox-db2pem: mention what "certutil" the script uses

... and the Debian package that provides it.

Closes #14806

14 months agoscripts/delta: output bugfixes/day
Daniel Stenberg [Fri, 6 Sep 2024 06:47:06 +0000 (08:47 +0200)] 
scripts/delta: output bugfixes/day

14 months agoRELEASE-NOTES: synced
Daniel Stenberg [Fri, 6 Sep 2024 06:42:32 +0000 (08:42 +0200)] 
RELEASE-NOTES: synced

14 months agoGHA/distcheck: keep upload artifacts for one day only
Daniel Stenberg [Thu, 5 Sep 2024 13:58:45 +0000 (15:58 +0200)] 
GHA/distcheck: keep upload artifacts for one day only

The uploads are only used as a cache mechanism between jobs to save them
from having to re-run maketgz multiple times, so there is no need to
save the artifact longer than this.

Closes #14793

14 months agoCURLMOPT_SOCKETFUNCTION.md: expand on the easy argument
Daniel Stenberg [Thu, 5 Sep 2024 14:17:50 +0000 (16:17 +0200)] 
CURLMOPT_SOCKETFUNCTION.md: expand on the easy argument

Since recent changes makes it more likely to be an internal handle that
shows up and some users have been surprised by this.

Ref: #14792
Closes #14795

14 months agomaketgz: move from / into scripts
Daniel Stenberg [Thu, 5 Sep 2024 14:31:38 +0000 (16:31 +0200)] 
maketgz: move from / into scripts

Closes #14797

14 months agolibcurl.def: move from / into lib
Daniel Stenberg [Thu, 5 Sep 2024 14:24:08 +0000 (16:24 +0200)] 
libcurl.def: move from / into lib

It is meant for the library, it belongs in lib/

Closes #14796

14 months agosystem_win32: fix typo
Jay Satiro [Thu, 5 Sep 2024 06:30:07 +0000 (02:30 -0400)] 
system_win32: fix typo

14 months agoGHA/distcheck:: bump actions/upload-artifact from 4.3.6 to 4.4.0
dependabot[bot] [Mon, 2 Sep 2024 14:08:33 +0000 (14:08 +0000)] 
GHA/distcheck:: bump actions/upload-artifact from 4.3.6 to 4.4.0

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.3.6 to 4.4.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/834a144ee995460fba8ed112a2fc961b36a5ec5a...50769540e7f4bd5e21e526ee35c689e35e0d6874)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Closes #14759

14 months agoDockerfile: Update debian:bookworm-slim Docker digest to 903d322
renovate[bot] [Wed, 4 Sep 2024 22:57:14 +0000 (22:57 +0000)] 
Dockerfile: Update debian:bookworm-slim Docker digest to 903d322

Closes #14788

14 months agollist: only provide Curl_llist_tail in unit test builds
Daniel Stenberg [Thu, 5 Sep 2024 09:45:21 +0000 (11:45 +0200)] 
llist: only provide Curl_llist_tail in unit test builds

... since it is not used otherwsie. Also fix Curl_node_prev to have the
same status.

Closes #14790

14 months agoGHA/linux-old: split test step into build and run
Viktor Szakats [Thu, 5 Sep 2024 10:05:02 +0000 (12:05 +0200)] 
GHA/linux-old: split test step into build and run

To see how much time each takes.

Closes #14791

14 months agocf-socket: fix listen pollset for FTP active mode
Stefan Eissing [Wed, 4 Sep 2024 14:06:16 +0000 (16:06 +0200)] 
cf-socket: fix listen pollset for FTP active mode

Follow-up to a07ba37b5e88a89bf4bcc6b0c927f7a42d7ea4f2 which did not
solve the issue of corrent polling for FTP active data connections.

Added test cases for active up-/download.

Closes #14786

14 months agosmb: convert superflous assign into assert
Daniel Stenberg [Wed, 4 Sep 2024 12:22:23 +0000 (14:22 +0200)] 
smb: convert superflous assign into assert

Since the value is already supposed to be correct, verify that with and
assert instead of doing an assign that is not needed.

Bonus: remove unnecessary clearing of data

Closes #14784

14 months agoschannel: avoid malloc for CAinfo_blob_digest
Daniel Stenberg [Wed, 4 Sep 2024 08:07:08 +0000 (10:07 +0200)] 
schannel: avoid malloc for CAinfo_blob_digest

...it can just as well be part of the struct always.

Closes #14777

14 months agosrc: namespace symbols clashing with lib
Viktor Szakats [Tue, 3 Sep 2024 19:22:04 +0000 (21:22 +0200)] 
src: namespace symbols clashing with lib

Before this patch `lib/http.h` and `src/tool_sdecls.h` both declared
`HTTPREQ_*` enums.

Rename `src` ones to have distinct names.

They are not included in the same code for now, but this may change when
bundling unit/libtests into single programs.

Closes #14785

14 months agoKNOWN_BUGS: cleanup
Daniel Stenberg [Wed, 4 Sep 2024 07:43:46 +0000 (09:43 +0200)] 
KNOWN_BUGS: cleanup

- Move all Windows unicode issues into the single "bug", as they are all
  at least semi-related

- Removed ancient issues that are not relevant anymore

Closes #14775

14 months agoopenssl: certinfo errors now fail correctly
Daniel Stenberg [Wed, 4 Sep 2024 09:11:06 +0000 (11:11 +0200)] 
openssl: certinfo errors now fail correctly

If there is a (memory) error when creating the certinfo data, the code
would previously continue which could lead to a partial/broken response.
Now, the first error aborts and cleans up the entire thing.

A certinfo "collection" error is however still not considered an error
big enough to stop the handshake.

Bonus 1: made two functions static (and removed the Curl_ prefix) that
were not used outside of openssl.c

Bonus 2: removed the unused function Curl_ossl_set_client_cert

Closes #14780

14 months agolib: make SSPI global symbols use Curl_ prefix
Daniel Stenberg [Wed, 4 Sep 2024 08:24:23 +0000 (10:24 +0200)] 
lib: make SSPI global symbols use Curl_ prefix

Do not pollute the namespace.

Closes #14776

14 months agocmake: restore variable names `CURL_CA_BUNDLE_SET`/`CURL_CA_PATH_SET`
Viktor Szakats [Wed, 4 Sep 2024 08:54:36 +0000 (10:54 +0200)] 
cmake: restore variable names `CURL_CA_BUNDLE_SET`/`CURL_CA_PATH_SET`

They were renamed recently as internal variables, but they are both
cached, so let's keep the original names for consistency and
compatibility.

Partial revert of c2889a7b4180fc963ae30811f59ab547b6eb03cd #14388
Tested via #14778

14 months agodocs: document the (weak) random value situation in rustls builds
Daniel Stenberg [Tue, 3 Sep 2024 14:09:40 +0000 (16:09 +0200)] 
docs: document the (weak) random value situation in rustls builds

Closes #14770