Commit Graph

34209 Commits

Author SHA1 Message Date
Daniel Stenberg
995db17484
RELEASE-PROCEDURE.md: adjust release dates
Due to the calendar tweak with the pending patch release on December 11.
2024-11-08 11:02:39 +01:00
Viktor Szakats
96edb5f611
cmake: drop cmake args list from buildinfo.txt
Collecting the args list has the undesired side-effect of silencing
CMake warnings about unused variables passed via the command-line.

Drop it till a better method is found to retrieve them.

Reported-by: Kai Pastor
Ref: https://github.com/curl/curl/pull/14936#issuecomment-2460350977
Follow-up to 1fdea16846 #14802
Closes #15501
2024-11-08 10:51:46 +01:00
Viktor Szakats
4d8ab1f1b8
GHA/macos: let gcc dictate the configured Apple SDK
As discovered earlier, Homebrew gcc is built against a specific Apple
SDK version and doesn't work when matched up with a different version,
e.g. the one advertised as default by the macos runner image.

Before this patch this was resolved with brute force by zapping the
hack-layer gcc component to avoid the bad interference. This worked
for us, but it's fragile, accidental and doesn't translate to
real-world build environments. Thus, impractical.

Avoid this by explicitly selecting the SDK version gcc was built for and
meant to be used with, as shown by `gcc --print-sysroot`.

It assumes that the gcc binaries preinstalled on the runner images
always ship with the SDK version they reference. It also assumes
this works with and without `brew update`.

Also:
- add 4 quick build-only jobs to test all gcc/macos combos.
- list SDKs offered via CommandLineTools.

Suggested-by: Bo Anderson
Ref: https://github.com/Homebrew/homebrew-core/issues/194778#issuecomment-2462764619

Follow-up to c349bd668c #14097
Closes #15518
2024-11-08 10:48:12 +01:00
Viktor Szakats
cb092c0a7e
GHA: add apt update where missing
To mitigate this kind of (repeat) errors:
```
Err:14 http://azure.archive.ubuntu.com/ubuntu noble-updates/main amd64 python3-werkzeug all 3.0.1-3ubuntu0.1
  404  Not Found [IP: 40.81.13.82 80]
E: Failed to fetch http://azure.archive.ubuntu.com/ubuntu/pool/main/p/python-werkzeug/python3-werkzeug_3.0.1-3ubuntu0.1_all.deb
Fetched 10.4 MB in 4s (2593 kB/s)
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
```
https://github.com/curl/curl/actions/runs/11732257460/job/32684111508#step:3:74

Follow-up to 842f88434f #15082
Closes #15519
2024-11-08 10:48:11 +01:00
Daniel Stenberg
a3b4ffd429
TODO: consider OCSP stapling by default
Suggested-by: Nicolas F.
Closes #15483
Closes #15521
2024-11-08 08:57:45 +01:00
Ben Greear
1f6767e7a0
vtls: fix compile warning when ALPN is not available
Ref: https://curl.se/mail/lib-2024-11/0013.html

Closes #15515
2024-11-07 23:48:32 +01:00
Daniel Stenberg
f4ee7bafda
cmdline/ech.md: formatting cleanups
Reported-by: Samuel Henrique
Fixes #15506
Closes #15517
2024-11-07 23:47:17 +01:00
Daniel Stenberg
0cdde0fdfb
netrc: support large file, longer lines, longer tokens
Regression from 3b43a05e00 (shipped in 8.11.0)

Reported-by: Moritz
Fixes #15513
Closes #15514
2024-11-07 18:20:28 +01:00
Jesus Malo Poyatos
878bc429f2
setopt: fix CURLOPT_HTTP_CONTENT_DECODING
Regression from 30da1f5974 (shipped in 8.11.0)

Fixes #15511
Closes #15510
2024-11-07 17:29:36 +01:00
Daniel Stenberg
cadfe0de68
RELEASE-NOTES: synced
Bump to 8.11.1
2024-11-07 13:16:47 +01:00
Stefan Eissing
bcf8a84881
mbedtls: call psa_crypt_init() in global init
Run mbedtls' psa_crypt_init() in the general global init, optionally
protected by mbedtls locks when available.

CI: when building mbedtls, enabled thread safety

