Commit Graph

35552 Commits

Author SHA1 Message Date
Daniel Stenberg
b4c8d19c6a
pull_request_template.md: remove again
It was just super annoying and bad

Closes #17212
2025-04-28 17:15:51 +02:00
Daniel Stenberg
69ce9a7feb
progress: avoid integer overflow when gathering total transfer size
Reported by OSS-fuzz

Closes #17207
2025-04-28 15:31:30 +02:00
Daniel Stenberg
771c15b603
smb: avoid integer overflow on weird input date
Found by OSS-fuzz

Closes #17206
2025-04-28 15:29:59 +02:00
Daniel Stenberg
1589898b4a
pull_request_template.md: REUSE compliance
Plus move it to .github

Closes #17208
2025-04-28 14:25:11 +02:00
Daniel Stenberg
e008f71f43
pull_request_template.md: provide basic instructions
This should appear on GitHub for pull-requests and asks users to submit
their PRs as draft to begin with, to help us know when PRs are ready.

Closes #17205
2025-04-28 13:08:07 +02:00
Stefan Eissing
daa0601614
ws: store protocol context as connection meta data
Eliminates union member on struct connectdata. Sample of how
other procotols can handle their connection related data.

This avoids potention mix-ups of the `proto` union of a
connection with other protocol instances.

Removed ws "disconnect" callback as meta data is automatically
destroyed when a connection is destroyed.

Closes #17146
2025-04-28 09:15:05 +02:00
Daniel Stenberg
7b52906dd0
HTTPSRR.md: clarify somewhat
Closes #17204
2025-04-28 09:11:48 +02:00
sftcd
460ead61b6
tests: add basic ECH tests
Test 4000 and 4001

Closes #17192
2025-04-27 17:38:27 +02:00
Viktor Szakats
e2a23d5d0d
cmake: extend integration tests
- GHA: add cmake integration tests for Windows.
- make them run faster with prefill, unity, Ninja, omitting curl tool.
- also test static libcurl.
- add old-cmake support with auto-detection.
- auto-detect Ninja.
- run consumer test apps to see if they work.
- add support for Windows.
- make it more verbose.
- re-add `ExternalProject` cmake consumer test. It's broken.
- tidy up terminology.

Cherry-picked from #16973
Closes #17203
2025-04-27 13:22:39 +02:00
Daniel Stenberg
e9a35ded8a
curl_osslq: remove a leftover debug fprintf() call
Reported-by: xiadnoring on github
Fixes #17198
Closes #17202
2025-04-26 23:43:07 +02:00
renovate[bot]
85c70f8045
GHA: update actions/download-artifact digest to d3f86a1
Closes #17174
2025-04-26 23:42:15 +02:00
renovate[bot]
2b69232ba1
GHA: Update awslabs/aws-lc to v1.50.0
Closes #17191
2025-04-26 23:40:41 +02:00
Daniel Stenberg
de8622b858
RELEASE-PROCEDURE.md: release candidate git tagging explained
To help anyone wanting to build/reproduce release candidates, this is
the set git tag naming scheme to use. Similar to, but different, than
the "normal" release tags to not be possible to mixup.

Closes #17177
2025-04-26 23:38:49 +02:00
Daniel Stenberg
991c30d0d6
ws: fix the header replace check
It passed in the wrong header length to the check function, which made
it do duplicated headers in cases where the user provides its own set.

Reported-by: sbernatsky on github
Fixes #17170
Closes #17194
Closes #16178
2025-04-26 23:21:04 +02:00
Viktor Szakats
c5d63c6b4c
GHA/windows: add gcc-15 job
It's taking 2.5 minutes and planned for removal when MSYS2 gcc-15 gets
deployed in CI.

15.0.1 builds significantly faster than 9.5.0. (But still slower than
7.3.0 and 6.4.0)

Ref: f59921184b
Ref: https://github.com/msys2/MINGW-packages/pull/24037

Closes #17190
2025-04-26 15:37:50 +02:00
Viktor Szakats
978ef7074a
cmake: honor individual picky option overrides found in CMAKE_C_FLAGS
Also to sync up with similar `./configure` feature via
`CURL_ADD_COMPILER_WARNINGS()`.

Example: `-DCMAKE_C_FLAGS=-Wno-xor-used-as-pow`

It may be useful as a workaround if a specific build combination hits
a picky warning within curl's source code. If such happens, we do
appreciate a report to fix it in curl itself.

