Commit graph

38509 commits

Author SHA1 Message Date
Viktor Szakats
8b7e460cce
checksrc: add missing items to warnings hash, alpha-sort
Closes #21434
2026-04-24 10:14:26 +02:00
Viktor Szakats
ee65f19e2a
checksrc: fix code quality findings
- fix counting errors. Update test1185 results accordingly.
- fix an error message.
- tidy up regexp syntax.

Pointed out by GitHub Code Quality

Closes #21429
2026-04-24 09:46:35 +02:00
Daniel Stenberg
4bc34a5416
doh: fix #ifdef name
Spotted by Copilot

Closes #21431
2026-04-24 08:56:35 +02:00
Daniel Stenberg
5c756684ba
hostip: init the curl_jmpenv_lock appropriately
A zero-initialized static value is not guaranteed to be a valid mutex on
all POSIX implementations

Spotted by Codex Security

Closes #21432
2026-04-24 08:30:33 +02:00
Daniel Stenberg
eea9ce45a4
urldata.h: fix typo and lingering backtick
Spotted by Copilot

Closes #21430
2026-04-24 08:18:57 +02:00
Daniel Stenberg
961a13e366
rustls: fix memory leak on repeated SSLKEYLOGFILE fails
Before this fix, Curl_tls_keylog_open() assigned the environment
variable result to a global keylog_file_name without freeing any prior
allocation. If the file cannot be opened (e.g., permission error)
keylog_file_fp stays NULL, so subsequent calls to Curl_tls_keylog_open
will overwrite keylog_file_name and leak the previous allocation.

Spotted by Codex Security

Closes #21427
2026-04-23 22:58:39 +02:00
Viktor Szakats
734793f533
checksrc.pl: delete stray commas
Closes #21426
2026-04-23 22:07:41 +02:00
Daniel McCarney
ed9083eba2
ci: update RUSTLS_VERSION 0.15.2 -> 0.15.3
Closes #21424
2026-04-23 20:24:53 +02:00
Stefan Eissing
69f3a36bcb
doh: remove conn->bits.doh
Since we have a new struct instance for each async operation now and
async operation may happen in parallel, remove the connection bit
indicating doh is in progress.

Closes #21422
2026-04-23 17:23:54 +02:00
Stefan Eissing
00cac453c7
multi: enhance pending handles fairness
When trying to connect a pending transfer, remember the `mid` that was
last reactivated and start looking for future pending handles from the
last one forward through the pending bitset.

Background: when many pending handles exist, iterating the bitset always
from the start may become unfair to transfers that were assigned higher
`mid` values.

Fixes #21396
Reported-by: Juan Belón
Closes #21412
2026-04-23 15:55:07 +02:00
Viktor Szakats
d6372e60e5
vtls: fix comment typos and tidy up a type
Pointed out by GitHub Code Quality

Closes #21421
2026-04-23 12:31:11 +02:00
Viktor Szakats
e418b42c82
CI: set DO_NOT_TRACK=1
Closes #21420
2026-04-23 11:22:35 +02:00
Viktor Szakats
fd2a729a12
GHA/appveyor-status: disable gh tool telemetry
Ref: https://cli.github.com/telemetry

Closes #21418
2026-04-23 10:26:10 +02:00
Yedaya Katsman
7100e8d45a
vtls: log when key logging is enabled.
If built with LibreSSL, also warn that it only works for TLS <= 1.2

Inspired-by: Viktor Szakats
Closes #19814
2026-04-23 08:13:59 +02:00
Daniel Stenberg
4c078fd115
urlapi: simplify urlget_url
- unify the query and fragment separator logic
- read the bitflags directly instead of via a temp variable
- narrow the scope of a few variables

Closes #21417
2026-04-23 07:40:56 +02:00
Viktor Szakats
50ff4f2927
GHA: deprioritize Azure Ubuntu mirror
Due to year-long unreliability.

The default Ubuntu mirror works as fast as the Azure one when it's
working at its normal speed. And has HTTPS.

Also:
- replac the retry hack that turn out to not solve the problem.
- add timeouts to each download step to catch slowness early.

Follow-up to a5838847c4 #21181
Follow-up to 5172ba5475 #21107

Closes #21414
2026-04-22 19:38:56 +02:00
Viktor Szakats
bfc0cb42fb
asyn-thrdd: drop redundant result check
Pointed out by GitHub Code Quality

Closes #21415
2026-04-22 18:24:25 +02:00
Viktor Szakats
ed3fea6087
GHA: delete all apt sources except ubuntu.sources
GitHub runners are getting new 3rd-party sources frequntly now, last
week `docker.list`, this week: `google-chrome.sources`. To avoid
playing catch up, allowlist the only one we use: `ubuntu.sources`. If
this is renamed, CI would break. Let's hope this happens much less
often than new sources.

Bug: https://github.com/curl/curl/pull/21414#issuecomment-4297788640

Follow-up to 3e0e2cc1ab #21344

