Commit Graph

35946 Commits

Author SHA1 Message Date
Daniel Stenberg
98c78b2f14
runtests: remove warning message
Every time we first run runtests with -j and then again *without* -j,
this message was shown:

  "Warning: $runnerid: cleardir(log) failed"

Not anymore.

Closes #18404
2025-08-26 23:33:13 +02:00
Daniel Stenberg
05407422fb
socks_sspi: simplify, clean up Curl_SOCKS5_gssapi_negotiate
This function returned error on MANY places, each with its own cleanup
sequence and by the look of it almost all of them were incomplete,
making them leak resources on errors.

This take now gotos to the error label where it cleans everything up
before returning error. This also simplifies the function a lot.

Closes #18315
2025-08-26 15:01:47 +02:00
Daniel Stenberg
ebff00f1af
tool_getparam: let --trace-config override -v
If --trace-config is used to set a level before -v is used, don't reset
the state on first -v (to "-all") as it otherwise does. This way,
--trace-config can be used to set specific trace items before -v on the
command line and it still works.

Previously, the first -v use would otherwise reset and undo the earlier
--trace-config items.

Fixes #18346
Closes #18361
2025-08-26 14:59:59 +02:00
Viktor Szakats
455cd07410
GHA/http3-linux: add AWS-LC and BoringSSL jobs
Closes #18391
2025-08-26 12:01:39 +02:00
Viktor Szakats
e2c747bb5d
GHA/curl-for-win: drop x86, fix zlib-classic, switch back to libssh
- switch x86 job to x64. x86 is not longer actively maintained in
  curl-for-win.
  Ref: https://github.com/curl/curl-for-win/discussions/68

- switch back from libssh2 to libssh.
  Reverts af8e1aa4b0 #18257

- fix to really build with zlib-classic.
  Follow-up to 8076824870 #17357

Closes #18400
2025-08-26 11:59:23 +02:00
Daniel Stenberg
022f9a428a
write-out.md: header_json is not included the json object
Fixes #18390
Reported-by: Sebastian Carlos
Closes #18399
2025-08-26 10:10:33 +02:00
Daniel Stenberg
fef318553b
tool_urlglob: add integer overflow protection
It is most likely impossible to actually overflow, but this makes it
certain.

Closes #18398
2025-08-26 09:50:00 +02:00
Viktor Szakats
57d349fe0e
projects: generate from a single template
The three projects (VC10, VC11, VC12) are identical except 5 repeated
strings in them. They also require running `generate.bat` before use,
to populate source files. Reduce the 3 almost identical projects to
a single template project and populate the repeated strings also via
`generate.bat`. This reduces the maintenance burden to a single copy of
the project files. Also saving 10000 LOCs.

Closes #18396
2025-08-26 09:41:30 +02:00
Daniel Stenberg
bc6be7adf8
RELEASE-NOTES: synced 2025-08-25 22:52:55 +02:00
Viktor Szakats
1611e87d66
docs: point two broken links to archive.org
Closes #18393
2025-08-25 19:43:03 +02:00
Viktor Szakats
cda243d053
projects: drop unused logic from generate.bat
Follow-up to 5a0644fae8 #8442

Closes #18397
2025-08-25 19:19:48 +02:00
Viktor Szakats
ca6d6dcb20
openssl: assume OPENSSL_VERSION_NUMBER
It's defined in all supported OpenSSL versions and forks.

Also formatting in `md4.c`.

Closes #18388
2025-08-24 00:59:39 +02:00
Viktor Szakats
d65436d9a0
openssl: BoringSSL / AWS-LC tidy-ups
- schannel: apply BoringSSL workaround to AWS-LC too.
  Affects Schannel + AWS-LC MultiSSL builds. (not tested in CI)
  Ref: 274940d743 #2643 #2634

- curl_ntlm_core: deduplicate macro defines.

- curl_ntlm_core: document version thresholds for an AWS-LC-specific
  workaround.
  It was necessary between v1.2.0 2022-09-01 and v1.30.1 2024-06-21.
  No longer necessary since v1.31.0 2024-07-01:
  ba94617d99
  Follow-up to 34ef4fab22 #10320

