Commit Graph

33539 Commits

Author SHA1 Message Date
Viktor Szakats
9b0c0d6ade
tests: let openssl generate random cert serials
Generate the certificate serial numbers automatically instead of doing
from shell (or Perl earlier).

Fixes intermittent CI failures due to the shell-based random generator
generating the same serial number twice:
```
$ openssl ca -config EdelCurlRoot-ca.cnf -revoke Server-localhost0h-sv.crt
Using configuration from EdelCurlRoot-ca.cnf
ERROR:Already revoked, serial number 66FDB23A
make: *** [../../../tests/certs/Server-localhost0h-sv.pem] Error 1
```
https://github.com/curl/curl/actions/runs/11151401083/job/30994755798?pr=15128#step:10:498

Follow-up to fa461b4eff #14486
Follow-up to fa69b41c77 #13307
Closes #15129
2024-10-03 01:17:40 +02:00
Viktor Szakats
fe0ee11678
GHA/linux: fix wolfSSL version in cache key
This needs the version in the GHA context, so move those back
from external file `VERSIONS`.

Also move back `VERSIONS` content in it previous place to
`.circleci/config.yml`. Update renovate config.

Renovate bot should keep updating the wolfSSL version, but from now on
not in one, but two files.

Follow-up to 820afa2b7c #15030
Follow-up to 73a3602120
Closes #15130
2024-10-03 01:17:40 +02:00
Viktor Szakats
51d4b19cec
GHA/linux: drop duplicate names from cache keys
Closes #15131
2024-10-03 01:17:39 +02:00
Viktor Szakats
0acf0bceda
tests: simplify pathhelp.pm, avoid using external tools
Instead of calling the shell and external tools, rely on Perl functions
like `Cwd::getcwd()`, `Cwd::abs_path()`, `Cygwin::posix_to_win_path()`,
`Cygwin::win_to_posix_path()` to retrieve the current directory and
convert between POSIX and Windows formats.

This adds native Windows Perl support, avoids most failure modes and
makes format guessing and other internal functions unnecessary.

Also:
- delete unused `sys_native_path()`.
- delete redundant `normalize_path()` because Perl `abs_path()` already
  does it.

Cherry-picked from #14949
Closes #15111
2024-10-02 15:03:55 +02:00
Daniel Stenberg
6fd5a9777a
wolfssl: convert malloc + memcpys to dynbuf for cipher string
Closes #15124
2024-10-02 14:43:31 +02:00
Daniel Stenberg
b5d453effa
lib: avoid assigning 'result' temporarily
Closes #15122
2024-10-02 14:38:28 +02:00
Daniel Stenberg
23386872d1
multi: make multi_handle_timeout use the connect timeout
For all states before MSTATE_DO the connect timeout needs to be
considered.

Regression since #13371 (be659030ba) shipped in 8.8.0

Reported-by: Deniz Sökmen
Fixes #15100
Closes #15119
2024-10-02 14:37:21 +02:00
Daniel Stenberg
8eb983318a
GHA/labeler: adjust some docs patterns
Follow-up to 20aa8d8f31 and 0e06603b23 that moved and removed some
docs.

Closes #15121
2024-10-02 14:36:12 +02:00
Daniel Stenberg
39697dead3
tests: remove debug requirement on 38 tests
For all tests using -O that were previously relying on a debug build and
the CURL_TESTDIR environment variable, use the plain --output-dir option
instead so that they can run proper in non-debug builds.

Closes #15114
2024-10-02 08:13:55 +02:00
Daniel Stenberg
8c76ae317f
vtls: skip a "useless assignment"
Pointed out by CodeSonar

Closes #15117
2024-10-02 08:05:44 +02:00
Daniel Stenberg
b0c82239c2
tool: support --show-headers AND --remote-header-name
By keeping the headers in memory until we know the target file name,
then output them all.

Previously this option combination would cause an error.

