Commit Graph

33601 Commits

Author SHA1 Message Date
Viktor Szakats
0af017d66d
GHA/non-native: install Perl for FreeBSD cmake jobs
It was implicitly installed for autotools jobs. Install it explicitly
for cmake ones.

Closes #14928
2024-09-16 09:44:16 +02:00
Viktor Szakats
2b6bdb41ce
cmake: fix MSH3 to appear on the feature list
Closes #14927
2024-09-16 09:37:19 +02:00
Viktor Szakats
71a83b8789
GHA/non-native: enable SFTP/SCP tests on FreeBSD
It's working now. Possibly fixed in the runner env?

Closes #14920
2024-09-16 01:02:55 +02:00
Viktor Szakats
0ba70dd13c
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
2024-09-15 16:33:24 +02:00
Viktor Szakats
5f93cad086
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
2024-09-15 13:57:21 +02:00
Viktor Szakats
2e76e1f7fc
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
2024-09-15 13:57:21 +02:00
Viktor Szakats
8f5d73af12
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
2024-09-15 13:57:21 +02:00
Viktor Szakats
c3a7145a4f
GHA/macos: tidy-up
- drop redundant `brew autoconf`.
  It's automatically installed via `automake`.
- whitespace
2024-09-15 13:57:20 +02:00
Tal Regev
65168b8eb9
GHA/windows: use libuv for event-based tests on openssl job
Use libuv for event-based tests on openssl job.

Closes #14868
2024-09-15 13:57:20 +02:00
Tal Regev
09b21e4755
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 a5682d9cb9 #14710
Closes #14864
2024-09-15 13:57:20 +02:00
Viktor Szakats
8709404fe9
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
2024-09-15 03:12:48 +02:00
Viktor Szakats
c89cc09ab0
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
2024-09-15 03:09:04 +02:00
Viktor Szakats
51fc89965b
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
2024-09-15 02:34:17 +02:00
Daniel Stenberg
aef384a7df
http: make max-filesize check not count ignored bodies
Add test 477 to verify

Reported-by: MasterInQuestion on github
Fixes #14899
Closes #14900
2024-09-14 22:51:57 +02:00
Daniel Stenberg
7eda757d99
FTP: partly revert eeb7c12807
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 eeb7c12807 shipped in 8.10.0

Reported-by: finkjsc on github
Fixes #14873
Closes #14875
2024-09-14 17:23:04 +02:00
Daniel Stenberg
2b652b8634
transfer: remove redundant variable use: select_bits
Follow-up to a33bcc9b53

Pointed out by CodeSonar

Closes #14907
2024-09-14 17:20:27 +02:00
Daniel Stenberg
3e36334af6
RELEASE-NOTES: synced 2024-09-13 22:50:40 +02:00
Stefan Eissing
50166c0de8
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
2024-09-13 22:27:11 +02:00
Stefan Eissing
a33bcc9b53
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
2024-09-13 22:21:33 +02:00
Daniel McCarney
8972845123
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
2024-09-13 14:11:56 +02:00
Daniel McCarney
6d9b40d6a4
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
2024-09-13 14:11:52 +02:00
Daniel McCarney
f09adc3ad1
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
2024-09-13 14:11:49 +02:00
Daniel McCarney
65b8d89463
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
2024-09-13 14:11:42 +02:00
Daniel McCarney
d38458d823
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
2024-09-13 14:11:26 +02:00
Stefan Eissing
bef0acaf21
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
2024-09-13 13:28:10 +02:00
Stefan Eissing
e70c22b622
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
2024-09-13 09:46:25 +02:00
Daniel Stenberg
8ca6030839
RELEASE-NOTES: synced 2024-09-12 20:31:41 +02:00
Viktor Szakats
28fa417bf0
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 8a3740bc8e #14059
Reported-by: rampageX on github
Fixes #14879
Closes #14882
2024-09-12 19:58:14 +02:00
Gabriel Marin
79f0007c25
setopt: remove superfluous use of ternary expressions
Closes #14884
2024-09-12 19:12:06 +02:00
Daniel Stenberg
381de75ce8
CURLMOPT_TIMERFUNCTION.m: emphasize that only a single timer should run
Closes #14886
2024-09-12 19:08:01 +02:00
Daniel McCarney
61e48b4df1
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
2024-09-12 19:06:34 +02:00
Stefan Eissing
70d3a9b6aa
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
2024-09-12 13:46:38 +02:00
Viktor Szakats
9dc0770e2c
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
2024-09-12 12:53:50 +02:00
Daniel Stenberg
b29caf0ba2
GHA/macOS: add an -e test
Adds -e to runtests for using the event-based API in the tool.

Closes #14876
2024-09-12 11:26:33 +02:00
Stefan Eissing
a610bb8d92
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
2024-09-12 08:45:50 +02:00
Stefan Eissing
283af039c8
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
2024-09-12 08:24:10 +02:00
Jan Venekamp
0ca15307a3
rustls: fixed minor logic bug in default cipher selection
Follow-up to 1e03d4b

Closes #14840
2024-09-11 23:17:31 +02:00
Harry Sintonen
6a9f3764f1
lib: fix AF_INET6 use outside of USE_IPV6
Closes #14858
2024-09-11 23:12:22 +02:00
Daniel Stenberg
48f61e781a
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
2024-09-11 23:04:11 +02:00
Daniel Stenberg
30865e09b7
RELEASE-NOTES: synced
Bumped to 8.10.1 for now
2024-09-11 08:20:09 +02:00
Daniel Stenberg
31be4d5bf0
runtests: accecpt 'quictls' as OpenSSL compatible
And set the "OpenSSL" feature.

Follow-up to 86d4a4124e

Closes #14850
2024-09-11 08:17:16 +02:00
Daniel Stenberg
28ca199d89
libcurl-docs: CURLINFO_LOCAL_* work for QUIC as well as TCP
Also, CURLOPT_TCP_FASTOPEN is for TCP only.

Closes #14852
2024-09-11 08:16:28 +02:00
Daniel Stenberg
a3bd1dda12
RELEASE-NOTES: synced 2024-09-11 07:36:22 +02:00
Daniel Stenberg
5e225c84a5
THANKS: contributors from 8.10.0 2024-09-11 07:36:22 +02:00
Viktor Szakats
813995bb17
GHA/windows: raise test run timeouts
Give more time for recently enabled TLS tests to complete.

Follow-up to bc72a78a11 #14488
Ref: #14849
Closes #14851
2024-09-10 15:55:35 +02:00
Daniel Stenberg
3aef8b97b3
CURLOPT_COOKIE.md: tiny language edit 2024-09-10 14:22:10 +02:00
Viktor Szakats
805bbf7c55
NTLM_WB: delete remains in tests, docs updates
Also update more docs to reflect the removal of NTLM_WB.

Follow-up to 50def7c881 #13249
Closes #14832
2024-09-10 14:13:36 +02:00
Daniel Stenberg
7020bc9c4a
cd2nroff: only require "added-in" for source "libcurl"
To allow this script to be used by trurl easier.

Closes #14844
2024-09-10 13:49:49 +02:00
Daniel Stenberg
c4ab33370a
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
2024-09-10 13:48:42 +02:00
Stefan Eissing
fc1c326ab4
tests: ignore the tests/buildinfo.txt file generated
Closes #14847
2024-09-10 13:48:04 +02:00