- lib758: drop redundant OpenSSL version guards.
  `OPENSSL_VERSION_NUMBER > 3` automatically guards against LibreSSL,
  BoringSSL and AWS-LC.
  Ref: 6ddd8f2c0b
  Follow-up to a5f0ab7995 #18288

- dllmain, curl_sha512_256: formatting.

Closes #18387
2025-08-24 00:30:06 +02:00
Viktor Szakats
4c40f8b8e0
GHA/linux: add BoringSSL job, with runtests, pytests and cache
Ref: cff4c16b83 #18385
Cherry-picked from #18384
Closes #18386
2025-08-23 23:40:16 +02:00
Simon Dalvai
a855bdee90
docs: fix link CONTRIBUTE.md link
Closes #18372
2025-08-23 23:14:04 +02:00
Daniel Stenberg
aa4596a97e
mdlinkcheck: handle links with a leading slash properly
Ref: #18372
Closes #18382
2025-08-23 23:07:13 +02:00
Viktor Szakats
cff4c16b83
pytest: fix test_17_09_ssl_min_max for BoringSSL
Ref: https://github.com/curl/curl/actions/runs/17179514833/job/48740057095

Also fix indent.

Cherry-picked from #18384
Closes #18385
2025-08-23 23:04:02 +02:00
Viktor Szakats
f67090679f
openssl: sync an AWS-LC guard with BoringSSL
BoringSSL always used the same type:
https://boringssl.googlesource.com/boringssl/+/103ed08549a74af9f03363c633028faf9a475066
103ed08549

But, this codepath isn't built with BoringSSL, because it defines
`OPENSSL_NO_OCSP` via `opensslconf.h`.

Also drop an out-of-place `#endif` comment.

Ref: 20f4e94eeb #11568

Closes #18384
2025-08-23 22:57:30 +02:00
Viktor Szakats
1fc622db8e
openssl: drop single-use interim macro USE_OPENSSL_SRP
Closes #18383
2025-08-23 21:32:24 +02:00
Stefan Eissing
d57cfc1a8d
asyn-thrdd: more simplifications
- use wakeup sockets non-locked.
- send wakeup notify only in normal control flow (not cancel). close
  wakeup sockets in unlink only.
- remove 5ms thread lifetime wait crutch before pthread_cancel().

Closes #18380
2025-08-23 16:25:39 +02:00
Viktor Szakats
41923af5fc
GHA/http3-linux: build ngtcp2 for LibreSSL too, add LibreSSL jobs
Also: Build LibreSSL with cmake. It's 3x faster (90s -> 30s).

Follow-up to e724259bcb #18379
Follow-up to 31e6798544 #18377
Cherry-picked from #18377
Closes #18381
2025-08-23 16:11:00 +02:00
Viktor Szakats
31e6798544
build: support LibreSSL native crypto lib with ngtcp2 1.15.0+
In ngtcp2 1.15.0 the LibreSSL crypto interface library got its own name:
`libngtcp2_crypto_libressl`. In previous versions it used
`libngtcp2_crypto_quictls`, shared with quictls itself (but not
compatible with).

Adapt autotools and cmake scripts to look for the new name first, and
fall back to the old one if not found.

Fallback to quictls tested OK in CI with both autotools and cmake:
https://github.com/curl/curl/actions/runs/17174994908?pr=18377

Ref: https://github.com/ngtcp2/ngtcp2/releases/tag/v1.15.0
Ref: https://github.com/ngtcp2/ngtcp2/pull/1716

Closes #18377
2025-08-23 15:45:36 +02:00
renovate[bot]
e724259bcb
GHA: update ngtcp2/ngtcp2 to v1.15.0
Closes #18379
2025-08-23 13:44:50 +02:00
Daniel Stenberg
29e4a124a3
tool_operate: bail out better on no URL
To avoid NULL derferences with many outputs and --next.

Follow-up to 034612cd51

Add test 760 to verify

Reported-by: BobodevMm on github
Fixes #18375
Closes #18376
2025-08-23 13:43:46 +02:00
Viktor Szakats
1e430f806a
configure: tidy up internal names in ngtcp2 ossl detection logic
Replace "quictls" with "ossl".