Add test 1310 and 1492 to verify. Adjusted test 1460 to work in the new
conditions.

Closes #15110
2024-10-02 08:04:33 +02:00
Viktor Szakats
bc6072d245
GHA/macos: update comment with new Xcode default for macos-13 [ci skip] 2024-10-02 02:16:59 +02:00
Viktor Szakats
96fc2b88f3
GHA/macos: drop unsupported Xcode version references
Closes #15115
2024-10-02 01:52:36 +02:00
Viktor Szakats
bf44536e23
GHA/macos: delete macos-12 jobs, update matrix for macos-14
- Days of `macos-12` are numbered:
  https://github.com/actions/runner-images/issues/10721
  Drop 5 affected jobs, replaced by `macos-15` ones added earlier today.

- Drop Xcode 14 and 16 from `macos-14` jobs.
  Following up upstream announcement:
  https://github.com/actions/runner-images/issues/10703
  (No active jobs are affected by this.)

Follow-up to 4b4ff444dd #15108
Closes #15113
2024-10-01 23:02:34 +02:00
Viktor Szakats
4b4ff444dd
GHA/macos: Sequoia chores, fixes for llvm 18
- add `macos-15` Sequoia to combinations jobs.

- add `llvm@18` to combinations jobs for `macos-15`.

- fix cmake, autotools configurations for llvm 18.
  It requires `CMAKE_OSX_SYSROOT` for cmake, and `--sysroot` within `CC`
  for both cmake and autotools.
  (Also add `--target` to `CC` for all jobs.)

- stop `brew update` on `macos-12`.
  `macos-12` is Monterey. Homebrew stopped providing binaries for it
  after the latest macOS was out. It means newer versions of packages
  have to be built from source, which is slow and undesired. Try to
  avoid it using this trick. If it doesn't work, `macos-12` jobs will
  have to be dropped.

- update Xcode support matrix.

Ref: https://github.com/actions/runner-images/blob/main/images/macos/macos-15-arm64-Readme.md
Closes #15108
2024-10-01 19:27:56 +02:00
Viktor Szakats
aa092012bd
tests: fixup checkcmd PATH on non-unixy platforms
Do not add unixy system directories to `PATH` when looking up commands
on Windows, MS-DOS or OS/2.

Cherry-picked from #14949
Closes #15106
2024-10-01 16:05:13 +02:00
Viktor Szakats
f88fb1c83e
tests: fix shell quoting on native Windows Perl
Cherry-picked from #14949
Closes #15105
2024-10-01 16:05:10 +02:00
Viktor Szakats
9c1ab7fa4a
tests: fix %POSIX_PWD on native Windows Perl
Though this variable isn't used in any of the current tests.

Cherry-picked from #14949
Closes #15104
2024-10-01 16:05:07 +02:00
Viktor Szakats
ca9106c1e9
tests: replace %PWD with %SSH_PWD in SCP/SFTP tests
Cherry-picked from #14949
Closes #15103
2024-10-01 16:04:51 +02:00
Daniel Stenberg
10ddf4c66a
RELEASE-NOTES: synced 2024-10-01 15:48:16 +02:00
dependabot[bot]
303c0cf74b
CI: bump actions/checkout from 4.1.7 to 4.2.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.7 to 4.2.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](692973e3d9...d632683dd7)

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

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

Closes #15095
2024-10-01 15:21:36 +02:00
dependabot[bot]
43cbe53eab
CI: bump github/codeql-action from 3.26.8 to 3.26.10
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.26.8 to 3.26.10.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](294a9d9291...e2b3eafc8d)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Closes #15094
2024-10-01 15:20:17 +02:00
Daniel Stenberg
85a81d2789
docs/libcurl: expand multi documentation
curl_multi_init - mention the caches held by the handle

curl_multi_cleanup - mention that the socket callback might be invoked
by this function