Reported-by: wxiaoguang on github
Fixes #15500
Closes #15505
2024-11-07 13:14:41 +01:00
Daniel Stenberg
f5c616930b
duphandle: also init netrc
The netrc init was only done in the Curl_open, meaning that a duplicated
handle would not get inited properly.

Added test 2309 to verify. It does netrc auth with a duplicated handle.

Regression from 3b43a05e00

Reported-by: tranzystorekk on github
Fixes #15496
Closes #15503
2024-11-07 09:47:53 +01:00
Daniel Stenberg
9919149aef
cookie: treat cookie name case sensitively
Extend test 31 to verify

Reported-by: delogicsreal on github
Fixes #15492
Closes #15493
2024-11-06 13:09:20 +01:00
Daniel Stenberg
b1ef0e1a01
RELEASE-NOTES: synced
Release time
2024-11-06 08:05:56 +01:00
Daniel Stenberg
62020546cc
THANKS: contributors from the 8.11.0 release 2024-11-06 08:05:56 +01:00
Viktor Szakats
380790b244
GHA/non-native: fix installing OpenLDAP on OpenBSD
Also:
- drop failing manual install of perl. It's there by default now.
- add link to OpenBSD package management FAQ page.

Closes #15491
2024-11-06 02:42:09 +01:00
Viktor Szakats
087f77d855
GHA/macos: drop WebSockets from job names
It's enabled in all jobs by default now.

Follow-up to cd63629733 #15076
2024-11-06 01:43:55 +01:00
Viktor Szakats
1b4897f3c8
RELEASE-NOTES: update cmake LDAP-related entry [ci skip]
Reported-by: Kai Pastor
Bug: https://github.com/curl/curl/pull/15255#issuecomment-2457558219
Follow-up to 2c90f7f69e #15255
2024-11-05 21:17:30 +01:00
Daniel Stenberg
e1ed6b8e29
mbedtls: remove failf() use from mbedtls_random
Since data can be NULL in here, calling failf() can be bad. This should
also be a terribly rare error so the lack of error message for this
should be manageable.

Reported-by: wxiaoguang on github
Fixes #15485
Closes #15486
2024-11-05 11:54:55 +01:00
Stefan Eissing
3a35901a11
wolfssl: coexist with openssl, further work
Build wolfSSL master with

./configure --prefix=/path --enable-ip-alt-name --enable-quic
--enable-earlydata --enable-psk --enable-opensslcoexist

and configure curl with openssl + wolfssl. Normal tests run.

pytest session resumption fails, as wolfssl does not handle the
new_session callback without opensslextra right now.

Closes #15481
2024-11-04 14:48:30 +01:00
Daniel Stenberg
f81abcbfeb
RELEASE-NOTES: synced 2024-11-04 10:40:42 +01:00
Daniel Stenberg
4133007798
wolfssl: no more use of the OpenSSL API
Allows curl to build with a wolfSSL built without its OpenSSL API.

It should allow curl to (soon?) build with *both* wolfSSL and OpenSSL

This change makes curl use its own sha256 implementaion when built with
wolfSSL: room for improvement.

Closes #15480
2024-11-04 10:23:05 +01:00
renovate[bot]
46bd595b77
ci: update dependency wolfSSL/wolfssh to v1.4.19
Closes #15476
2024-11-04 08:44:33 +01:00
Daniel Stenberg
6b2bc8130c
openssl: extend the OpenSSL error messages
Previously there were three error situations that only added the (unhelpful)
OpenSSL error strings, now we prefix those with a short explanation for the
error situation.

Reported-by: Jeroen Ooms
Fixes #15473
Closes #15474
2024-11-04 08:42:05 +01:00
Jonas 'Sortie' Termansen
78c3172921
curl_addrinfo: support operating systems with only getaddrinfo(3)
The gethostbyname(3) family was removed in POSIX-1.2008 in favor of
getaddrinfo(3) introduced in POSIX-1.2001. Modern POSIX systems such as
Sortix does not have gethostbyname nor the related definitions and
structures.

curl already only uses getaddrinfo(3) if available and thread safe,
although there is mild breakage if the related gethostbyname definitions
are missing.

This change attempts to fix that breakage:

Remove an unnecessary configure error if gethostbyname is missing since
getaddrinfo is enough as a fallback.

Rewrite Curl_ip2addr to not use struct hostent as it no longer is
standardized and create the struct Curl_addrinfo directly.

