]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
5 months agoINTERNALS: fix c-ares, as we actually support 1.6.0 or later
Daniel Stenberg [Thu, 6 Feb 2025 16:00:17 +0000 (17:00 +0100)] 
INTERNALS: fix c-ares, as we actually support 1.6.0 or later

It was wrongly bumped to 1.16.0 in db50fc6e95816ec. While we strongly
recommend using 1.16.0 or later, we still allow builds using older
versions.

It would make sense to raise the requirement to at least 1.11.0 (Feb 19
2016) but that's not done right now.

Closes #16221

5 months agoGHA/windows: always pass `-A <arch>` to cmake in vcpkg jobs
Viktor Szakats [Thu, 6 Feb 2025 13:09:58 +0000 (14:09 +0100)] 
GHA/windows: always pass `-A <arch>` to cmake in vcpkg jobs

Instead of relying on the default `-A x64` on `windows-latest` runners,
tell cmake the arch explicitly, to be in sync with `matrix.arch`. Also
add support for arm64 and x86.

`-DVCPKG_TARGET_TRIPLET=` isn't enough to select the platform, ref:
https://github.com/curl/curl/actions/runs/13179082565/job/36785363766?pr=16210

Closes #16210

5 months agocmake: respect `GNUTLS_LIBRARY_DIRS` in `libcurl.pc` and `curl-config`
Viktor Szakats [Wed, 5 Feb 2025 17:22:48 +0000 (18:22 +0100)] 
cmake: respect `GNUTLS_LIBRARY_DIRS` in `libcurl.pc` and `curl-config`

Authored-by: Kai Pastor
Ref: https://github.com/microsoft/vcpkg/commit/0ed3bfe969b2f95ad45f431c5ea482a69f132a67
Closes #16190

5 months agobuild: add tool_hugehelp.c into IBMi build
andrewkirillov-ibm [Thu, 6 Feb 2025 12:58:52 +0000 (12:58 +0000)] 
build: add tool_hugehelp.c into IBMi build

As `tool_hugehelp.c` is no longer included into `Makefile.inc`,
I did add it explicitly to list of source files built on IBMi.

Follow-up to 96843f4ef74e02452972fd97fe15d8ff656f46ec #16068
Fixes #16214
Closes #16215

5 months agoCURLOPT_SSH_KNOWNHOSTS.md: strongly recommend using this
Daniel Stenberg [Thu, 6 Feb 2025 10:09:06 +0000 (11:09 +0100)] 
CURLOPT_SSH_KNOWNHOSTS.md: strongly recommend using this

Make setopt fail for SSH backends not supporting knownhosts or pub md5

Closes #16204

5 months agoconfigure/cmake: set asyn-rr a feature only if httpsrr is enabled
Daniel Stenberg [Wed, 5 Feb 2025 12:52:46 +0000 (13:52 +0100)] 
configure/cmake: set asyn-rr a feature only if httpsrr is enabled

Closes #16183

5 months agoheader.md: mention `Authorization:` and `Cookie:` special treatment
Daniel Stenberg [Tue, 4 Feb 2025 09:25:12 +0000 (10:25 +0100)] 
header.md: mention `Authorization:` and `Cookie:` special treatment

Fixes #16160
Reported-by: deliciouslytyped on github
Closes #16164

5 months agotool_getparam: add "TLS required" flag for each such option
Daniel Stenberg [Mon, 3 Feb 2025 21:43:36 +0000 (22:43 +0100)] 
tool_getparam: add "TLS required" flag for each such option

... and check it early, once.

Closes #16159

5 months agonetrc: return code cleanup, fix missing file error
Daniel Stenberg [Tue, 4 Feb 2025 10:25:18 +0000 (11:25 +0100)] 
netrc: return code cleanup, fix missing file error

Made the netrc parser return a more consistent set of error codes and
error messages, and also return error properly if the .netrc file is
missing.

Add test 697 to verify error on missing netrc file.

Fixes #16163
Reported-by: arlt on github
Closes #16165

5 months agoRELEASE-NOTES: synced
Daniel Stenberg [Thu, 6 Feb 2025 09:30:07 +0000 (10:30 +0100)] 
RELEASE-NOTES: synced

and bump curlver to 8.12.1 while "cooling off"

5 months agocontent_encoding: #error on too old zlib
Daniel Stenberg [Thu, 6 Feb 2025 08:28:42 +0000 (09:28 +0100)] 
content_encoding: #error on too old zlib

The previous runtime check using strcmp() risks failing when zlib
reaches 1.10. While this instead changes the logic to a cruder
build-time instead of runtime, it avoids the 1.10 risk.

I verified that ZLIB_VERNUM has been provided since at least the 1.2.0.3
release.

1.2.0.4 was released on 10 August 2003.

Reported-by: Fay Stegerman
Closes #16202

5 months agolibssh2: raise lowest supported version to 1.2.8
Daniel Stenberg [Thu, 6 Feb 2025 06:54:54 +0000 (07:54 +0100)] 
libssh2: raise lowest supported version to 1.2.8

Shipped on April 5 2011

Closes #16199

5 months agodocs: better explain multi-part byte range behavior
Jay Satiro [Sat, 1 Feb 2025 23:12:18 +0000 (18:12 -0500)] 
docs: better explain multi-part byte range behavior

- Better explain that if the requested range (--range or CURLOPT_RANGE)
  contains multiple ranges then the response contains meta information
  in addition to the requested bytes.

Prior to this change it was noted that a multiple part response was
returned as-is but not what that meant. In particular, meta information
is returned in addition to the requested bytes and that may have been
unexpected.

Reported-by: Ralf A. Timmermann
Fixes https://github.com/curl/curl/issues/16139
Closes https://github.com/curl/curl/pull/16150

5 months agoSPONSORS.md: clarify that we don't promise goods or services
Daniel Stenberg [Wed, 5 Feb 2025 22:24:23 +0000 (23:24 +0100)] 
SPONSORS.md: clarify that we don't promise goods or services

Due to past events

Closes #16196

5 months agoGHA/non-native: skip examples in non-unity job
Viktor Szakats [Wed, 5 Feb 2025 20:35:58 +0000 (21:35 +0100)] 
GHA/non-native: skip examples in non-unity job

To save time. They are built the same way in the other jobs.

Follow-up to 6fc703904b2ed5e320abd66c9ef1efc894578fe9 #16188
Closes #16195

5 months agolibssh: silence `-Wconversion` with a cast (Windows 32-bit)
Viktor Szakats [Wed, 5 Feb 2025 18:19:04 +0000 (19:19 +0100)] 
libssh: silence `-Wconversion` with a cast (Windows 32-bit)