Closes #15109
2024-10-01 15:17:17 +02:00
Daniel Stenberg
c72cefea0f
select: use poll() if existing, avoid poll() with no sockets
poll() on macOS 10.12 was deemed broken in 2016 when we discovered that
it misbehaves when provided with no sockets to wait for. The
HAVE_POLL_FINE is used to mark a poll() implementation that behaves
correctly: it *should* still wait the timeout time.

curl has therefore opted to use select() on Apple operating systems ever
since. To avoid the risk that this or other breakage cause problems.

However, using select() internally is also bad because it suffers from
problems when using file descriptors beyond 1024.

This change makes poll() used if it is present, but if there is no
sockets to wait for it avoids using poll() and instead falls back to
select() - but without any sockets to wait for there is no 1024 problem.

This removes all previous special-handling involving HAVE_POLL_FINE.

ref: https://daniel.haxx.se/blog/2016/10/11/poll-on-mac-10-12-is-broken/

Closes #15096
2024-10-01 15:11:50 +02:00
Stefan Eissing
72d2090fc2
ftp: fix 0-length last write on upload from stdin
When uploading FTP with unknown length, we write a last 0-length chunk
with the EOS flag set. OpenSSL's SSL_write() errors on such a write.
Skip writing 0-length data to TLS backends instead.

Add test in FTPS for such uploads to verify.

Fixes #15101
Reported-by: Denis Goleshchikhin
Closes #15102
2024-10-01 13:57:12 +02:00
Viktor Szakats
68c358619f
tests: replace hard-coded /dev/null with variable
- add variable for the null device filename and use that in Perl code.
- initialize this variable with `NUL` on native Windows.
- add `%DEV_NULL` variable and use it in tests.

Fixes `The system cannot find the path specified.` messages seen when
running `runtests.pl` with native Windows Perl.

Also adjust code to not break mcedit syntax highlighting.

Cherry-picked from #14949
Closes #15098
2024-10-01 12:07:19 +02:00
Viktor Szakats
31a29fc6bd
tests: add and use %PERL variable to refer to the Perl binary
To ensure Perl invocations within tests call the same Perl binary used
for running the tests, as specified or auto-detected via `PERL` env
(autotools) or `PERL_EXECUTABLE` setting (cmake). Instead of the first
`perl` executable found in `PATH`.)

Cherry-picked from #14949
Closes #15097
2024-10-01 12:04:50 +02:00
Viktor Szakats
f6cb707b6a
tests: replace %PWD with %FILE_PWD for file://
Before this patch not all tests used `%FILE_PWD` with the `file://`
protocol.

Keep `%PWD` for test1145, to keep it fail on Windows like the test
expects.

Cherry-picked from #14949

Closes #15090
2024-09-30 23:48:00 +02:00
Viktor Szakats
18143579ba
cmake: readd generate-curl.1 dependency for src just in case
Trying to fix intermittent build failures with MSVC 2008:
```
unity_0.obj : error LNK2019: unresolved external symbol _showhelp referenced in function _tool_help
unity_0.obj : error LNK2019: unresolved external symbol _hugehelp referenced in function _operate
```
https://ci.appveyor.com/project/curlorg/curl/builds/50700212/job/h3ekljnbccosej5k#L154
https://ci.appveyor.com/project/curlorg/curl/builds/50701615/job/61mkg9og1eooqli8#L155

Follow-up to 496da69aa0 #14883

Closes #15088
2024-09-30 14:11:23 +02:00
Viktor Szakats
212ff19b60
runtests: drop unused code for old/classic-mingw support
Follow-up to 38029101e2 #11625

Closes #15087
2024-09-30 14:11:23 +02:00
Viktor Szakats
aed3f02317
GHA: move Cygwin jobs back into the Windows workflow
Cygwin jobs took 30 minutes and was the reason for moving them to their
own workflow. After recent changes, they finish in 8 minutes, which is
on par or lower than the longest Windows jobs. Thus, Cygwin can now be
moved back to the Windows workflow without causing extra wait for all
the workflow jobs to complete (and allowing a manual retry for the
remaining flaky jobs).

