Commit Graph

33477 Commits

Author SHA1 Message Date
Viktor Szakats
86d5c2651d
configure: drop unused bare socket.h detection
Added in 37eba37019 (2009-06-17) to help
detecting socket functions.

But, this `socket.h` isn't used in the source code since
90dd1fc664 #8288 (2022-01-16).

Closes #15173
2024-10-07 12:31:37 +02:00
Viktor Szakats
6cfb615e92
sws: fix unused static function with TCP_NODELAY undefined
Closes #15171
2024-10-07 12:31:21 +02:00
Viktor Szakats
2d1959dd0c
configure: drop duplicate feature checks for poll(), if_nametoindex()
Before this patch they were detected via manual methods, then with
`AC_CHECK_FUNCS()`.

Delete the manual checks and keep the latter.

Also delete `CURL_INCLUDES_POLL()` which is no longer used after
the above.

Closes #15170
2024-10-07 12:31:21 +02:00
Viktor Szakats
5e70566094
build: detect and use _setmode() with Cygwin/MSYS, also use on Windows
Before this patch `setmode()` was not detected with Cygwin/MSYS, because
it's a macro, not a function, and detection is looking for a function.

Switching to symbol detection doesn't work because it mis-detects it on
BSD systems which features a function with the same name but different
functionality and arguments.

Fix it by looking for a `_setmode()` function on Cygwin/MSYS, and use it
if available.

`_setmode()` is recommended over `setmode()` by Windows documentation so
use that on Windows too. It seems to be available on all supported
compilers, so omit detection.

https://learn.microsoft.com/cpp/c-runtime-library/reference/posix-setmode
https://learn.microsoft.com/cpp/c-runtime-library/reference/setmode

Officially Windows requires argument `_O_BINARY` with an underscore.
`O_BINARY` is also supported but bound to conditions. Continue to use it
for simplicity. Cygwin supports `O_BINARY` (no underscore).

Closes #15169
2024-10-07 12:31:21 +02:00
Viktor Szakats
948a2b24f9
ech: spelling, whitespace, say --ech default config
Closes #15167
2024-10-07 12:31:21 +02:00
Viktor Szakats
a71bc67f2c
GHA/macos: comment spelling and clarity
Closes #15166
2024-10-07 12:31:21 +02:00
Viktor Szakats
1d96067224
build: add ldap to libcurl.pc Requires:
Closes #15163
2024-10-07 12:31:21 +02:00
Daniel Stenberg
d9a9233afa
RELEASE-NOTES: synced 2024-10-07 08:33:32 +02:00
Daniel Stenberg
19af07e7ef
INSTALL-CMAKE.md: mention focus on shared libraries
Match what the INSTALL.md document says for configure builds.

Reported-by: Nemos2024 on github
Fixes #14845
Closes #15168
2024-10-07 08:22:15 +02:00
renovate[bot]
6fe1c3bc6a
ci: update dependency ngtcp2/nghttp3 to v1.6.0
Closes #15161
2024-10-06 22:59:24 +02:00
renovate[bot]
4407b890a8
ci: update dependency ngtcp2/ngtcp2 to v1.8.0
Closes #15162
2024-10-06 22:59:03 +02:00
Viktor Szakats
3bd6728664
GHA/non-native: fix OmniOS job to fail on tests
Before this patch a failed test did not result in a failed CI job.

Closes #15160
2024-10-05 20:38:00 +02:00
Viktor Szakats
b171ee6019
cmake: use OpenSSL for LDAP detection only if available
Also unset `CMAKE_REQUIRED_LIBRARIES` in two error branches.

Reported-by: Vollstrecker on github
Fixes #15077
Closes #15152
2024-10-05 01:08:45 +02:00
Daniel Stenberg
e9eda865df
warnless: remove curlx_sktosi and curlx_sitosk
They were only used by test server code. Use plain old typecasts there.

Closes #15153
2024-10-05 00:28:06 +02:00
Dan Fandrich
57cc523378 tests: enable additional ruff Python lint options
These all seem reasonable to enable for this code.
2024-10-04 14:03:17 -07:00
Dan Fandrich
223fb00a78 CI: run pytype and ruff on Python code
These ensure a more consistent style and can find some errors statically
that would otherwise only be seen at run-time. Also, bump the Ubuntu
version of some other checks to get newer versions of some linters.

Closes #15067
2024-10-04 14:02:47 -07:00
Dan Fandrich
0f7ba5c5bf tests: change Python code style to pass ruff checks
Most of the changes consisted of removing unused imports and unnecessary
f-strings.
2024-10-04 14:02:05 -07:00
Dan Fandrich
2f3b7f20fb tests: fix some Python typing issues
These otherwise raise errors in pytype. A few problematic methods
weren't being used and are deleted.
2024-10-04 13:57:04 -07:00
Daniel Stenberg
0b864bde08
CURLOPT_HEADERFUNCTION.md: do not modify the passed in buffer
Closes #15148
2024-10-04 15:35:20 +02:00
Daniel Stenberg
6f454bab75
asyn-ares: remove typecast, fix expire
- Use the appropriate variable type for the curlx_tvtoms() return code:
  timediff_t and remove the typecast.

- Simplify the function and avoid the odd expire adjustment that
  probably is a rest from ancient days when the expire function did not
  handle zero millisecond timeouts.