Seen with GCC 13 with Windows x86:
```
lib/vssh/libssh.c: In function 'myssh_statemach_act':
lib/vssh/libssh.c:1851:41: error: conversion from 'curl_off_t' {aka 'long long int'} to 'size_t' {aka 'unsigned int'} may change value [-Werror=conversion]
 1851 |                              data->state.infilesize,
      |                              ~~~~~~~~~~~^~~~~~~~~~~
```
Ref: https://github.com/curl/curl/actions/runs/13161422041/job/36737994642?pr=16182#step:3:5111

Closes #16194

5 months agolib: include necessary headers for `inet_ntop`/`inet_pton`
Viktor Szakats [Wed, 5 Feb 2025 14:32:11 +0000 (15:32 +0100)] 
lib: include necessary headers for `inet_ntop`/`inet_pton`

Include `netinet/in.h` for FreeBSD/OpenBSD. Also include `sys/socket.h`
just in case, based on earlier code in `tests/libtest/lib1960.c`.

Also:
- document these in `CMakeLists.txt`.
- add a CI job testing FreeBSD with no unity and no test bundles.
  (without running tests to keep it fast)

FreeBSD (autotools):
```
../../../tests/libtest/lib1960.c:66:22: error: variable has incomplete type 'struct sockaddr_in'
   66 |   struct sockaddr_in serv_addr;
      |                      ^
../../../tests/libtest/lib1960.c:66:10: note: forward declaration of 'struct sockaddr_in'
   66 |   struct sockaddr_in serv_addr;
      |          ^
```
Ref: https://github.com/curl/curl/actions/runs/13159721509/job/36725114118?pr=16188#step:3:5289

OpenBSD (cmake):
```
/home/runner/work/curl/curl/tests/libtest/lib1960.c:66:22: error: variable has incomplete type 'struct sockaddr_in'
  struct sockaddr_in serv_addr;
                     ^
/home/runner/work/curl/curl/tests/libtest/lib1960.c:66:10: note: forward declaration of 'struct sockaddr_in'
  struct sockaddr_in serv_addr;
         ^
1 error generated.
```
Ref: https://github.com/curl/curl/actions/runs/13159721509/job/36725102004?pr=16188#step:3:2166

Reported-by: CueXXIII on Github
Fixes #16184
Follow-up to a3585c9576abccddbd27200058912cef900c3c0f #15543
Closes #16188

5 months agosmb: silence `-Warray-bounds` with gcc 13+
Viktor Szakats [Wed, 5 Feb 2025 12:52:06 +0000 (13:52 +0100)] 
smb: silence `-Warray-bounds` with gcc 13+

The code look correct. The compiler gets confused by the `byte[1]`
struct member mapped into a memory buffer with a variable-sized
payload starting at this member. Perhaps there is a cleaner way
to silence this by changing the code.

First seen with gcc 13.2.0 in curl-for-win builds. Then with 13.2.1 and
the latest 14.2.0.

```
curl/lib/smb.c: In function 'smb_connection_state':
curl/lib/smb.c:895:5: warning: 'memcpy' offset [74, 80] from the object at 'buf' is out of the bounds of referenced subobject 'bytes' with type 'char[1]' at offset 73 [-Warray-bounds=]
  895 |     memcpy(smbc->challenge, nrsp->bytes, sizeof(smbc->challenge));
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
curl/lib/smb.c:130:8: note: subobject 'bytes' declared here
  130 |   char bytes[1];
      |        ^~~~~
```

gcc 14.2.0 debian:testing musl riscv64: https://github.com/curl/curl/actions/runs/13157579253/job/36718140035?pr=16182#step:3:5576
gcc 13.2.1 alpine amd64: https://github.com/curl/curl-for-win/actions/runs/9370491111/job/25797582549#step:3:4869
gcc 13.2.0 debian:testing glibc aarch64: https://github.com/curl/curl-for-win/actions/runs/9370491111/job/25797581315#step:3:6054
gcc 13.2.0 debian:testing glibc amd64: https://github.com/curl/curl-for-win/actions/runs/9370491111/job/25797581315#step:3:10959
gcc 13.2.0 debian:sid glibc riscv64: https://github.com/curl/curl-for-win/actions/runs/9370491111/job/25797580697#step:3:6122
gcc 13.2.0 debian:sid musl riscv64: https://github.com/curl/curl-for-win/actions/runs/9370491111/job/25797583450#step:3:6227

Closes #16187

5 months agoasyn-thread: fix HTTPS RR crash
Daniel Stenberg [Tue, 4 Feb 2025 16:51:57 +0000 (17:51 +0100)] 
asyn-thread: fix HTTPS RR crash

By removing 'data' from the thread struct and passing it in as an
argument we avoid the case it could be dereferenced before stored when
shutting down HTTPS RR.

Also reordered the struct fields a little to remove holes.

Closes #16169

5 months agoRELEASE-NOTES: synced curl-8_12_0
Daniel Stenberg [Wed, 5 Feb 2025 06:42:54 +0000 (07:42 +0100)] 
RELEASE-NOTES: synced

curl 8.12.0 release

Also THANKS

5 months agotransfer: replace `false` with `FALSE`
Viktor Szakats [Wed, 5 Feb 2025 01:26:01 +0000 (02:26 +0100)] 
transfer: replace `false` with `FALSE`

Follow-up to c9afcecee94284e754d82354c79e4e37f09bff61 #16170

Closes #16177

5 months agocfilters: silence compiler warning
Viktor Szakats [Tue, 4 Feb 2025 17:29:24 +0000 (18:29 +0100)] 
cfilters: silence compiler warning

seen with gcc 4.4.0:
```
../../lib/cfilters.c: In function 'Curl_conn_http_version':
../../lib/cfilters.c:523: error: conversion to 'unsigned char' from 'int' may alter its value
```
Ref: https://github.com/curl/curl/actions/runs/13124120573/job/36616761121?pr=15975#step:9:20

Follow-up to e83818cae1da495939aee5def1172ca1d20cc1e4 #16073

Closes #16171

5 months agotransfer: fix returning init failures from `xfer_recv_shutdown_started()`
Viktor Szakats [Tue, 4 Feb 2025 17:15:22 +0000 (18:15 +0100)] 
transfer: fix returning init failures from `xfer_recv_shutdown_started()`

Before this patch it returned `CURLE_FAILED_INIT` on init failures, with
the value of 2. Fix it to return `false`.