Only define the Curl_he2ai function on non-getaddrinfo systems where it
is going to be used with struct hoestent.

Revoke the fallback logic for when it's unknown whether getaddrinfo is
thread safe. It doesn't appear to make any sense since h_errno is
unrelated to getaddrinfo. The logic prevents new POSIX.1-2024 systems
from passing the thread safety test since h_errno does not exist anymore
and POSIX already requires getaddrinfo to be thread safe. There's
already a denylist in place for operating systems with known buggy
implementations.

Closes #15475
2024-11-02 22:28:59 +01:00
Viktor Szakats
25025419c9
pytest: include curl version string and python platform in log
For the Test Clutch matrix.

https://testclutch.curl.se/static/reports/feature-matrix.html

Assisted-by: Dan Fandrich
Closes #15470
2024-11-02 01:56:55 +01:00
Viktor Szakats
9d32724c12
certs: add missing -CAcreateserial option for LibreSSL
Also:
- display openssl path and version.
- quote a string.

Follow-up to 9b0c0d6ade #15129

Closes #15471
2024-11-01 15:36:48 +01:00
Viktor Szakats
97d69ec0da
winbuild: drop gen_resp_file.bat
`gen_resp_file.bat` could be reduced to 3 lines.
Those lines are simple to use from `Makefile.vc` as-is.

Also drop the unnecessary tabs.

Closes #15463
2024-11-01 11:36:54 +01:00
Dan Fandrich
d88db0b6b2 tests: use a set for several of the curl_props
These are used for member-of testing, so a set is more appropriate and
efficient. Also, fix a couple cases of bad exceptions.

Closes #15462
2024-10-31 20:14:44 -07:00
Stefan Eissing
9b863ac670
vquic: recv_mmsg, use fewer, but larger buffers
Reported-by: koujaz on github
Fixes #15267
Closes #15454
2024-10-31 23:40:51 +01:00
Stefan Eissing
922235e56b
ngtcp2: do not loop on recv
The vquic_recv_packets() function already loops when not all requested
packets can be received (until EAGAIN) and there is not need to do that
again in ngtcp2.

Closes #15466
2024-10-31 14:08:58 +01:00
Viktor Szakats
2f22fc10e5
GHA/linux-old: adjust configure job name 2024-10-31 13:26:27 +01:00
Viktor Szakats
329a8e9daa
unit1307: tidy up Apple OS detection
Use `__APPLE__` macro to detect Apple OS instead of relying on
the string in `CURL_OS`.

This also fixes detection with default CMake builds where `CURL_OS` is
`Darwin`. The code before this patch was expecting this substring in
lowercase.

Closes #15461
2024-10-31 09:09:01 +01:00
edmcln
9640a8ef6f
schannel: fix TLS cert verification by IP SAN
Reported-by: elvinasp on github
Fixes #15149
Closes #15421
2024-10-31 08:59:37 +01:00
Viktor Szakats
fb711b5098
build: fix clang-cl builds, add CI job
- appveyor: add build-only job for clang-cl.

- cmake: `-pedantic-errors` enables `-Werror,-Wlanguage-extension-token`
  automatically, which makes `__int64` detection fail.
  Explictly disable this compiler warning for clang-cl to make the
  feature detection work and to accept `__int64` in the source code.

- cmake: disable `-Wlanguage-extension-token` warning for clang-cl
  to fix these when encountering `__int64`:
  ```
  lib/formdata.c(797,29): error : extension used [-Werror,-Wlanguage-extension-token]
  lib/warnless.c(117,33): error : extension used [-Werror,-Wlanguage-extension-token]
  lib/warnless.c(60,28): message : expanded from macro 'CURL_MASK_SCOFFT'
  lib/warnless.c(59,38): message : expanded from macro 'CURL_MASK_UCOFFT'
  include\curl/system.h(352,40): message : expanded from macro 'CURL_TYPEOF_CURL_OFF_T'
  ```

- make `__GNUC__` warning suppressions apply to `__clang__` too.
  Necessary for clang-cl, which defines the latter, but not the former.
  (Regular clang defines both.)

- examples: fix clang-cl compiler warning in `http2-upload.c`.
  ```
  docs\examples\http2-upload.c(56,5): error : no previous prototype for function 'my_gettimeofday' [-Werror,-Wmissing-prototypes]
  docs\examples\http2-upload.c(56,1): message : declare 'static' if the function is not intended to be used outside of this translation unit
  ```

