Commit graph

38526 commits

Author SHA1 Message Date
Viktor Szakats
701cd4cfc3
tidy-up: git options, ECH, HTTP/3 documentation
- prefer `--branch` over `-b`, where missing.
- add `--depth 1` where missing.
- sync option order between docs and GHA.
- bump quiche and rustls-ffi versions in documentation.
- ECH.md: update for OpenSSL 4.

Closes #21447
2026-04-25 13:59:20 +02:00
Viktor Szakats
c6b1c49be0
test_22_httpsrr: drop duplicate skipif conditions
Already set at class-level.

Spotted by GitHub Code Quality

Closes #21446
2026-04-25 13:59:20 +02:00
Viktor Szakats
05905b1207
pytest: drop unused imports
Spotted by GitHub Code Quality

Closes #21445
2026-04-25 12:38:07 +02:00
Daniel Stenberg
5227dd9c2e
RELEASE-NOTES: synced 2026-04-25 11:37:19 +02:00
Daniel Stenberg
40b65d869a
RELEASE-NOTES: add missing contributors
From security reports etc
2026-04-25 11:28:08 +02:00
Viktor Szakats
4449110561
sshserver.pl: tidy up around AllowUsers setup
- drop redundant space-to-`?` replacement.
- add parentheses to silence code checker.
- tidy up comments.

Follow-up to e53523fef0 #14859

Closes #21442
2026-04-25 08:42:54 +02:00
Viktor Szakats
f9d3f00c98
GHA/windows: bump stunnel to 5.78
Closes #21443
2026-04-25 08:35:45 +02:00
Viktor Szakats
b5ee935f75
connect: fix typo on error message [ci skip]
Pointed out by GitHub Code Quality
2026-04-24 22:29:02 +02:00
Stefan Eissing
bfcc1c6eb4
setup connection filter: mark as setup
Add CF_TYPE_SETUP to the setup connection filter so that it is
removed and destroyed after the connection has been established.

Closes #21437
2026-04-24 17:50:44 +02:00
Stefan Eissing
4840fe3f8a
socks filter: pass operation parameters
Pass all operations parameters to a SOCKS filter at creation
time, not relying on "global" connectdata values.

Eliminate modifications to `conn->ip_version` when local resolving
for SOCKS4.

Do not retrieve the socket for GSSAPI blocking calls from connectdata,
but from the filters "below" the SOCKS one.

Closes #21436
2026-04-24 17:50:10 +02:00
Daniel Stenberg
7d295145eb
mbedtls: remove failf() call with first argument as NULL
failf() needs an easy handle to work. This change removes the call since
there is normnally nowhere to show the output if init fails.

Bonus: improve language in an infof() call

Spotted by Copilot

Closes #21441
2026-04-24 17:47:30 +02:00
Viktor Szakats
41f3f94d91
sshserver.pl: add option to enable KEX algorithms in sshd
Necessary when the libssh2/libssh client library does not support KEX
algos offered by default by the OpenSSH server. E.g. libssh2 with WinCNG
combined with OpenSSH 10+.

Also: use this option in GHA/windows.

Follow-up to 3b8bb1a86a #21219
Follow-up to c98d0a2e9a #21220

Closes #21438
2026-04-24 17:09:21 +02:00
Daniel Stenberg
d19a039472
mbedtls: cleanup more without care for 'initialized'
Several mbedTLS resources (entropy/CTR-DRBG, CA/client certs, keys, CRL)
are initialized and may allocate memory before initialized is set, and
must still be cleaned up.

Follow-up to 1c4813c769

Caught by Codex Security
Closes #21440
2026-04-24 17:01:01 +02:00
Viktor Szakats
7c0a8fc210
GHA/windows: disable ssh-ed25519 hostkey in libssh2-wincng jobs
libssh2 built with the WinCNG crypto backend does not support ed25519
hostkeys.

Ref: #21438
Follow-up to acda4eae5e #21223

Closes #21439
2026-04-24 15:03:25 +02:00
Stefan Eissing
b6e0ecb3f2
resolve: pass bool for proxy resolves
So that CURLcode failure is correct and not figured out later via
`conn->bits.proxy`. Add the flag to the async struct.

`for_proxy` is figured out by the caller of Curl_resolv() when it
figures out which host/proxy name it wants the addresses for.

Remove CONN_IS_PROXIED macro as no longer needed.

Closes #21423
2026-04-24 13:10:59 +02:00
Viktor Szakats
0d3d9f2222
checksrc: add missing semicolon, fix IFDEFSINGLE capture group
Pointed out by GitHub Code Quality

Closes #21435
2026-04-24 11:08:56 +02:00
Daniel Stenberg
2f37943406
tests: drop support for the hex="yes" option in getpart
The remaining datacheck sections using this for MQTT tests were not
actually used anyway!

Closes #21428
2026-04-24 10:42:34 +02:00
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