Closes #17197
2025-04-26 12:59:54 +02:00
Viktor Szakats
4b7accda5a
build: enable gcc-12/13+, clang-10+ picky warnings
Cherry-picked from #17190
Closes #17196
2025-04-26 12:59:54 +02:00
Viktor Szakats
f9eb9e5e23
cmake: use LIB_NAME in curl-config.cmake.in
Cherry-picked from #16973
Closes #17195
2025-04-26 12:59:53 +02:00
Viktor Szakats
54ef546ec4
GHA/linux: formatting nit [ci skip]
Cherry-picked from #16973
2025-04-26 09:20:01 +02:00
Daniel Stenberg
15839450be
urlapi: redirecting to "" is considered fine
If the CURLU handle already holds a proper URL, otherwise it is an
error.

Verified by test 1560

Fixes #17188
Reported-by: zopsicle on github
Closes #17189
2025-04-25 22:38:04 +02:00
renovate[bot]
01b177721b
GHA: update wolfSSL/wolfssl to v5.8.0
Closes #17182
2025-04-25 22:34:32 +02:00
Viktor Szakats
d58ff6e4b5
GHA/macos: fix typo in comment [ci skip] 2025-04-25 21:10:04 +02:00
Viktor Szakats
d7914f75aa
sectransp: fix building for macOS Sierra and older
Reported-by: Eric Knibbe
Bug: https://github.com/curl/curl/pull/16581#issuecomment-2830837500
Regression from 2d94439eaa #16581

Closes #17193
2025-04-25 21:06:22 +02:00
Daniel Stenberg
4db64a6437
tool_paramhlp: avoid integer overflow in secs2ms()
The previous approach was wrong and could lead to wrong timeout values
getting used.

Reported-by: bsr13 on hackerone
Closes #17184
2025-04-25 17:54:19 +02:00
Andreas Westin
cc884c08a8
cf-socket: fix FTP accept connect
When cf_tcp_accept_connect() is called and it sets up a connection it
never indicates to the caller that the it's done.

Closes #17186
2025-04-25 17:39:27 +02:00
Viktor Szakats
c3aa22272d
cmake: use CMAKE_COMPILE_WARNING_AS_ERROR if available
It's available in CMake >= 3.24.

Ref: https://cmake.org/cmake/help/latest/variable/CMAKE_COMPILE_WARNING_AS_ERROR.html

Closes #17183
2025-04-25 11:42:24 +02:00
Viktor Szakats
1e9b48c010
cmake: stop deleting -W<n> from CMAKE_C_FLAGS (MSVC)
1. `CMAKE_C_FLAGS` may apply to other projects, and deleting/altering it
   may be unexpected.

2. We pass `-W4`/`-Wall` internally now, which do override custom
   `-W<n>` options in all supported MSVC versions.
   (as tested with Visual Studio generators)
   Ref: https://ci.appveyor.com/project/curlorg/curl/builds/51945416

Follow-up to e86542038d #17047
Ref: 866e02935d #1711

Closes #17179
2025-04-25 11:42:24 +02:00
Viktor Szakats
5acba8bc36
GHA: skip updating man-db for faster installs (Ubuntu)
This step could take from 5 seconds to 5 minutes, sometimes making it
run out of its time slot. It affected 60 CI jobs.

Saving an estimated minimum of 5 minutes per CI run.

Also fixing:
```
Fri, 25 Apr 2025 06:19:14 GMT
Processing triggers for man-db (2.12.0-4build2) ...
Fri, 25 Apr 2025 06:23:40 GMT
Running kernel seems to be up-to-date.
[...]
Error: The action 'install packages' has timed out after 5 minutes.
```
Ref: https://github.com/curl/curl/actions/runs/14658212268/job/41136971525?pr=17180#step:2:169

Closes #17181
2025-04-25 10:17:36 +02:00
Daniel Stenberg
f034716ded
RELEASE-NOTES: synced 2025-04-25 09:49:59 +02:00
Daniel Stenberg
1968b32afd
tests/buildinfo: former "disabled" now provides more info
This tool now contains ON/OFF information about features in the build.
This way, runtests gets both positive and negative feature presence with
this. Allows for more flexibility and avoids having to duplicate the
names.

Closes #17180
2025-04-25 09:43:47 +02:00
Daniel Stenberg
2ab6b9d405
aws-sigv4: allow a blank string
make sure a zero length sigv4 gets the default value