Seen with clang 18.1.8:
```
../lib/transfer.c(181,12): warning: integer constant not in range of enumerated type 'bool' [-Wassign-enum]
  181 |     return CURLE_FAILED_INIT;
      |            ^
../lib/transfer.c(181,12): warning: implicit conversion from enumeration type 'CURLcode' to different enumeration type 'bool' [-Wenum-conversion]
  181 |     return CURLE_FAILED_INIT;
      |     ~~~~~~ ^~~~~~~~~~~~~~~~~
../lib/transfer.c(183,12): warning: integer constant not in range of enumerated type 'bool' [-Wassign-enum]
  183 |     return CURLE_FAILED_INIT;
      |            ^
../lib/transfer.c(183,12): warning: implicit conversion from enumeration type 'CURLcode' to different enumeration type 'bool' [-Wenum-conversion]
  183 |     return CURLE_FAILED_INIT;
      |     ~~~~~~ ^~~~~~~~~~~~~~~~~
```

Follow-up to 35bf766280a77cde3055e0f4e249ab02a0dcd275 #14253

Closes #16170

5 months agodocs/HTTPSRR.md: Typo fix AAA -> AAAA
MacKenzie [Tue, 4 Feb 2025 21:39:22 +0000 (17:39 -0400)] 
docs/HTTPSRR.md: Typo fix AAA -> AAAA

Closes #16173

5 months agopop3: revert connection ssl check
Stefan Eissing [Tue, 4 Feb 2025 20:53:55 +0000 (21:53 +0100)] 
pop3: revert connection ssl check

As reported in #16166, the STLS hangs with the check for SSL connection
filters, but is working with the old protocol handler way. Revert the
change, although it is unclear why it was no good here.

Fixes #16166
Reported-by: ralfjunker on github
Closes #16172

5 months agoHTTPSRR.md: implement what seems to be deployed
Daniel Stenberg [Mon, 3 Feb 2025 21:15:35 +0000 (22:15 +0100)] 
HTTPSRR.md: implement what seems to be deployed

Closes #16158

5 months agobuild: drop macro used to enable `-Wsign-conversion` warnings in CI
Viktor Szakats [Mon, 3 Feb 2025 18:31:10 +0000 (19:31 +0100)] 
build: drop macro used to enable `-Wsign-conversion` warnings in CI

We don't pursue this, and the necessary `#pragma` got in the way of
compiling curl with gcc 4.2 and older. Drop the logic completely.

Follow-up to 8a266ac4883958c339fe16796081a296cd66acb3 #15939

Reported-by: prpr19xx on Github
Fixes #16152
Closes #16157

5 months agoRELEASE-NOTES: synced
Daniel Stenberg [Mon, 3 Feb 2025 21:02:16 +0000 (22:02 +0100)] 
RELEASE-NOTES: synced

5 months agosymbols-in-versions: update version for LIBCURL_VERSION and LIBCURL_VERSION_NUM
Edoardo Lolletti [Fri, 31 Jan 2025 22:18:07 +0000 (23:18 +0100)] 
symbols-in-versions: update version for LIBCURL_VERSION and LIBCURL_VERSION_NUM

Those 2 symbols were available since the first 7.1.1 release

Closes #16141

5 months agox509asn1: add parse recursion limit
Stefan Eissing [Fri, 31 Jan 2025 12:13:34 +0000 (13:13 +0100)] 
x509asn1: add parse recursion limit

For ASN.1 tags with indefinite length, curl's own parser for TLS
backends that do not support certificate inspection calls itself
recursively. A malicious server certificate can then lead to high
recursion level exhausting the stack space.

This PR limits the recursion level to 16 which should be safe on all
architectures.

Added unit test 1657 to verify behaviour.

Fixes #16135
Reported-by: z2_
Closes #16137

5 months agows-docs: extend WebSocket documentation
Calvin Ruocco [Thu, 12 Dec 2024 14:36:08 +0000 (15:36 +0100)] 
ws-docs: extend WebSocket documentation

Closes #16118

5 months agoruntests.pl: fix precedence issue
mauke [Thu, 30 Jan 2025 05:28:50 +0000 (06:28 +0100)] 
runtests.pl: fix precedence issue

The condition `!$cmdtype eq "perl"` (introduced in a4765b0551) is always
false. It checks whether a logical negation (giving true/false) is equal
to the string `"perl"`. This is impossible, so the logging never worked.

The intent was probably to negate the result of the string
comparison:`!($cmdtype eq "perl")` or simply `$cmdtype ne "perl"`.

Fixes #16128
Reported-by: Igor Todorovski
Closes #16129

5 months agotests: stop promoting perl warnings to fatal errors
Dan Fandrich [Mon, 3 Feb 2025 18:19:20 +0000 (10:19 -0800)] 
tests: stop promoting perl warnings to fatal errors

While this is useful on CI to highlight issues in the scripts, it's a
recipe for pain when enabled on users' builds.

Suggested-by: Leon Timmermans
Ref: #16128

5 months agoc-ares: fix/tidy-up macro initializations, avoid a deprecated function
Viktor Szakats [Thu, 30 Jan 2025 11:42:52 +0000 (12:42 +0100)] 
c-ares: fix/tidy-up macro initializations, avoid a deprecated function

- replace deprecated `ares_init()` call with `ares_init_options()`.
  Follow-up to 0d4fdbf15d8eec908b3e63b606f112b18a63015e #16054

- dedupe `CARES_STATICLIB` initalizations into `curl_setup.h`, to
  ensure it's defined before the first (and every) `ares.h` include and
  avoid a potential confusion.

- move `CARES_NO_DEPRECATED` from build level to `curl_setup.h`.
  To work regardless of build system.
  It is necessary because curl calls `ares_getsock()` from two places,
  of which one feeds a chain of wrappers: `Curl_ares_getsock()`,
  `Curl_resolver_getsock()`, `Curl_resolv_getsock()`.

Closes #16131

6 months agoINSTALL-CMAKE.md: fix punctuation
Viktor Szakats [Thu, 30 Jan 2025 14:24:57 +0000 (15:24 +0100)] 
INSTALL-CMAKE.md: fix punctuation

6 months agoGHA: tidy up `apt` commands
Viktor Szakats [Wed, 29 Jan 2025 18:46:25 +0000 (19:46 +0100)] 
GHA: tidy up `apt` commands

- drop `--quiet 2` option where used, to have uniform output.
- replace `apt` with `apt-get` in one job. sync options with rest.
- replace deprecated `apt-key` command with the alternative recommended
  by `apt-key(8)`.
- drop stray `cd /tmp`, no longer needed after migrating to GHA.
- shorten `--option Dpkg::Use-Pty=0` to `-o Dpkg::Use-Pty=0`.
- add `-o Dpkg::Use-Pty=0` to hide `apt-get` progress bars taking
  vertical log space, where missing.
- drop `-y --no-install-suggests --no-install-recommends` `apt-get`
  options. They are the default in the ubuntu-24.04 image.