Closes #15145
2024-10-04 14:08:09 +02:00
Viktor Szakats
b531e33070
cmake: add missed variable to comment [ci skip]
Follow-up to 9f56bb608e #14681
2024-10-04 02:10:29 +02:00
Stefan Eissing
bc055d08ac
test1915: add tracing and connect timeout
Since we see Windows fails of 1915, add tracing and a connect timeout.
The test uses a port no one is supposed to listen on, but Windows has
this weird wait logic. So, set a short timeout.

Closes #15107
2024-10-03 16:06:08 +02:00
Daniel Stenberg
566a6d7b09
urlapi: normalize the IPv6 address
As the parsing and address "regeneration" are done anyway, we might as
well use the updated version in the result and thereby A) get a
normalized (and lower cased) version of the address and B) avoid a
strcpy().

Updated test 1560 to verify.

Closes #15143
2024-10-03 16:05:03 +02:00
Daniel Stenberg
87e19ea68f
tests/valgrind.supp: remove a travis suppression, add a Debian
We have not used Travis for years. The Debian one appears on my dev
machine since a while back.

Closes #15142
2024-10-03 16:03:43 +02:00
Stefan Eissing
65eb20260b
openssl quic: populate x509 store before handshake
Since OpenSSL does its own send/recv internally, we may miss the moment
to populate the x509 store right before the server response. Do it
instead before we start the handshake, at the loss of the time to set
this up.

Closes #15137
2024-10-03 14:43:47 +02:00
Stefan Eissing
6c1b15768c
pytest: improve pytest_07_42a reliability
Due to timings on paused response receive, the error code may vary due
to the location where it is detected that the server closed the transfer
prematurely.

Be more lenient in always allowing PARTIAL_FILE as ok.

Closes #15138
2024-10-03 14:42:52 +02:00
Stefan Eissing
e1f93beffe
test1515: add tracing and more debug info
Test failed on some Windows CI and log files did not really
tell why. Add more output.

Closes #15140
2024-10-03 14:41:55 +02:00
Viktor Szakats
28230bec1f
GHA/curl-for-win: tidy up DOCKER_CONTENT_TRUST
Follow-up to 08d13c0e46
Closes #15141
2024-10-03 14:33:37 +02:00
Stefan Eissing
2400a6c6b2
bufq: unwrite fix
`Curl_bufq_unwrite()` used the head instead of the tail chunk to shrink
the bufq's content. Fix this and add test case that checks correct
behaviour.

Amended test 2601 accordingly.

Reported-by: Chris Stubbs
Closes #15136
2024-10-03 13:27:36 +02:00
Viktor Szakats
08d13c0e46
GHA/curl-for-win: re-enable image verification for debian:bookworm-slim
Follow-up to a35f223cd8
2024-10-03 12:51:13 +02:00
Tal Regev
841f42150a
GHA/windows: add workaround for upstream vcpkg issue
Fixes:
```
error: https://github.com/google/brotli/archive/v1.1.0.tar.gz: WinHttpSendRequest failed with exit code 10106
```

Apply workaround:
https://github.com/microsoft/vcpkg/issues/41199#issuecomment-2378255699

Bug commit: d3fc35774f (diff-33cf7c311a76d4a838f91b078c2f8cbc984557379f7b345a268ec6deb665a91eR666-R675)
Fix commit: 3122da72b1
Fix PR: https://github.com/microsoft/vcpkg-tool/pull/1501

Fixes #15128
Reported-by: Viktor Szakats
Closes #15133
2024-10-03 11:28:11 +02:00
Viktor Szakats
a35f223cd8
GHA/curl-for-win: disable DOCKER_CONTENT_TRUST
As a workaround for the latest Debian image missing the necessary keys:
```
No signatures for debian:testing-20240926-slim

Administrative keys for debian:testing-20240926-slim

  Repository Key:       5717dcd81d9fb5b73aa15f2d887a6a0de543829ab9b2d411acce9219c2f8ba3a
  Root Key:     575d013f89e3cbbb19e0fb06aa33566c22718318e0c9ffb1ab5cc4291e07bf84
No valid trust data for testing-20240926-slim
```
https://github.com/curl/curl/actions/runs/11067644862/job/30752034560?pr=15065

Ref: 0ad1ad511b
2024-10-03 11:05:45 +02:00
Daniel Stenberg
7b12c36ca9
DEPRECATE: remove hyper in January 2025
Previously this document stated we would do it after February, but now
it will be done already for the first January 2025 release.

The reason being that since we decided to deprecate hyper, the
degradation speed has increased as now no one bothers to fix issues in
the hyper side of things. Also: not a single soul has yet spoken up in
favor of keeping the support.

Closes #15135
2024-10-03 10:51:27 +02:00
Daniel Stenberg
679f18ef80
RELEASE-NOTES: synced 2024-10-03 09:34:53 +02:00
Daniel Stenberg
bcec0840b0
lib: use bool/TRUE/FALSE properly
booleans should use the type 'bool' and set the value to TRUE/FALSE

non-booleans should not be 'bool' and should not set the value to
TRUE/FALSE

Closes #15123
2024-10-03 09:31:56 +02:00
Daniel Stenberg
78ed473dbc
wolfssl: add proper colon separator
Follow-up to 6fd5a9777a

Fixes #15132
Reported-by: Viktor Szakats
Closes #15134
2024-10-03 09:28:02 +02:00
Daniel Stenberg
98591551dc
vtls: convert Curl_pin_peer_pubkey to use dynbuf
Closes #15126
2024-10-03 08:33:53 +02:00
Daniel Stenberg
ebd9d67b8a
vtls: convert pubkey_pem_to_der to use dynbuf
... instead of malloc and "manual" buffer stuffing

Closes #15126
2024-10-03 08:33:53 +02:00
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