Reported-by: Arian van Putten
Fixes #17176
Closes #17178
2025-04-25 09:32:57 +02:00
Viktor Szakats
ae0ff69f7a
build: tidy up internal feature detection variables for wolfSSL
Sync them with the function name they detect, and sync them between
cmake and autotools.

- rename `HAVE_WOLFSSL_BIO` to `HAVE_WOLFSSL_BIO_NEW`.
- rename `HAVE_WOLFSSL_FULL_BIO` to `HAVE_WOLFSSL_BIO_SET_SHUTDOWN`.
- autotools: rename `WOLFSSL_NTLM` to `HAVE_WOLFSSL_DES_ECB_ENCRYPT`
  (to sync with cmake).
- autotools: rename `WOLFSSL_BIO` to `HAVE_WOLFSSL_BIO_NEW`
  (to sync with cmake).
- autotools: simplify `HAVE_WOLFSSL_DES_ECB_ENCRYPT` detection.

Cherry-picked from #17082

Closes #17175
2025-04-24 23:44:33 +02:00
Viktor Szakats
1f6fef7ec0
GHA/windows: limit jobs to 15 minutes
They typically finish (well) within 10 minutes.

A notable exception was vcpkg jobs when a rebuild was triggered.
With caching lost and reducing them to short builds, this is not
an issue at the moment.

The advantage of shorter timeouts is hung/crashed jobs giving back
control earlier for a manual retry.

Closes #17173
2025-04-24 19:46:28 +02:00
Viktor Szakats
4a15cfc99f
autotools: detect wolfSSL_set_quic_use_legacy_code like cmake does
Cherry-picked from #17082

Closes #17172
2025-04-24 19:46:28 +02:00
Viktor Szakats
4bfc379b90
cmake: tidy up and document feature detections in dependencies
- update text on dependency feature detection variables, and move it
  to its own section in `docs/INSTALL-CMAKE.md`.
  Ref: #17032 (Discussion)

- tidy up descriptions/comments, alpha-sort.

- move comment to its own section in `docs/INSTALL-CMAKE.md`.

- split `HAVE_SSL_SET_QUIC_USE_LEGACY_CODEPOINT` to distinct names for
  each TLS backend API. To make the names more stable and to sync them
  with autotools.
  Follow-up to 07cc50f8eb #17018
  Follow-up to 342a654ef3 #15873

- drop redundant condition while detecting QUICTLS API.
  Follow-up to 07cc50f8eb #17018

- add config-comparison exception for `HAVE_SSL_SET_QUIC_TLS_CBS`.
  Follow-up to 5eefdd71a3 #17027

- detect `wolfSSL_get_peer_certificate` like autotools does.

- detect `wolfSSL_UseALPN` like autotools does.

Closes #17082
2025-04-24 19:46:27 +02:00
Stefan Eissing
7bf576064c
c-ares: really lazy init channel
Only initialize the c-ares channel when we start resolving and not
alreads when the application sets `CURLOPT_DNS_SERVERS` and friends.

Creating an ares channel takes considerable time and when we have the
DNS information for a transfer already cached, we do not need it.

Closes #17167
2025-04-24 14:07:01 +02:00
Daniel Stenberg
437c72fbba
mbedtls: TLS 1.3 is max when mbedtls has 1.3 support
Co-authored-by: Viktor Szakats
Reported-by: kkalganov on github
Fixes #17048
Closes #17137
2025-04-24 14:02:56 +02:00
Daniel Stenberg
79b4e56b3f
typecheck-gcc.h: fix the typechecks
Refreshed, cleaned up, improved and now checks *all* options.

This must have stopped working at some point. gcc-14 least shows these
warnings with this change, not without.

Add test 745 to verify that all options listed in curl.h is also checked
by the typechecker.

This improved checker found almost 30 mistakes in the curl git
repository.

Closes #17143
2025-04-24 13:23:49 +02:00
Sergey
29e0a8a09b
cmake: fix option() and mark_as_advanced() mixed order
Closes #17163
2025-04-24 10:04:17 +02:00
Viktor Szakats
c1c99054ab
cmake: install shell completions for cross-builds
Also:
- omit auto-detecting `CURL_COMPLETION_FISH_DIR` via `pkg-config`
  for cross-builds and when `CMAKE_INSTALL_PREFIX` is set.
- flatten nested `if`s.