- GHA/distcheck: move `name:` to top in steps where not there.
- scripts/cijobs.pl: catch `apt-get` lines with the `-o` option.

Closes #16127

6 months agombedtls: PSA can be used independently of TLS 1.3 (avoid runtime errors)
Michael Schuster [Sat, 18 Jan 2025 04:38:41 +0000 (05:38 +0100)] 
mbedtls: PSA can be used independently of TLS 1.3 (avoid runtime errors)

Closes #16044

6 months agotest1960: don't close the socket too early 16123/head
Dan Fandrich [Fri, 24 Jan 2025 01:48:21 +0000 (17:48 -0800)] 
test1960: don't close the socket too early

The socket was closed while the handle was still in use, so
curl_easy_cleanup ended up setting nonblocking mode on a closed handle.

Closes #16123

6 months agocmake: warn for OpenSSL versions missing TLS 1.3 support
Viktor Szakats [Tue, 28 Jan 2025 15:51:18 +0000 (16:51 +0100)] 
cmake: warn for OpenSSL versions missing TLS 1.3 support

To match existing warnings for Secure Transport and BearSSL.

OpenSSL 1.1.1 or upper are offering TLS 1.3 support.

Ref: https://wiki.openssl.org/index.php/TLS1.3

Closes #16120

6 months agocd2nroff: do not insist on quoted <> within backticks
Daniel Stenberg [Tue, 28 Jan 2025 15:51:33 +0000 (16:51 +0100)] 
cd2nroff: do not insist on quoted <> within backticks

Ref: #16118
Closes #16121

6 months agogitignore: add `lib/Makefile.soname.cmake`
Viktor Szakats [Tue, 28 Jan 2025 15:04:29 +0000 (16:04 +0100)] 
gitignore: add `lib/Makefile.soname.cmake`

6 months agohttps-connect: start next immediately on failure
Stefan Eissing [Tue, 28 Jan 2025 12:38:43 +0000 (13:38 +0100)] 
https-connect: start next immediately on failure

When parallel connects are attempted, the second one is started on a
delay. Start it right away when the first one failed.

Closes #16114

6 months agogitignore: restore explicit lists and fix them
Viktor Szakats [Tue, 28 Jan 2025 13:15:46 +0000 (14:15 +0100)] 
gitignore: restore explicit lists and fix them

Range matches are not supported with `+`: https://git-scm.com/docs/gitignore

Also sync `.gitignore` file lists with source files and alphasort them.

Follow-up to 5c31c2e6709979db4c949b7cd6a3cf88dec4e1aa #16093
Reported-by: Stefan Eissing
Fixes #16112
Fixes #16115
Closes #16116

6 months agongtcp2: fix memory leak on connect failure
Stefan Eissing [Tue, 28 Jan 2025 12:23:31 +0000 (13:23 +0100)] 
ngtcp2: fix memory leak on connect failure

When a QUIC connection using ngtcp2 failed immediately, the TLS
instances were not always released.

Closes #16113

6 months agodocs/cmdline-opts/location.md: fix typos for location flag
Martin Harrigan [Tue, 28 Jan 2025 10:28:25 +0000 (10:28 +0000)] 
docs/cmdline-opts/location.md: fix typos for location flag

Closes #16110

6 months agoINTERNALS.md: sync wolfSSL version requirement with source code
Viktor Szakats [Mon, 27 Jan 2025 20:36:46 +0000 (21:36 +0100)] 
INTERNALS.md: sync wolfSSL version requirement with source code

`lib/vtls/wolfssl.c` enforces it via a hard #error.

Cherry-picked from #16104

6 months agoopenssl: define `HAVE_KEYLOG_CALLBACK` before use
Viktor Szakats [Mon, 27 Jan 2025 22:04:02 +0000 (23:04 +0100)] 
openssl: define `HAVE_KEYLOG_CALLBACK` before use

Before this patch this macro was used in `vtls/openssl.h` without
setting it first, causing the `keylog_done` member be present in
struct `ossl_ctx` while the code did not use it.

Follow-up to 3210101088dfa3d6a125d213226b092f2f866722 #13172
Closes #16105

6 months agoopenssl: drop unused `HAVE_SSL_GET_SHUTDOWN` macro
Viktor Szakats [Mon, 27 Jan 2025 20:07:55 +0000 (21:07 +0100)] 
openssl: drop unused `HAVE_SSL_GET_SHUTDOWN` macro

Follow-up to c31041b17e5ee60e7ecc2309daa8ababf7c7ad2d #13904
Closes #16103

6 months agotool_getparam: fail --hostpubsha256 if libssh2 is not used
Daniel Stenberg [Tue, 28 Jan 2025 08:20:35 +0000 (09:20 +0100)] 
tool_getparam: fail --hostpubsha256 if libssh2 is not used

Reported-by: Harry Sintonen
Closes #16109

6 months agows: Reject frames with unknown reserved bits set
Andrew Kaster [Tue, 21 Jan 2025 16:57:46 +0000 (09:57 -0700)] 
ws: Reject frames with unknown reserved bits set

RFC 6455 Section 5.2 notes that for bits RSV1, RSV2, and RSV3 of the
framing header, a non-zero value that is not defined by a negotiated
extension MUST Fail the WebSocket connection.

Test 2310 verifies

Closes #16069

6 months agovtls: fix default SSL backend as a fallback
Jay Satiro [Tue, 28 Jan 2025 04:48:18 +0000 (23:48 -0500)] 
vtls: fix default SSL backend as a fallback

- Use build-time CURL_DEFAULT_SSL_BACKEND as a fallback when environment
  variable CURL_SSL_BACKEND contains a backend that is unavailable.

Prior to this change if CURL_SSL_BACKEND was set then
CURL_DEFAULT_SSL_BACKEND was ignored even if the backend of the former
was unavailable. In that case libcurl would instead select the first
available backend in the list of backends.

Bug: https://github.com/curl/curl/issues/16076#issuecomment-2617354254
Reported-by: Jeroen Ooms
Closes https://github.com/curl/curl/pull/16108

6 months agoeasy: allow connect-only handle reuse with easy_perform
Jay Satiro [Wed, 15 Jan 2025 08:56:11 +0000 (03:56 -0500)] 
easy: allow connect-only handle reuse with easy_perform

- Detach and disconnect an attached connection before performing.

Prior to this change it was not possible to safely reuse an easy handle
with an attached connection in a second call to curl_easy_perform. The
only known case of this is a connect-only type handle where the
connection was detached when curl_easy_perform returned, only to be
reattached by either curl_easy_send/recv.

This commit effectively reverts 2f8ecd5d and be82a360, the latter of
which treated the reuse as an error. Prior to that change undefined
behavior may occur in such a case.