Follow-up to 5eefdd71a3 #17027
Cherry-picked from #18377
Closes #18378
2025-08-23 12:42:05 +02:00
Viktor Szakats
4f0e530c77
tidy-up: formatting
Closes #18373
2025-08-23 01:12:27 +02:00
Viktor Szakats
03868ca714
asyn-thrdd: fix no HAVE_GETADDRINFO builds
mingw32ce, CM 4.4.0-arm schannel:
```
lib/asyn-thrdd.c: In function 'gethostbyname_thread':
lib/asyn-thrdd.c:349: error: too many arguments to function 'async_thrd_cleanup'
```
Ref: https://github.com/curl/curl/actions/runs/17158865566/job/48682687295?pr=18039#step:9:21

Follow-up to 88fc6c491f #18263
Closes #18371
2025-08-23 00:16:06 +02:00
Viktor Szakats
d6c51a8fda
cmake: CURL_CA_FALLBACK only works with OpenSSL
Ref: 2f6524ce3c #18364
Ref: #18362

Closes #18365
2025-08-23 00:02:33 +02:00
Daniel Stenberg
6d53263f0b
TODO: remove the expand ~ idea
As we can expand evironment variables now, HOME can easily be used
instead.

Ref: #18240
Closes #18363
2025-08-22 23:55:51 +02:00
Daniel Stenberg
2f6524ce3c
acinclude: --with-ca-fallback only works with OpenSSL
Make it error if another TLS backend is used. Also tweaked the
documentation for it to make it more clear it is only for OpenSSL.

Follow-up to 9cf4759354

Reported-by: Michael Osipov
Fixes #18362
Closes #18364
2025-08-22 23:54:14 +02:00
Viktor Szakats
806d97d172
openssl: merge two #if blocks
Cherry-picked from #18330
Closes #18370
2025-08-22 22:52:51 +02:00
Viktor Szakats
b54039de2c
openssl: use RSA_flags() again with BoringSSL
Supported since 2017-12-18:
a0c87adbf0

Follow-up to cd276c3cca #2117

Closes #18369
2025-08-22 20:36:11 +02:00
Viktor Szakats
78f53e0460
openssl: enable HAVE_KEYLOG_CALLBACK for AWS-LC
Supported by all AWS-LC versions:
6e3f5cc7e1

Closes #18368
2025-08-22 20:36:10 +02:00
Viktor Szakats
63bf7a0898
openssl: drop redundant HAVE_OPENSSL_VERSION macro
It served as an extra guard over `OPENSSL_VERSION_STRING`.

Also, document that `OPENSSL_VERSION_STRING` is supported by OpenSSL 3+.

Closes #18367
2025-08-22 18:55:26 +02:00
Viktor Szakats
0be7f382dc
openssl: add and use HAVE_BORINGSSL_LIKE internal macro
To cover the common case of guarding for both BoringSSL and AWS-LC.

Cherry-picked from #18330
Closes #18358
2025-08-22 17:49:21 +02:00
Viktor Szakats
8c29a29add
openssl: add and use HAVE_OPENSSL3 internal macro
Cherry-picked from #18330
Closes #18360
2025-08-22 17:21:29 +02:00
Viktor Szakats
db08e86cfb
openssl: drop more legacy cruft
- drop `ALLOW_RENEG` undocumented (insecure) build-time option.
- drop unnecessary check for `OPENSSL_VERSION_NUMBER`.
  It's present in all supported OpenSSL versions and forks.

Follow-up to 80c10c5d5d #18351
Follow-up to 59311bd3df #3293 #3283

Closes #18359
2025-08-22 17:21:28 +02:00
Daniel Stenberg
bfbee798ca
tool_operate: use stricter curl_multi_setopt() arguments
To please the curl_multi_setopt() typechecker

- set multi callback protypes to match exactylu
- set CURLMOPT_MAX_HOST_CONNECTIONS as a long

Closes #18357
2025-08-22 17:13:07 +02:00
Daniel Stenberg
844c385812
typecheck-gcc: add type checks for curl_multi_setopt()
Test 745 verifies that all options are tested.

Closes #18357
2025-08-22 17:12:58 +02:00
Daniel Stenberg
b3570b36d7
runtests: show still running tests when nothing has happened for a while
... even if there are tests still pending. To help visualize tests that
might be hanging.

Attempts to set the limit at 10 seconds of silence.