Closes #21416
2026-04-22 18:22:33 +02:00
Daniel Stenberg
0f2b020c03
asyn-thrdd: minor without-IPv6 fixes
Pointed out by Copilot

Closes #21413
2026-04-22 15:30:33 +02:00
Dio Putra
37ab2469c1
docs: clarify retry-max-time timing
Closes #21411
2026-04-22 14:53:59 +02:00
renovate[bot]
99d460d6da
Dockerfile: update debian:bookworm-slim Docker digest to f9c6a2f
Closes #21406
2026-04-22 09:29:05 +02:00
Viktor Szakats
7d73fe9494
appveyor: bump to OpenSSL 3.6
Closes #21405
2026-04-22 09:29:05 +02:00
Daniel Stenberg
528f6238a5
RELEASE-NOTES: synced 2026-04-22 07:53:54 +02:00
Daniel Stenberg
b16be8e244
tool_operate: reset the upload glob counter for next URL
Fixes #21402

Adjust test 2012 and 2013 accordingly

Closes #21403
2026-04-22 07:50:59 +02:00
Daniel Stenberg
dcf535629b
tool_operate: keep the filename for upload globbing
Follow-up to 19695e815c

Verify with test 2012 and 2013

Closes #21401
2026-04-21 23:11:42 +02:00
Daniel Stenberg
779bba2f3f
runtests: allow %EMPTY in <stdout> to verify no output 2026-04-21 17:22:11 +02:00
Stefan Eissing
ad1fcd6111
async-ares: fix query counter handling
When starting an c-ares query, the provided callback may be invoked
right away, leading to a decrement of `queries_ongoing`. Increment
the counter *before* call c-ares. Otherwise, the `async->done` bit
is not properly set.

Closes #21399
2026-04-21 15:58:06 +02:00
Daniel Stenberg
4daf483b5b
lib557: add tests with flags AND conversion specifier
Remove superfluous and never-built test code for systems with 16-bit and
64-bit ints and 16-bit longs, as we don't know any such.
2026-04-21 15:21:16 +02:00
Daniel Stenberg
4f7e323b29
mprintf: OR the flags
As 'flags' may already have been set to something when
parse_conversion() is called, make sure to only OR the new flags.

Follow-up to 4e0bfd8cf7

Closes #21398
2026-04-21 15:21:10 +02:00
Viktor Szakats
8eb3cb75a3
misc: fix code quality findings
- httpsrr: drop redundant checks.
  Follow-up to 809dda3a37 #21354
- httpsrr.h: drop obsolete comment.
  Follow-up to 2b3dfb4ad4 #21175
- ws: drop redundant check in `curl_ws_start_frame()`.
  Follow-up to 37cecfc7b9 #17683
- ws: fix typo in comment.
- tool_operate: fix VMS build. (broken since 2019-07-20, v7.66.0)
  Follow-up to b889408500 #3804

Pointed out by Copilot Code Quality

Closes #21393
2026-04-21 14:35:55 +02:00
Daniel Stenberg
2e3607034d
parsedate: refactor
- introduce 'struct when' to hold the parser result
- initwhen() initializes a 'struct when'
- datestring() parses strings
- datenum() parses numbers
- datecheck() does some final checks
- tzadjust() adds the time zone offset
- convert math to 64 bit, squeeze into time_t only in the last step,
  mktimet() does the time_t storing

Closes #21394
2026-04-21 14:22:07 +02:00
Viktor Szakats
5ff7f77310
wolfssl: fix -Wmissing-prototypes
Seen with unity, H3, wolfssl with `HAVE_EX_DATA`.

Fixing:
```
lib/vtls/wolfssl.c:412:10: error: no previous prototype for function 'Curl_wssl_cache_session' [-Wmissing-prototypes]
  412 | CURLcode Curl_wssl_cache_session(struct Curl_cfilter *cf,
      |          ^
lib/vtls/wolfssl.c:412:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
  412 | CURLcode Curl_wssl_cache_session(struct Curl_cfilter *cf,
      | ^
      | static
1 error generated.
```

Follow-up to cc5c1553fb #19852

Closes #21392
2026-04-21 10:09:58 +02:00
Daniel Stenberg
19695e815c
tool_operate: split create_single into smaller sub functions
Reduces complexity from 58 => 32.

Closes #21389
2026-04-21 08:35:09 +02:00
Daniel Stenberg
4e0bfd8cf7
mprintf: simplify parsefmt
- split out parse_flags() and parse_conversion() to reduce complexity
  from 57 to 30.

Closes #21391
2026-04-21 08:33:28 +02:00
Daniel Stenberg
0838297ad1
lib: minor comment typos
Closes #21388
2026-04-20 23:48:37 +02:00
Stefan Eissing
809dda3a37
Happy Eyeballs: add resolution time delay
HEv3 describes conditions on when first connect attempts shall be
started.
https://www.ietf.org/archive/id/draft-ietf-happy-happyeyeballs-v3-01.html
Chapter 4.2