Bug: https://curl.se/mail/lib-2025-01/0044.html
Reported-by: Aleksander Mazur
Closes https://github.com/curl/curl/pull/16008

6 months agoasyn-ares: fix memory leak
Dexter Gerig [Tue, 28 Jan 2025 04:45:46 +0000 (22:45 -0600)] 
asyn-ares: fix memory leak

Closes #16107

6 months agoasyn-thread: fix HTTPS RR resolution
Dexter Gerig [Tue, 28 Jan 2025 04:45:38 +0000 (22:45 -0600)] 
asyn-thread: fix HTTPS RR resolution

Store the received data correctly.

Closes #16107

6 months agogitignore: add generated unity sources for lib and src
Viktor Szakats [Mon, 27 Jan 2025 21:55:39 +0000 (22:55 +0100)] 
gitignore: add generated unity sources for lib and src

Follow-up to 71cf0d1fca9e1f53524e1545ef0c08d174458d80 #14772

6 months agochecksrc: exclude generated bundle files to avoid race condition
Viktor Szakats [Mon, 27 Jan 2025 18:32:45 +0000 (19:32 +0100)] 
checksrc: exclude generated bundle files to avoid race condition

Necessary to catch rare cases when `checksrc` hits these files when they
are not populated yet:
```
./curltool_unity.c:1:1: error: Missing copyright statement (COPYRIGHT)
 ^
```
https://github.com/curl/curl/actions/runs/12995546740/job/36242556713?pr=16094#step:37:123

Follow-up to 71cf0d1fca9e1f53524e1545ef0c08d174458d80 #14772
Closes #16102

6 months agomsvc: add missing push/pop for warning pragmas
Viktor Szakats [Mon, 27 Jan 2025 14:43:32 +0000 (15:43 +0100)] 
msvc: add missing push/pop for warning pragmas

Also fix indentation/formatting around similar pragmas.

Closes #16101

6 months agoMakefile.dist: delete
Viktor Szakats [Sun, 26 Jan 2025 15:13:16 +0000 (16:13 +0100)] 
Makefile.dist: delete

It had shorthand aliases to launch `./configure` and
`./configure --with-openssl`. The former hasn't worked for a long while
because of missing TLS.

Its `ca-bundle` and `ca-firefox` targets have been broken for 2.5 years
till recently. These targets also exist in `./configure` and have been
working all along.

Also:
- cmake: add support `curl-ca-bundle` and `curl-ca-firefox` targets.
- tests/testcurl.pl: drop obsolete build logic.

Closes #16094

6 months agotidy-up: `.gitignore` lines mostly
Viktor Szakats [Sun, 26 Jan 2025 14:28:56 +0000 (15:28 +0100)] 
tidy-up: `.gitignore` lines mostly

- `.gitignore`: delete, dedupe and move rules upwards.
  Ref: 6389ba87b8e5cf74b70c54beab3498dfc773364e #13311
- `.gitignore`: fix generated test sources.
  Follow-up to 71cf0d1fca9e1f53524e1545ef0c08d174458d80 #14772
- `.gitignore`: replace exe listings with a wildcard.
- lib: move `setup-*.h` from `EXTRA_DIST` to `CURL_HFILES`.
- `makedebug.bat`: uppercase an argument to match docs.
- GHA/non-native: delete stray env.
  Follow-up to 12a6de2f660dd692cce93cb65ce6e3ec126bb531 #16043
- sort source lists.

Closes #16093

6 months agoVULN-DISCLOSURE-POLICY: on legacy dependencies
Daniel Stenberg [Sat, 25 Jan 2025 11:04:04 +0000 (12:04 +0100)] 
VULN-DISCLOSURE-POLICY: on legacy dependencies

Problems that only trigger using *legacy* dependencies are not
considered security problems.

Closes #16086

6 months agourldata: tweak the UserDefined struct
Daniel Stenberg [Mon, 27 Jan 2025 08:34:57 +0000 (09:34 +0100)] 
urldata: tweak the UserDefined struct

By better sticking to listing the struct members sorted by size, this
struct is now 48 bytes smaller on my fairly maximized build, without
removing anything.

Turned 'connect_only' into two bits instead of an unsigned char with two
magic values.

Also put the 'gssapi_delegation' field within ifdef HAVE_GSSAPI.

Closes #16097

6 months agohttp2: fix data_pending check
Stefan Eissing [Mon, 27 Jan 2025 10:36:22 +0000 (11:36 +0100)] 
http2: fix data_pending check

The h2 filter mistakenly also checked `sendbuf` when asked
about pending data. The call is only meant to account for
buffered data that still needs to be received.

Also, remove obsolete recvbuf in stream as we write received
headers and data directly.

Fixes #16084
Closes #16098
Reported-by: Deniz Sökmen
6 months agoINSTALL.md: add CMake examples for macOS and iOS
Viktor Szakats [Sun, 26 Jan 2025 23:44:49 +0000 (00:44 +0100)] 
INSTALL.md: add CMake examples for macOS and iOS

Closes #16095

6 months agoRELEASE-NOTES: synced
Daniel Stenberg [Mon, 27 Jan 2025 07:18:45 +0000 (08:18 +0100)] 
RELEASE-NOTES: synced

6 months agoversion: fix the IDN feature for winidn and appleidn
Daniel Stenberg [Sun, 26 Jan 2025 13:14:44 +0000 (14:14 +0100)] 
version: fix the IDN feature for winidn and appleidn

Closes #16091

6 months agoversion: rename c-ares-rr to asyn-rr
Daniel Stenberg [Sun, 26 Jan 2025 11:23:33 +0000 (12:23 +0100)] 
version: rename c-ares-rr to asyn-rr

Works better if we later introduce another way to do the asynch RR
resolves (together with the threaded resolver) that does not use c-ares.

Closes #16090

6 months agoGHA: fixup CM/AM order within Apple steps, move `name:` first, quote them
Viktor Szakats [Sun, 26 Jan 2025 13:33:10 +0000 (14:33 +0100)] 
GHA: fixup CM/AM order within Apple steps, move `name:` first, quote them

Closes #16092

6 months agoprojects: fix `INSTALL-CMAKE.md` references
Viktor Szakats [Sun, 26 Jan 2025 14:08:58 +0000 (15:08 +0100)] 
projects: fix `INSTALL-CMAKE.md` references

Follow-up to 0f4c19b66ad5c646ebc3c4268a0f3ad9c15bf57c #12772

6 months agowindows: drop two missed `buildconf.bat` references
Viktor Szakats [Sun, 26 Jan 2025 14:04:51 +0000 (15:04 +0100)] 
windows: drop two missed `buildconf.bat` references