Closes #18349
2025-08-22 16:28:03 +02:00
Stefan Eissing
a8d20cd223
asyn-thrdd: manage DEFERRED and locks better
- cancel thread waits until thread start is at least 5ms in the past
  to give it some time to get its cancellation setup in place
- cancel thread without holding the mutex. It's supposed to be an
  async operation, but better be safe
- set DEFERRED cancel state explicitly, should be default in a pthread,
  but better be safe

Closes #18350
2025-08-22 16:26:11 +02:00
Daniel Stenberg
f5ee566dbc
top-complexity: maximum accepted set to 72
Down from 80. Show all functions above 60.

Closes #18354
2025-08-22 16:22:36 +02:00
Daniel Stenberg
33572b851e
tool_urlglob: handle a zero length glob piece
Follow-up to 034612cd51

Add test 759 to verify

Reported-by: Stanislav Osipov
Fixes #18352
Closes #18353
2025-08-22 16:22:07 +02:00
Viktor Szakats
80c10c5d5d
openssl: remove legacy cruft, document macro guards
- assume:
  - `BIO_CTRL_EOF`
  - `SSL_CTRL_SET_MSG_CALLBACK`
  - `SSL_CTRL_SET_MSG_CALLBACK`
  - `SSL_CTRL_SET_TLSEXT_HOSTNAME`
  - `SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER`
  - `SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS`
  - `SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG`
  - `SSL_OP_NO_COMPRESSION`
  - `SSL_OP_NO_TICKET`
  - `X509_V_FLAG_PARTIAL_CHAIN`
  - `X509_V_FLAG_TRUSTED_FIRST`
  They are present in all supported OpenSSL (and fork) versions.

- replace `SSL_ERROR_WANT_EARLY` with `SSL_ERROR_WANT_CLIENT_HELLO_CB`.
  The former appeared in OpenSSL 1.1.1-dev, but renamed before
  the stable release.

- document support for macros:
  - `ENGINE_CTRL_GET_CMD_FROM_NAME`
  - `SSL_ERROR_WANT_ASYNC_JOB`
  - `SSL_ERROR_WANT_ASYNC`
  - `SSL2_VERSION_MAJOR`
  - `TLS1_3_VERSION`

- drop legacy fallback for `CONF_MFLAGS_DEFAULT_SECTION`.
  It was there for OpenSSL 0.9.8 support.

- fix `SSL_CTRL_SET_MSG_CALLBACK` accidentally serving as a guard for
  OpenSSL (and forks) as a whole.

Tested OK with OpenSSL 1.0.2 and 1.1.0 in CI.

Closes #18351
2025-08-22 15:53:45 +02:00
Viktor Szakats
3298a43133
spelling: file system
Closes #18348
2025-08-22 15:53:41 +02:00
Viktor Szakats
a9705e9cfb
examples: make CURLPIPE_MULTIPLEX fallback long
Closes #18356
2025-08-22 14:16:45 +02:00
Viktor Szakats
f6c2907172
test1557: pass long type to multi_setopt()
A wrong type here has seen to manifest in CI failures with gcc-12 macOS.

Ref: https://github.com/curl/curl/pull/18348#issuecomment-3213881790
Ref: https://github.com/curl/curl/actions/runs/17153761944/job/48665734013?pr=18349

Follow-up to b63cce7fee #18339
Follow-up to 88fc6c491f #18263

Closes #18355
2025-08-22 14:16:45 +02:00
Stefan Eissing
cbd5d2507a
asyn-thrdd: fix --disable-socketpair builds
Regression from #18339

Reported-by: Marcel Raad
Closes #18347
2025-08-22 10:36:43 +02:00
Stefan Eissing
6b111f0a8c
ares: use ares_strerror() to retrieve error messages
Add optional detail to `Curl_resolver_error()` to add to failure message
where available. This makes, for c-ares, the reason for a failed
resource available to the user without extra trace config.

When "dns" tracing enabled, print the c-ares server config at the start
of a resolve.

Closes #18251
2025-08-22 10:01:58 +02:00
Stefan Eissing
8ebea37eb1
asyn-thrdd: remove condition variable
Add a flag `thrd_don` to assess if the resolving thread has finished and
only destroy the context when *both* ref_count reaches 0 and thrd_done
is true.

Closes #18345
2025-08-22 09:05:56 +02:00