Notice that Cygwin still uses the cygwin/cygwin-install-action action to
install Cygwin itself. This action uses no caching and the time it takes
fluctuates widely depending on mirror speed, congestion and other
things. If Cygwin tends to hold up jobs again for this or other reasons,
this patch may be reverted.

Follow-up to 80a8e24956 #15083
Follow-up to 2d8464c4cb #14366

Closes #15086
2024-09-30 14:11:23 +02:00
Viktor Szakats
7bc653a1d6
appveyor: bump to OpenSSL 3.3
Closes #15085
2024-09-30 10:54:46 +02:00
Viktor Szakats
069a9654ca
appveyor: delete unused WebSockets option remains [ci skip] 2024-09-30 10:37:00 +02:00
dependabot[bot]
b85d37a3b9
CI: bump vmactions/omnios-vm from 1.0.6 to 1.0.7
Bumps [vmactions/omnios-vm](https://github.com/vmactions/omnios-vm) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/vmactions/omnios-vm/releases)
- [Commits](2f97978b47...bc3c64398d)

---
updated-dependencies:
- dependency-name: vmactions/omnios-vm
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Closes #15018
2024-09-30 08:54:48 +02:00
Stefan Eissing
97c0f89bd0
quic: use send/recvmmsg when available
add checks for sendmmsg in configure and CmakeLists.txt for enabling use
of these functions in ngtcp2/quiche quic.

Closes #14880
2024-09-30 08:51:16 +02:00
renovate[bot]
876f17ad24
ci: update dependency awslabs/aws-lc to v1.36.0
Closes #14955
2024-09-30 08:45:45 +02:00
dependabot[bot]
256fa63934
CI: bump github/codeql-action from 3.26.6 to 3.26.8
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.26.6 to 3.26.8.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](4dd16135b6...294a9d9291)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Closes #15019
2024-09-30 08:44:00 +02:00
Daniel Stenberg
cd63629733
CI/winbuild: remove enabling of websocket - done by default now
Closes #15076
2024-09-30 07:58:54 +02:00
Viktor Szakats
e474b02301
runtests: fix indentation 2024-09-30 01:51:12 +02:00
Viktor Szakats
80a8e24956
GHA/cygwin, msys: move tests to cmake jobs, to finish faster
Move test runs from autotools jobs to cmake ones for Cygwin and MSYS.
This makes producing test results and finishing the workflows faster,
because the cmake build steps are much faster than autotools in these
envs.

Also:
- drop building examples with Cygwin autotools. It takes almost
  4 minutes. Keep building them with cmake, taking 20 seconds.
- drop building examples in MSYS autotools jobs that run tests.
  Keep building them in autotools jobs without tests. It makes
  the longest running job 2 minutes shorter.

After this patch Cygwin job times are on par with or lower than Windows
ones. It means Cygwin doesn't cause extra delay to finish the whole
workflow, allowing to re-merge these jobs into the Windows workflow.

Closes #15083
2024-09-30 01:45:01 +02:00
Viktor Szakats
47d604ae7e
GHA/windows: fix find in old-mingw-w64 curl -V step
By default it runs the Windows `find` command and fails.
Tweak the `PATH` to find the MSYS shell implementation.
2024-09-29 22:35:48 +02:00
Viktor Szakats
2c419fc14b
ci: tidy-ups
- http3-linux: add newlines for readability.
- http3-linux: use `make pytest` to run pytest.
- checksrc: use `|` multiline to sync with other uses.
- checksrc: prefer `$()`.
- prefer `>-` over `>` for folded option lists.
- cygwin: drop a `grep` no longer necessary.

Closes #15081
2024-09-29 17:39:55 +02:00
Viktor Szakats
8a8719d2e1
cmake: websockets tidy-ups
- restore change lost after websockets-default update.
  Ref: 6a1dcdc5d2 #14998