Follow-up to 0035ff45c59437db1a8ffe960b40905c8582b149 #16081

6 months agobuild: drop `tool_hugehelp.c.cvs`, tidy up macros, drop `buildconf.bat`
Viktor Szakats [Fri, 24 Jan 2025 13:22:23 +0000 (14:22 +0100)] 
build: drop `tool_hugehelp.c.cvs`, tidy up macros, drop `buildconf.bat`

Rework the way `tool_hugehelp.c` is included in builds.

After this patch, with `./configure` and CMake `tool_hugehelp.c` is only
compiled when building with manuals enabled. With manuals disabled this
source file is not used anymore. The method is similar to how
8a3740bc8e558b9a9d4a652b74cf27a0961d7010 implemented `tool_ca_embed.c`.
`./configure` always generates it as before, otherwise the build fails.

- winbuild: rework to not need `buildconf.bat`, but automatically use
  `tool_hugehelp.c` if present (e.g. when building from an official
  source tarball) and enable `USE_MANUAL` accordingly.

- `buildconf.bat`: after dropping `tool_hugehelp.c` generation, the only
  logic left was `cp Makefile.dist Makefile`. This allowed to launch
  winbuild builds via GNU Make in a Git repo. Drop this option together
  with the batch file.

- build `libcurltool` without `USE_MANUAL` macro to exclude the manual
  and the dependence on the generator commands. Drop relying on
  `UNITTESTS` for this purpose.
  Follow-up to 96843f4ef74e02452972fd97fe15d8ff656f46ec #16068

- `src/mkhelp.pl`: include `tool_hugehelp.h` before using `USE_MANUAL`
  to have it set in `config-*.h` builds with source tarballs created
  with manual but without zlib.

Closes #16081

6 months agotests: change the behavior of swsbounce
Jay Satiro [Sat, 25 Jan 2025 08:17:10 +0000 (03:17 -0500)] 
tests: change the behavior of swsbounce

- Change the swsbounce keyword to override the part number on a
  subsequent request to the previous part number + 1.

Note the previous part number in this case is the part number that
was returned as a response to the previous request and contained
the swsbounce keyword.

Prior to this change swsbounce incremented the part number of the
subsequent request instead of overriding it, and did so in a more
limited fashion that prevented chaining swsbounce in multiple responses.

For example, if the test makes a request that causes the sws server to
return `<data>` as a response and that response contains `swsbounce`
then for the next response the sws server returns `<data1>`. If
`<data1>` also contains `swsbounce` then for the next response the sws
server now returns `<data2>` instead of the requested part.

Fixes https://github.com/curl/curl/discussions/16074
Closes https://github.com/curl/curl/pull/16085

6 months agodocs/HTTPSRR.md: fix typo in option name
Viktor Szakats [Sun, 26 Jan 2025 01:22:31 +0000 (02:22 +0100)] 
docs/HTTPSRR.md: fix typo in option name

Follow-up to 7f4f192f04ce5509046af76e34ba14e34a87a8dc #16052

6 months agocmake/Find: add `iphlpapi` for c-ares, omit syslibs if dep not found
Viktor Szakats [Sun, 26 Jan 2025 00:17:42 +0000 (01:17 +0100)] 
cmake/Find: add `iphlpapi` for c-ares, omit syslibs if dep not found

- add `iphlpapi` library for c-ares.
  Ref: https://github.com/curl/curl-for-win/commit/082d98ba6b3bdaca07c340796371da100515a335

- fix to not add system libs if the dependency was not found.
  librtmp, Rustls, wolfSSL
  Follow-up to 421e592db25cbbe4baadfeef8e6ed75a57579d0a #15832
  Follow-up to 7bab201abe3915a0167c002f9308950cb8a06e4b #15193

Closes #16089

6 months agodocs/HTTPSRR.md: initial HTTPS RR documentation 16052/head
Daniel Stenberg [Sun, 19 Jan 2025 11:51:37 +0000 (12:51 +0100)] 
docs/HTTPSRR.md: initial HTTPS RR documentation

Closes #16052

6 months agoasyn-thread: use c-ares to resolve HTTPS RR
Daniel Stenberg [Tue, 21 Jan 2025 10:42:20 +0000 (11:42 +0100)] 
asyn-thread: use c-ares to resolve HTTPS RR

Allow building with c-ares and yet use threaded resolver for the main
host A/AAAA resolving:

  `--with-ares` provides the c-ares install path and defaults to use
  c-ares for name resolving

  `--with-threaded-resolver` still uses c-ares in the build (for HTTPS)
  but uses the threaded resolver for "normal" resolves.

It works similarly for cmake: ENABLE_ARES enables ares, and if
ENABLE_THREADED_RESOLVER also is set, c-ares is used for HTTPS RR and
the threaded resolver for "normal" resolves.

HTTPSRR and c-ares-rr are new features return by curl_version_info() and
thus shown by curl -V.

The c-ares-rr feature bit is there to make it possible to distinguish
between builds using c-ares for all name resolves and builds that use
the threaded resolves for the regular name resolves and c-ares for
HTTPSRR only. "c-ares-rr" means it does not use c-ares for "plain" name
resolves.

HTTPSRR support is EXPERIMENTAL only.

Closes #16054

6 months agoGHA/non-native: bump to NetBSD 10.1
Viktor Szakats [Sat, 25 Jan 2025 21:52:23 +0000 (22:52 +0100)] 
GHA/non-native: bump to NetBSD 10.1

Closes #16088

6 months agoGHA/non-native: update cross-platform-actions/action action to v0.27.0
renovate[bot] [Wed, 22 Jan 2025 10:22:36 +0000 (10:22 +0000)] 
GHA/non-native: update cross-platform-actions/action action to v0.27.0

Closes #16071

6 months agocmake: drop `CURL_USE_PKGCONFIG` from `curl-config.cmake.in`
Viktor Szakats [Sat, 25 Jan 2025 13:54:47 +0000 (14:54 +0100)] 
cmake: drop `CURL_USE_PKGCONFIG` from `curl-config.cmake.in`

This variable was meant to be used by curl Find modules, but it turns
out it makes no sense to use those from `curl-config.cmake.in`. It means
this variable was not used before and will not be used in the future,
and therefore safe to delete.

Also add missing macros passed to `curl-config.cmake` to comment.

Ref: https://github.com/curl/curl/pull/14930#discussion_r1929537797

Closes #16087

6 months agoci: update dependency cloudflare/quiche to v0.23.2
renovate[bot] [Fri, 24 Jan 2025 23:45:00 +0000 (23:45 +0000)] 
ci: update dependency cloudflare/quiche to v0.23.2

Closes #16082