Note:
On macOS with Homebrew, `pkg-config --variable completionsdir fish`
returns the version-specific Cellar path instead of the permanent path
`/opt/homebrew/share/fish/vendor_completions.d/`. This mimics what
autotools does, but may need further fixing, possibly upstream.
9c13e62b00/Formula/f/fish.rb
ce631fd2fb/cmake/Install.cmake (L15-L21)

Ref: #17147
Ref: 51170b52d1 #17159
Bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1103938

Closes #17145
2025-04-24 10:04:17 +02:00
Jochen Sprickerhof
82606325e3
openssl-quic: Add missing include
uint_hash, Curl_uint_hash_init and others are used in the file.

Regression from 657aae79c0

Closes #17156
2025-04-24 08:45:35 +02:00
Stefan Eissing
5e95556fc2
multi: init_do(): check result
Calls to `Curl_init_do()` did not check on result and missed failures to
properly and completely initialize a transfer request.

The main cause of such an init failure is the need to rewind the
READFUNCTION without a SEEKFUNCTION registered. Check the failure to
"rewind" the upload data immediately make test cases 1576 and friends
fail.

Reported-by: Travis Lane
Fixes #17139
Closes #17150
2025-04-24 08:43:03 +02:00
Daniel Stenberg
39f5e7cb69
asyn-base: remove the HTTPSRR_WORKS define
It is done in asyn-ares.c since 179aeeaf22

Closes #17161
2025-04-24 08:40:52 +02:00
Daniel Stenberg
f9f1a15699
lib/src/docs/test: improve curl_easy_setopt() calls
Fix invokes where the argument was not the correct type.

Closes #17160
2025-04-23 23:44:55 +02:00
Niall
179aeeaf22
ares: add definition for HTTPSRR_WORKS
Closes #17157
2025-04-23 23:39:41 +02:00
Daniel Stenberg
9c59a6ac55
libcurl-tutorial.md: fix read callback explanation
Fixes #17138
Reported-by: Thomas Klausner
Closes #17154
2025-04-23 23:23:59 +02:00
Helmut Grohne
51170b52d1
autotools: install shell completion files on cross build
Before 8.13.0, it was not possible to generate them as it required
 calling the compiled binary, but this has been fixed.

Co-authored-by: Samuel Henrique <samueloph@debian.org>

Closes #17159
2025-04-23 23:21:05 +02:00
Viktor Szakats
596da988c4
GHA/windows: fixup MSYS2 downgrade step
Fix step failing when 3.6 is detected.
Ref: https://github.com/curl/curl/actions/runs/14620854081/job/41020237740?pr=17157#step:14:8

Follow-up to 20d9d3bcce #17151
Follow-up to b06c12b724 #16574

Closes #17158
2025-04-23 19:42:45 +02:00
Viktor Szakats
5852a0bedf
GHA: use more Ninja
Use it for AmigaOS, Android, dl-mingw 7.3.0 and 6.4.0 Windows builds.

Also drop explicit ninja installs.

dl-mingw:
Before:
7.3.0: https://github.com/curl/curl/actions/runs/14617346216/job/41008536465
6.4.0: https://github.com/curl/curl/actions/runs/14617346216/job/41008540878
After:
7.3.0: https://github.com/curl/curl/actions/runs/14617983032/job/41010584040?pr=17153
6.4.0: https://github.com/curl/curl/actions/runs/14617983032/job/41010586490?pr=17153

Follow-up to a366552243 #17115
Ref: https://github.com/actions/runner-images/issues/11391

Closes #17153
2025-04-23 15:12:22 +02:00
Viktor Szakats
20d9d3bcce
GHA/windows: apply MSYS2 runtime downgrades to v3.5.x, leave v3.6.x as-is
windows-runners 20250420.1.0 come with msys2-runtime 3.6.x. It has
the perf regression issue fixed, so stop downgrading it.

This makes CI jobs settle on this version when supplied by
the runner image or the msys2/setup-msys2 action:
MINGW64_NT-10.0-20348 fv-az980-636 3.6.1-0cfedd4f.x86_64 2025-04-12 01:44 UTC x86_64 Msys

With 3.6.1, we've seen issues launching `perl.exe` before this patch:
https://github.com/curl/curl/discussions/14854#discussioncomment-12908214
https://github.com/curl/curl/discussions/14854#discussioncomment-12921007

Follow-up to b06c12b724 #16574
Closes #17151
2025-04-23 13:46:52 +02:00