- delete unused line after websockets is on by default.
  Follow-up to d78e129d50 #14936

Closes #15078
2024-09-29 17:39:55 +02:00
Viktor Szakats
842f88434f
GHA linux: restore apt-get update
It seems like the Ubuntu apt mirror list or other preloaded data on the
Linux runner can go stale (?) throughout a single week causing failures
like this, in some of the jobs:
```
Ign:16 http://security.ubuntu.com/ubuntu jammy-updates/main amd64 libapr1-dev amd64 1.7.0-8ubuntu0.22.04.1
Err:16 mirror+file:/etc/apt/apt-mirrors.txt jammy-updates/main amd64 libapr1-dev amd64 1.7.0-8ubuntu0.22.04.1
  404  Not Found [IP: 40.81.13.82 80]
Get:24 http://azure.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libnghttp2-dev amd64 1.43.0-1ubuntu0.2 [117 kB]
Get:25 http://azure.archive.ubuntu.com/ubuntu jammy-updates/main amd64 vsftpd amd64 3.0.5-0ubuntu1.1 [123 kB]
Fetched 4029 kB in 2s (1682 kB/s)
E: Failed to fetch mirror+file:/etc/apt/apt-mirrors.txt/pool/main/a/apr/libapr1-dev_1.7.0-8ubuntu0.22.04.1_amd64.deb  404  Not Found [IP: 40.81.13.82 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Error: Process completed with exit code 100.
```
https://github.com/curl/curl/actions/runs/11074211380/job/30772496037#step:32:63

Restore `apt update` to fix it.

Follow-up to 1b8449674a #14992

Closes #15082
2024-09-28 20:59:22 +02:00
Tatsuhiro Tsujikawa
7048d1d211
docs/cmdline-opts: GnuTLS supports PKCS#11 URI in --cert option
Closes #15075
2024-09-28 18:09:05 +02:00
Viktor Szakats
f2ce14e10a
singleuse: limit checks to non-unity jobs
`singleuse.pl` requires non-unity builds. With unity builds, it remains
silent.

- make some jobs non-unity to allow singleuse to do its job.
- since all jobs used the `--unit` singleuse checker option, make this
  option permanent.

Closes #15065
2024-09-27 18:24:31 +02:00
Viktor Szakats
9541e66623
GHA/windows: formatting, adjust timeouts, tidy-ups
- reduce job timeouts for msys2 and old-mingw-w64 jobs.
- fold long lines and reorder options in MSVC jobs.
- make some options default in MSVC jobs.

Closes #15017
2024-09-27 18:24:31 +02:00
Dan Fandrich
95d33905fb CI: update 32-bit CI to Ubuntu 24.04 and enable more
Enable librtmp, libssh, libidn2 and c-ares support for broader 32-bit
test coverage. Bump the gcc version to 14.

Closes #15068
2024-09-27 08:59:55 -07:00
Stefan Eissing
7f3d598276
CI: improvements in test reliability and performance
- CI default: raise parallelism to 20
- CI valgind: set parallelism to 6
- CI non-native: adapt parallelism for OS builds
- CI Windows: no longer ignore FTP, TFTP, MQTT and SMTP
- CI Windows: restrict test timeout to 10 minutes
- CI Windows: do not run tests for msh3 build
- tests, various: restrict curl invocation to ipv4 to avoid talking to
  any ipv6 test server running in parallel
- tests: requiring http/2 server no longer needs to mention http server
- test 190: use a fixed timeout of 10 seconds instead of %FTPTIME2, as
  that value rises under parallel load beyond what the server is waiting
  and then produces different results
- test 1540: add debug logging
- testrunner: add verify checks for http/2 and http/3 server

Closes #15040
2024-09-27 16:47:37 +02:00
Daniel Stenberg
aca28abac7
lib: fix disabled-verbose-strings + enable-debug build warnings 2024-09-27 13:20:25 +02:00