6 months agoGHA/curl-for-win: fix `DOCKER_CONTENT_TRUST` for a job [ci skip]
Viktor Szakats [Fri, 24 Jan 2025 23:41:11 +0000 (00:41 +0100)] 
GHA/curl-for-win: fix `DOCKER_CONTENT_TRUST` for a job [ci skip]

Follow-up to 28230bec1ff32798a1daa1ad37ee0a43734b1d40 #15141

6 months agocontent_encoding: put the decomp buffers into the writer structs 16079/head
Daniel Stenberg [Fri, 24 Jan 2025 12:19:30 +0000 (13:19 +0100)] 
content_encoding: put the decomp buffers into the writer structs

- no more malloc/free per chunk
- removes the extra malloc entirely
- make the buffer (much) smaller (10MB => 16KB!)
- rename 'decomp' to 'buffer' to clarify purpose

Closes #16079

6 months agocontent_encoding: drop support for zlib before 1.2.0.4
Daniel Stenberg [Fri, 24 Jan 2025 10:13:24 +0000 (11:13 +0100)] 
content_encoding: drop support for zlib before 1.2.0.4

zlib 1.2.0.4 was released on 10 August 2003

Closes #16079

6 months agolib: redirect handling by protocol handler
Stefan Eissing [Thu, 23 Jan 2025 10:48:06 +0000 (11:48 +0100)] 
lib: redirect handling by protocol handler

Adds a `follow()` callback to protocol handlers, so they may decide how
to act on a `newurl` after a request has been done. This is optional.

This moves the HTTP code for handling redirects from multi.c to http.c
where it should be. If we ever add a protocol with its own logic, it
would install its own follow function.

Closes #16075

6 months agolib: clarify 'conn->httpversion'
Stefan Eissing [Wed, 22 Jan 2025 13:45:30 +0000 (14:45 +0100)] 
lib: clarify 'conn->httpversion'

The variable `conn->httpversion` was used for several purposes and it
was unclear at which time the value represents what.

- rename `conn->httpversion` to `conn->httpversion_seen`
  This makes clear that the variable only records the last
  HTTP version seen on the connection - if any. And that it
  no longer is an indication of what version to use.
- Change Alt-Svc handling to no longer modify `conn->httpversion`
  but set `data->state.httpwant` for influencing the HTTP version
  to use on a transfer.
- Add `data->req.httpversion_sent` to have a record of what
  HTTP version was sent in a request
- Add connection filter type CF_TYPE_HTTP
- Add filter query `CF_QUERY_HTTP_VERSION` to ask what HTTP
  filter version is in place
- Lookup filters HTTP version instead of using `conn->httpversion`

Test test_12_05 now switches to HTTP/1.1 correctly and the
expectations have been fixed.

Removed the connection fitler "is_httpN()" checks and using
the version query instead.

Closes #16073

6 months agobuild: fix compiling with GCC 4.x versions
Viktor Szakats [Sat, 11 Jan 2025 23:11:59 +0000 (00:11 +0100)] 
build: fix compiling with GCC 4.x versions

- silence false positive picky warnings.
- avoid "possible noreturn" warnings for standalone tests and examples.
- fix to compile without `#pragma GCC diagnostic push` support.
- fix "#pragma GCC diagnostic not allowed inside functions".

Prerequisite for #15975 that needs GCC 4.4 for the latest pre-built
CeGCC/mingw32ce toolchain for Windows CE.

Cherry-picked from #15975
Closes #16062

6 months agosrc: omit hugehelp and ca-embed from libcurltool
Viktor Szakats [Tue, 21 Jan 2025 16:11:45 +0000 (17:11 +0100)] 
src: omit hugehelp and ca-embed from libcurltool

CMake builds using the Xcode generator broke with an error saying it
doesn't support multiple targets depending on the same custom commands.
These custom commands are generating `tool_hugehelp.c` and
`tool_c_embed.c` for the curl tool and libcurltool.

`unit1394` and `unit1604` tests use libcurltool to test tool-specific
functions. They don't need hugehelp and ca-embed. It's thus safe to
disable and exclude them when compiling the sources for libcurltool.
Use the `UNITTESTS` macro to detect a libcurltool build within C.

After this patch these sources are solely used for building the curl
tool. Making the build compatible with the CMake Xcode generator.

Apply the change to autotools too to keep build systems synchronized.

Follow-up to 12a6de2f660dd692cce93cb65ce6e3ec126bb531 #16043
Closes #16068

6 months agocmake: prefer dash-style MSVC options
Viktor Szakats [Tue, 21 Jan 2025 10:30:52 +0000 (11:30 +0100)] 
cmake: prefer dash-style MSVC options

They play better with Unixy shells. The compiler has been supporting
dash options since its early versions.

Also fix to detect warnings options passed in dash-style.

Closes #16063

6 months agocfilters: kill connection filter events attach+detach
Stefan Eissing [Tue, 21 Jan 2025 13:47:29 +0000 (14:47 +0100)] 
cfilters: kill connection filter events attach+detach

Make transfer attach/detach to/from connections chepaer.

- the "attach" event was no longer implemented by any filter
- the "detach" did the same as the "done" event for the filters
  who still implemented it. It should be superfluous as the "done"
  must always happen.

Closes #16067

6 months agoRELEASE-NOTES: synced
Daniel Stenberg [Wed, 22 Jan 2025 07:08:47 +0000 (08:08 +0100)] 
RELEASE-NOTES: synced

6 months agocurl_multi_fdset: include the shutdown connections in the set
Daniel Stenberg [Sun, 19 Jan 2025 10:16:56 +0000 (11:16 +0100)] 
curl_multi_fdset: include the shutdown connections in the set

They were previously missing.

Follow-up from c9b95c0bb30f88bf00e1ac7e706c

Fixes #15156
Reported-by: Christopher Dannemiller
Closes #16049

6 months agocontent_encoding: support use of custom libzstd memory functions
Neil Johari [Fri, 17 Jan 2025 01:14:49 +0000 (17:14 -0800)] 
content_encoding: support use of custom libzstd memory functions

If ZSTD_STATIC_LINKING_ONLY is defined.

This functionality was introduced in zstd v0.8.1 in 2016 here:
facebook/zstd@be6180c

Closes #16028

6 months agoappveyor: bump to OpenSSL 3.4
Viktor Szakats [Tue, 21 Jan 2025 11:20:10 +0000 (12:20 +0100)] 
appveyor: bump to OpenSSL 3.4

Closes #16064

6 months agodocs/TLS-SESSIONS: fix typo, the->they
Yedaya Katsman [Mon, 20 Jan 2025 19:58:35 +0000 (21:58 +0200)] 
docs/TLS-SESSIONS: fix typo, the->they

Closes #16057