- unit2604: add missing `#pragma GCC diagnostic pop`.
  Follow-up to e53523fef0 #14859

- unit1652: limit compiler warning suppression to GCC.
  They do not affect clang builds.
  Follow-up to 71cf0d1fca #14772

Closes #15449
2024-10-30 23:15:32 +01:00
Viktor Szakats
9acecc923d
tidy-up: whitespace, fix CI spacecheck for docs
Also: fixup CI spacecheck to apply to docs again.

Closes #15423
2024-10-30 23:15:28 +01:00
Daniel Stenberg
0cececef0f
config: rename the OS define to CURL_OS to reduce collision risk
Reported-by: Jon Rumsey
Fixes #15455
Closes #15457
2024-10-30 14:59:54 +01:00
Daniel Stenberg
c0d2b9bee7
MQTT: remove trailing newline 2024-10-30 14:04:08 +01:00
Daniel Stenberg
98561a3bef
RELEASE-NOTES: synced 2024-10-30 09:47:06 +01:00
Viktor Szakats
bc6212004a
pytest: show curl features and protocols
For the Test Clutch matrix.

https://testclutch.curl.se/static/reports/feature-matrix.html

Closes #15452
2024-10-30 09:32:29 +01:00
Marwan Yassini
e4aa07b526
mqtt: fix mqtt.md wording and add clearer explanation
Some of the wording in the mqtt.md confused me as to how the commands
were used and what they did, so I cleared up some of the wording to
better explain what each command does.

Closes #15451
2024-10-30 08:44:05 +01:00
Jay Satiro
22e7b1512b winbuild/README: consolidate command prompt section
- Remove reference to 'Developer Command Prompt for Visual Studio'
  shortcut since it opens in x86 mode.

That prompt may confuse users since it is not easily switched to x64.
Our instruction says vcvarsall can be used to change the platform but it
is not in the path in any version that I checked (VS 2010, 2013, 2022).

Instead users will now only see the remaining instruction to use a
platform specific command prompt to build curl, like "x64 Native Tools".

There's several links as well to Microsoft documentation for users that
have more complicated requirements, such as using vcvarsall.

Closes https://github.com/curl/curl/pull/15313
2024-10-30 01:30:15 -04:00
renovate[bot]
85ee614020
ci: update rojopolis/spellcheck-github-actions digest to 74c2a14
Closes #15412
2024-10-29 15:52:30 +01:00
Jon Rumsey
b57e9c8f9b
OS400: don't delete source files when building with debug
Debugger not able to work against curl *SRVPGM when using temporary
source files.

Fixes #15445
Closes #15446
2024-10-29 15:44:05 +01:00
Stefan Eissing
0d475da1c4
pytest: fix run against multissl curl
Changes to make a curl built with OpenSSL + GnuTLS to run successfully
in our pytests. Run

CURL_SSL_BACKEND=openssl pytest

to test a TLS backend other than the default.

Closes #15443
2024-10-29 11:13:56 +01:00
Daniel Stenberg
a70f5bc4b5
curl/config2setopts: move SSH related options into same block
Move the code setting SSH specific libcurl options into the same block
to avoid having a separate almost identical condition later.

Closes #15444
2024-10-29 11:05:22 +01:00
Daniel Stenberg
84f96e3363
tool_operate: url_proto improvements
- renamed to url_proto_and_rewrite to better reveal what it does
- clarify the functionality in the top comment
- make it return CURLE_OUT_OF_MEMORY appropriately
- remove check for URL being set, use assert instead

Closes #15442
2024-10-29 10:07:37 +01:00
Daniel Stenberg
a273cc255f
multi: fix "Useless Assignment"
CodeSonar pointed out "This code assigns the variable the same value it
already had"

Follow-up to e77326403d

Closes #15441
2024-10-29 09:41:43 +01:00
Daniel Stenberg
b7a06dee50
setopt: return error for bad input to CURLOPT_RTSP_REQUEST
And leave the value untouched. Previously, an unrecognized argument
would reset it to RTSPREQ_NONE (and still return OK).

Closes #15440
2024-10-29 09:40:56 +01:00
Viktor Szakats
74c7b672d9
runtests: add comment for handle64 pathsep requirement [ci skip]
Cherry-picked from #14949
2024-10-29 09:27:42 +01:00