libcurl now waits 50ms for AAAA and HTTPS results (when requested) to
return before continuing with the connect.

Added HTTPS-RR to the "was resolved" information info message. Changed
logging of HTTPS-RR to a one-liner with RFC 9460 like formatting. This
way the user can see if/what was resolved and used in connecting.

Closes #21354
2026-04-20 23:47:49 +02:00
Viktor Szakats
70a159527c
build: link bcrypt.lib via vcxproj files
And drop pragma from `rand.c`.

Closes #21386
2026-04-20 16:29:25 +02:00
Daniel Stenberg
db13c08c58
lib: fix typos in comments
Closes #21385
2026-04-20 14:56:31 +02:00
Daniel Stenberg
d087a7e4ec
mime: only allow 40 levels of calls
To avoid problems when doing insane things.

Closes #21384
2026-04-20 14:28:43 +02:00
Stefan Eissing
5448495cfd
vtls_scache: check reentrancy
Track lock status of session cache, add DEBUGASSERT()s for proper
calling sequences. Add check of lock status.

Use lock status check to prevent reentry of import/export calls.
Deny such calls with CURLE_RECURSIVE_API_CALL.

Closes #21383
2026-04-20 11:22:00 +02:00
Viktor Szakats
85e825770a
GHA: bump test minimums (more)
Follow-up to 701a8319ec96c0b73c39e16c5db68dd758419c2 #21353

Closes #21382
2026-04-20 10:47:19 +02:00
Viktor Szakats
1fbffe7f08
GHA: use more OpenSSL 4, enable ECH in more jobs
for Linux and macOS.

Closes #21379
2026-04-20 02:53:24 +02:00
Viktor Szakats
4c548b978f
openssl: fix unused variable warnings in !verbose builds
Also fix clang-tidy `readability-redundant-control-flow`.

```
lib/vtls/openssl.c:4055:46: error: unused parameter 'reason' [-Wunused-parameter]
 4055 |                                          int reason)
      |                                              ^
lib/vtls/openssl.c:4279:19: error: variable 'status' set but not used [-Wunused-but-set-variable]
 4279 |       const char *status = NULL;
      |                   ^
```
Ref: https://github.com/curl/curl/actions/runs/24641388439/job/72045859306?pr=21379

```
lib/vtls/openssl.c:4092:7: error: Value stored to 'rv' is never read [clang-analyzer-deadcode.DeadStores]
 4092 |       rv = SSL_ech_get1_status(ssl, &inner, &outer);
      |       ^    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/vtls/openssl.c:4092:7: note: Value stored to 'rv' is never read
 4092 |       rv = SSL_ech_get1_status(ssl, &inner, &outer);
      |       ^    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/vtls/openssl.c:4112:3: error: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow]
 4111 | #endif
      | ~~~~~~
 4112 |   return;
      |   ^~~~~~~
 4113 | }
```
Ref: https://github.com/curl/curl/actions/runs/24642154148/job/72047919525?pr=21379#step:42:186

Cherry-picked from #21379

Closes #21380
2026-04-20 02:37:35 +02:00
Dag-Erling Smørgrav
759f2e5d97
tests: avoid infinite recursion for make check
The combination of a misspelled directory name and failing to check the
result of cd leads to infinite recursion as `make check` simply invokes
itself over and over.

Follow-up to 00887aee8c #18079
Closes #21378
2026-04-20 00:44:21 +02:00
Dag-Erling Smørgrav
6506693f0b
lib1960: fix test failure
On platforms where struct sockaddr has a length field, the current code
leaves it uninitialized, resulting in a test failure when valgrind is
used.

Closes #21377
2026-04-20 00:44:21 +02:00
Stefan Eissing
ebed4aaf01
ws: fix a blocking curl_ws_send() to report written length correctly
Fixes #21372
Reported-by: Yiwei Hou
Clkoses #21373
2026-04-20 00:06:55 +02:00
Viktor Szakats
9e38e06769
GHA: keep testing 3 as openssl-prev, bump mainline to 4
Ref: #21317
Ref: #21316

Closes #21376
2026-04-19 14:05:46 +02:00
renovate[bot]
23a06e1fb9
GHA: update dependency libressl/portable to v4.3.1
Closes #21365
2026-04-19 11:54:47 +02:00
Viktor Szakats
07e9f73f32
runtests: skip setting ed25519 SSH key format
`ssh-keygen -t ed25519` does not support PEM key format, and it
defaults to `RFC4716` which is what we want.

It affected GHA/windows tests that explicitly used ed25519 keys.

Also:
- GHA/windows: bump minimums to hopefully catch this early next time.
  1701a8319e #21353
- merge two Perl lines.

Reported-by: herbenderbler on github
Fixes #21360
Follow-up to acda4eae5e #21223

Closes #21374
2026-04-19 11:53:18 +02:00
renovate[bot]
fc7bd0704e
GHA: update dependency nghttp2/nghttp2 to v1.69.0
Closes #21375
2026-04-19 11:52:11 +02:00