6 months agoeasy_lock: use Sleep(1) for thread yield on old Windows
Jay Satiro [Sun, 19 Jan 2025 06:18:23 +0000 (01:18 -0500)] 
easy_lock: use Sleep(1) for thread yield on old Windows

- Prefer Sleep(1) over sched_yield() for pre-Vista thread yield.

On Windows sched_yield is often implemented as Sleep(0) which only
yields to threads of highest priority to current priority. However,
during libcurl initialization if there is thread contention then it's
possible that there is a wait for a different library or OS thread of
a lesser priority and then the yield is not effective during that time.
On the other hand Sleep(1) will wait the minimum time slice which is
usually like 15ms or more.

Prior to this change 2c4bfef removed sched_yield detection on Windows,
which effectively removed the yield in the spin lock, and therefore this
change restores the yield but in a different way.

For Windows Vista and later we use SRW locks and do not have this issue.

Ref: https://github.com/curl/curl/pull/16037#issuecomment-2600161764
Ref: https://devblogs.microsoft.com/oldnewthing/20051004-09/?p=33923

Closes https://github.com/curl/curl/pull/16048

6 months agoGHA/non-native: fix TLS backend in Android job names
Viktor Szakats [Tue, 21 Jan 2025 00:05:56 +0000 (01:05 +0100)] 
GHA/non-native: fix TLS backend in Android job names

Also drop whitespaces/alignment.

Reported-by: Tal Regev
Follow-up to 12a6de2f660dd692cce93cb65ce6e3ec126bb531 #16043

6 months agoGHA: add iOS jobs with LibreSSL, enable dependencies for Android via vcpkg
Viktor Szakats [Sat, 18 Jan 2025 01:11:37 +0000 (02:11 +0100)] 
GHA: add iOS jobs with LibreSSL, enable dependencies for Android via vcpkg

iOS:

- add jobs with autotools, CMake, CMake Xcode generator.
  The Xcode generator is >10x slower than Unix Makefiles. Keep it
  because it's the one recommended by CMake and for having its own
  quirks we may want to know about.
- build, cache and use LibreSSL for these jobs.
  With workaround for an iOS build issue fixed in master.
- make Xcode generator work by explicitly disabling code signing.
- make tests and examples build with the Xcode generator by setting
  `-DMACOSX_BUNDLE_GUI_IDENTIFIER=se.curl`, to avoid
  "Bundle identifier is missing" errors.
- cmake: disable `CURL_USE_PKGCONFIG` by default for Apple device.
- cmake: add `stdc++` library for BoringSSL and AWS-LC, with
  `OPENSSL_USE_STATIC_LIBS=ON` set.
- cmake: add workaround for Xcode generator issue, where it cannot
  handle two targets depending on one custom command. A better fix may
  be dropping `tool_hugehelp.c` and `tool_ca_embed.c` from curltool
  library. For a future PR.

Android:

- add vcpkg to Android jobs, enable dependencies.
Assisted-by: Tal Regev via #16045
- make vcpkg work with autotools.
- pass `--with-brotli` to autotools to detect the vcpkg-supplied brotli.
- enable BoringSSL for Android and add a job with it.
- silence 457 CMake configure warnings about the Android NDK CMake
  scripts targeting freshly deprecated CMake versions.

These were much more involved than imagined. Basically nothing works out
of the box, and when combined, everything becomes a unique edge case.
autotools builds were a much easier to make work than CMake ones.

Also:

- GHA/non-native: re-sync names to be shorter and more aligned with
  other workflows.
- GHA: add `persist-credentials: false` where missing.

Unresolved issues:

- `OPENSSL_ROOT_DIR` ignored/mis-used when pointing it to LibreSSL.
  CMake seems to prepend the sysroot to the passed absolute directory.
  Found no workaround.
- CMake when combined with Android, both the Google-recommended method
  and the built-in CMake method fail to provide a way to avoid
  `pkg-config` packages at system directories. Failed to find a knob
  that can remove `/usr/include` from the search path. The workaround is
  to disable zstd. (I enabled it by default in this release, maybe
  premature?: f2adb3b6d73cad0c28ec8a32f5fa969d0f6378a0 #15431)
  Disabling `pkg-config` doesn't work because vcpkg dependencies do not
  link without it.
- CMake's Xcode generator is slow because each `try_compile()` feature
  check springs a new CMake + Xcode project taking a long time to run,
  just to compile single-liner C files. A known issue, with no solution.
  `-DCMAKE_MACOSX_BUNDLE=OFF` did not help, limiting build types to
  a single one (e.g. `Debug`) also had no effect.
   make | Xcode | GHA run
  :---- | :---- | :--------------------------------------------------------------------
    16s | 2m57s | https://github.com/curl/curl/actions/runs/12866334102/job/35868712426
    23s | 4m13s | https://github.com/curl/curl/actions/runs/12868128013/job/35874212461
    16s | 3m39s | https://github.com/curl/curl/actions/runs/12859073531/job/35849041880
    14s | 2m23s | https://github.com/curl/curl/actions/runs/12858298423/job/35847201313
    15s | 2m36s | https://github.com/curl/curl/actions/runs/12858058492/job/35846669761
    19s | 3m19s | https://github.com/curl/curl/actions/runs/12868919430/job/35876601168

Closes #16043

6 months agowindows: merge `config-win32ce.h` into `config-win32.h`
Viktor Szakats [Fri, 17 Jan 2025 20:33:12 +0000 (21:33 +0100)] 
windows: merge `config-win32ce.h` into `config-win32.h`

They were more or less the same, but each missed some things the other
had. Windows CE is a subset of Win32, make the headers reflect that and
avoid duplications.

Ref: #15975
Closes #16038

6 months agoGHA: replace hard-coded home dir in cache `path:` with `~`
Viktor Szakats [Mon, 20 Jan 2025 14:17:02 +0000 (15:17 +0100)] 
GHA: replace hard-coded home dir in cache `path:` with `~`

Closes #16056

6 months agodocs: document the behavior of -- in the curl command line
9cel [Mon, 20 Jan 2025 10:35:42 +0000 (06:35 -0400)] 
docs: document the behavior of -- in the curl command line

Closes #16053

6 months agolibcurl/opts: do not save files in dirs where attackers have access
Daniel Stenberg [Sun, 19 Jan 2025 11:35:39 +0000 (12:35 +0100)] 
libcurl/opts: do not save files in dirs where attackers have access

libcurl cannot fully protect against attacks where an attacker has write
access to the same directory where it is directed to save files. This is
particularly sensitive if you save files using elevated privileges.

Previously only mentioned in VULN-DISCLOSURE-POLICY.md.

Highlighted-by: Donguk Kim
Closes #16051