Commit graph

39193 commits

Author SHA1 Message Date
Stefan Eissing
eb73af253c
tool: fix memory use in parallel mode
The curl tool was creating a new transfer every time it checked if
it needed to add one to reach max parallelism. This led to eventually
all configured transfers to have easy handles created.

Limit the creation again to the ones needed for max parallelism.

scorecard.py: set --out-null only for curl versions that support it

Closes #22277
2026-07-12 17:50:02 +02:00
Viktor Szakats
b093d88447
tidy-up: typos, comment nits
Closes #22294
2026-07-11 13:55:45 +02:00
renovate[bot]
5c5334f831
GHA: update dependency awslabs/aws-lc to v5.1.0
Closes #22288
2026-07-10 12:14:20 +02:00
Viktor Szakats
d054f386dd
GHA/windows: enable wolfSSL in two MSYS2 mingw-w64 jobs
Number of tests went to 1919 (from 1912). Runs 30s faster.

Thanks-to: Christoph Reiter
Ref: 5c995ac098
Ref: #22252

Closes #22259
2026-07-09 21:28:04 +02:00
Viktor Szakats
50c244c74d
tests: skip test 311 for wolfSSL 5.9.2
To fix this for everyone running curl tests.

Also: drop workarounds for CI.

Refs:
https://github.com/wolfSSL/wolfssl/pull/10793
7dd269fc52

Ref: https://github.com/curl/curl/pull/22269#issuecomment-4892203666
Follow-up to 7183bec8fe #22269
Follow-up to 03f9751585 #22204

Closes #22286
2026-07-09 21:09:34 +02:00
Viktor Szakats
06a42cd8bb
GHA/linux: bump 3.x mbedTLS to 3.6.7
Follow-up to 6e5f94cd5d #22271

Closes #22285
2026-07-09 18:21:51 +02:00
Stefan Eissing
7183bec8fe
GHA/macos: ignore test 311 results for Homebrew wolfSSL
Homebrew is distributing v5.9.2 at the time of this commit, which
contains known regression failing to parse the server certificate.
The fix has been merged upstream. Till it makes it into a release
and Homebrew, ignore test results for 311.

Refs:
https://github.com/wolfSSL/wolfssl/pull/10793
7dd269fc52

Follow-up to 03f9751585 #22204 #22175 #22160
Closes #22269
2026-07-09 18:21:51 +02:00
renovate[bot]
6e5f94cd5d
GHA: update dependency Mbed-TLS/mbedtls to v4.2.0
Ref: #21178
Closes #22271
2026-07-09 14:01:15 +02:00
renovate[bot]
6841d59af6
GHA: update dependency pizlonator/fil-c to v0.681
Note: Renovate strips pre-existing quotes from the YAML version value.
This breaks the bump next time its version is ending with zero(s).
Ref: 78267398e5 #22143 #22142

Closes #22267
2026-07-06 13:29:49 +02:00
Daniel Stenberg
791f5b25d3
setopt: error for CURLOPT_SHARE when easy handle is used
Changing the share while driving would be complicated and error-prone.

URL: https://curl.se/mail/lib-2026-07/0000.html

Closes #22253
2026-07-04 22:53:52 +02:00
Stefan Eissing
e0222c0029
test2114: fix reading from stdin
The test provides an invalid username, but no ':' with password, so that
the curl tool tries to read the password from stdin. That makes the test
hang, also in CI.

The check for invalid characters is happening when the CURLOPT_USERPWD
is applied to the URL, so when the transfer is started. Maybe the check
should happen also in setopt already.

The test hangs because tool_paramhlp.c:548 `checkpasswd()` does not see
a ':' and tries to read the password from stdin.

Fix: add a ':' in the tests invalid user setting, so that the read does
not happen.

Follow-up to ecaa344a7a

Closes #22264
2026-07-04 22:53:01 +02:00
Alhuda Khan
ecaa344a7a
url: reject control codes in credentials set via CURLOPT
Closes #22236
2026-07-04 12:28:29 +02:00
Daniel Stenberg
69ac867f98
TLS: drop support for TLS-SRP
The options will simply do nothing.

Closes #21965
2026-07-04 12:20:20 +02:00
Viktor Szakats
d169ad68fa
gssapi: add support for Apple GSS Framework
Add support for the native GSS Framework on Apple targets, which is
Apple's fork of Heimdal. This option allows to drop Apple's deprecated
MIT Kerberos compatibility shim "mit-krb5/1.7-prerelease".

Source code uses different headers, other than that no source changes
are necessary.

You can enable by configuring with:
autotools: `--enable-gssapi-apple`
CMake: `-DCURL_USE_GSSAPI=ON -DCURL_GSS_FLAVOR=Apple`

These options are experimental, and may receive breaking updates till
the GSS backend selection logic settles, for Apple and also for the GNU
and MIT implementation.

Version string:
```
curl 8.21.0-DEV (aarch64-apple-darwin25.4.0) libcurl/8.21.0-DEV
  OpenSSL/3.6.2 zlib/1.2.12 AppleIDN AppleGSS OpenLDAP/2.4.28/Apple
```

Also:
- drop in-source deprecation warning suppressions when using AppleGSS.
- GHA/macos: enable Apple GSS in CI jobs.

Supported by:
iOS 5.0+, iPadOS 5.0+, Mac Catalyst 13.0+, macOS 10.14+, visionOS 1.0+

Ref: https://developer.apple.com/documentation/gss
Ref: #19109

Closes #22052
2026-07-04 01:21:57 +02:00
Daniel Stenberg
b8ceb430be
cd2nroff: stricter checks for asterisks for italics
The nroff (man page) version of the markdown docs could get asterisks
mistreated as emphasis - seen in the CURLOPT_WRITEDATA manpage. The
regex now more stricter requires a word character to follow an italics
starting asterisk and there needs to be a word character or a closing
parenthesis before the italics ending asterisk.

Also: fix CURLINFO_CERTINFO.md which used wrong italics - it was not
rendered correctly on GitHub and with other generic markdown parsers.

Reported-by: Christian Ullrich
Fixes #22257
Closes #22260
2026-07-04 00:32:58 +02:00
Joel Depooter
d23fa6e4b6
CURLOPT_UNRESTRICTED_AUTH.md: 'Authorization' instead of 'Authentication'
Closes #22256
2026-07-03 23:43:56 +02:00
Daniel Stenberg
09bfd2c645
THANKS: remove duplicate, fix typo 2026-07-03 17:49:03 +02:00
Jay Satiro
3dd6a87a7f wolfssl: fix build for wolfssl without bio chain support
- Do not mix declarations and code. (ISO C90 build error)

Ref: https://github.com/curl/curl/pull/22252#issuecomment-4871171567

Closes https://github.com/curl/curl/pull/22255
2026-07-03 11:42:19 -04:00
Daniel Stenberg
2213e4bff0
THANKS: add Gary from the curl 4.6 release notes 2026-07-03 13:10:50 +02:00
Daniel Stenberg
2d38f44121
vquic: add Curl_ prefix to some global functions
Closes #22254
2026-07-03 09:54:15 +02:00
Daniel Stenberg
7bfdc6f44a
setopt: return OK earlier for the deprecated h2 dep options
No need to have them checked twice.

Follow-up to bfbff7852f

Closes #22250
2026-07-03 08:34:54 +02:00
Viktor Szakats
2e2c45831c
GHA/windows: fix MSYS2 UWP job name
Also:
- whitespace tidy-up.
- tried building with MSYS2 wolfSSL, but still not compatible with curl.
  Ref: https://packages.msys2.org/base/mingw-w64-wolfssl
  Ref: #22251

Follow-up to 923db3515d #18116

Closes #22252
2026-07-03 01:35:34 +02:00
Viktor Szakats
0fff69d514
configure: link -lcrypt32 instead of -lm for wolfSSL on Windows
Syncing it with CMake/FindWolfSSL.

`-lm` is not needed on Windows. As of mingw-w64 14.0.0 it's offered as
a dummy library; in such case it wasn't causing an actual issue.
`-lcryp32` is necessary when linking wolfSSL statically.

Ref: #22249

Closes #22251
2026-07-03 01:35:34 +02:00
Stefan Eissing
84ecfb3ecc
FTP: fix TLS session reuse on the data connection
FTP servers using SSL can be configured to check TLS session reuse on
the DATA connection. They hand out a new session on every CONTROL
connect and require to see the client using exactly that one when
up-/downloading on DATA.

This means:

1. We have to configure the SSL filter on the DATA connection with
   exactly the same peers.

2. We have to remember the SSL session on the CONTROL connection -
   separately from the session cache. The SSL filter on the DATA
   connection then looks for a session at the CONTROL filter and, if
   present, uses that.

Tests:

Enable `require_ssl_reuse` in our pytest setup for vsftpd. This
reproduces the problem reported in #22225 and verifies the fix.

Skip ftp+SSL pytests for rustls, as we have no possibility to reuse
sessions in that backend.

Schannel: we do not run these tests with the backend. I expect it has
similar problems but am not able to verify.

Reported-by: Laurent Sabourin
Fixes #22225
Closes #22246
2026-07-02 17:39:04 +02:00
Jay Satiro
0a7ec0ea4d ci: retain curl-for-win artifacts for a longer time
- Retain for 5 days because 3 days seems too short.

Follow-up to adf843fb.

Closes https://github.com/curl/curl/pull/22238
2026-07-02 11:03:11 -04:00
Stefan Eissing
6ab52f7c89
openssl+sectrust: move session verified set into result check
Pointed out by Codex Security
Closes #22248
2026-07-02 14:31:07 +02:00
Daniel Stenberg
c7f67be010
vssh: keyfile use cleanups
- make the libssh backend do the same fallback for private and public key
  filename as libssh2 already did and is documented behavior. This now uses a
  common function.

- set the file names already in setup_connection if public key auth is
  requested, so that the connection reuse functions can use the
  information when checking for existing connections to reuse

- rename the oddly named struct fields 'rsa' to 'priv_key' and 'rsa_pub'
  to 'pub_key' to better reflect their purposes

Fixes #22243
Closes #22244
2026-07-02 12:37:20 +02:00
Daniel Stenberg
d3a7e57157
lib: add "Curl_" prefix to two global functions
To make it clear what they are and according to our styleguide.

- Curl_cf_ip_happy_insert_after
- Curl_ftp_conns_match

Found with:

$ nm lib/.libs/libcurl.a | grep ' T ' | grep -vi ' curl'

Closes #22245
2026-07-02 12:36:07 +02:00
Viktor Szakats
03f9751585
GHA: update dependency wolfSSL/wolfssl to v5.9.2, apply upstream patch
Apply upstream patch to fix a regression in 5.9.2.

Refs:
https://github.com/wolfSSL/wolfssl/issues/10790
https://github.com/wolfSSL/wolfssl/pull/10793
7dd269fc52

Ref: #22175 (local mitigation attempt)
Fixes #22160

Closes #22204
2026-07-02 03:20:22 +02:00
Daniel Stenberg
3507b74dba
RELEASE-NOTES: synced 2026-07-01 23:16:12 +02:00
Stefan Eissing
75c2c881af
openssl+sectrust: fix session reuse
When TLS is verified via Apple SecTrust, openssl internal state is a
verification faiure (that is how it works, we use sectrust when openssl
fails to verify and natice ca store is enabled).

OpenSSL stores this verification status inside its TLS session objects.
On reuse, we see an unverified session and do not reuse it for a
verified connect attempt. While this is a performance penalty for most
connections, it *fails* on ftps:// transfers where servers expect
session reuse on DATA connections.

Fix this by remembering that TLS and a session was verified by sectrust
and allow reuse of such sessions for new connect attempts that also use
sectrust.

Closes #22235
2026-07-01 23:11:10 +02:00
Daniel Stenberg
417189f360
TODO: drop all SMB ideas
SMB is about to be removed, no point in adding new SMB things now.

Closes #22241
2026-07-01 22:42:29 +02:00
Daniel Stenberg
fecff6e610
TODO: Support WebSocket text frames with command line tool
Closes #21997
Closes #22240
2026-07-01 22:41:18 +02:00
Dan Fandrich
2c97912d7c INFRASTRUCTURE.md: fix typo 2026-07-01 09:04:30 -07:00
dependabot[bot]
0e7030f0e1
GHA: bump GitHub Actions
- updates `actions/cache` from 5.0.5 to 6.1.0
- updates `actions/checkout` from 6.0.2 to 7.0.0
- updates `github/codeql-action/analyze` from 4.36.0 to 4.36.2
- updates `github/codeql-action/init` from 4.36.0 to 4.36.2
- updates `msys2/setup-msys2` from 2.31.1 to 2.32.0

Closes #22239
2026-07-01 17:19:14 +02:00
Viktor Szakats
a55dfa5e35
GHA/windows: exclude diffutils for 32-bit builds
It's not longer offered by MSYS2.

Bug: https://github.com/curl/curl/pull/22239#issuecomment-4856772868
Ref: b13c6d3af1
Ref: c4e776cafa #17103

Closes #22242
2026-07-01 17:18:36 +02:00
Daniel Stenberg
5bf1ce64f5
curl_ws_meta.md: polish and better vocabulary
Assisted-by: Hendrik Hübner
Closes #22233
2026-07-01 13:40:00 +02:00
Viktor Szakats
adf843fbbd
GHA/curl-for-win: upload snapshot Windows curl tool binary
These are generated for every PR and master pushes. Retain for 3 days.
Size is 1.8MB zipped per artifact. (Takes 1 second extra job time.)

Ref: #22162
Ref: 1b0e3569b3

Closes #22234
2026-07-01 12:12:37 +02:00
Viktor Szakats
8b6b0d9ee7
tool_cb_hdr: de-duplicate filename setter
Closes #22232
2026-07-01 12:12:37 +02:00
Emmanuel Ugwu
acebf346fe schannel: shut off experimental TLS 1.3 support for Win 10
- Change minimum Windows version for TLS 1.3 support to
  Windows Server 2022.

Prior to this change Windows Server 2022 was already used as the minimum
version in some but not all of the checks for TLS 1.3 support.

Ref: https://github.com/curl/curl/pull/21719#issuecomment-4520234306
Ref: https://github.com/curl/curl/issues/21702

Signed-off-by: Emmanuel Ugwu <emmanuelugwu121@gmail.com>

Closes https://github.com/curl/curl/pull/22231
2026-07-01 03:37:35 -04:00
Viktor Szakats
c0cae1eba4
formdata: replace stray camelcase local function names
Replace with names using the style in the rest of codebase. Also move
the object to left-hand side and action to the right-hand side.

Closes #22223
2026-06-30 11:36:55 +02:00
Viktor Szakats
6fbb65126d
openssl: replace stray legacy API variant with EVP_DigestInit_ex()
To match rest of code, use the modern variant and avoid an unnecessary
internal reset/cleanup.

Closes #22222
2026-06-30 11:36:55 +02:00
Viktor Szakats
5b10939ef7
mbedtls: replace memset() with psa_hash_operation_init()
To initialize hash contexts.

Ref: https://arm-software.github.io/psa-api/crypto/1.1/api/ops/hashes.html#c.psa_hash_operation_init
Follow-up to 3a305831d1 #19077

Closes #22220
2026-06-30 11:36:55 +02:00
Memduh Çelik
ddc76c24c5
tests: pin connection reuse rules for partial, host, and credentials
Add classic tests 3223-3226 and extend tests/http/test_12_reuse.py so that
connection reuse decisions are explicit:

- partial/aborted HTTP/1.1 responses must not reuse the connection
  (premature multi_done closes non-multiplexed conns)
- different target hostnames must not share a connection even when they
  resolve to the same address (url_match_destination)
- HTTP Basic credentials are per-request (PROTOPT_CREDSPERREQUEST), so
  different -u values still reuse; assert that with num_connects
- same host positive control reuses (num_connects 1 then 0)

Closes #22224
2026-06-30 09:57:00 +02:00
Patrick Monnerat
f02c53361e
sasl: fix zero-length response encoding
A sasl zero-length normal response is an empty string, unlike an initial
response. Since the encoding of a zero-length initial response is
protocol dependent, move its handling to the protocol-specific sendauth
procedure. Similarly, do not check for an '=' server message, as this
should normally never occur.

Update the erroneous tests accordingly.

Closes #22218
2026-06-30 08:58:33 +02:00
alhudz
bedeeaa4a7
smtp: reject CR and LF in the envelope address
Verified in test 2110

Closes #22119
2026-06-29 22:28:46 +02:00
Daniel Stenberg
8aeef462e3
config2setopt.c: refactor config2setopts
Introduce sub functions

Closes #22215
2026-06-29 22:24:57 +02:00
Daniel Stenberg
7791b1629b
CURLSHOPT_(UN)SHARE.md: do not modify shares while in use
Reported-by: smaeljaish on hackerone

Closes #22217
2026-06-29 22:23:55 +02:00
Daniel Stenberg
ea71c3b6b6
openldap: handle Curl_sasl_continue() returns better
Similar to how it gets treated already in other protocol handlers.

Follow-up to eeca818b1e

Reported-by: Eunsoo Kim
Closes #22213
2026-06-29 22:22:52 +02:00
HwangRock
df350dd0d8
content_encoding: give a clear error on multi-member gzip
A gzip Content-Encoding response holding more than one gzip member made
curl decode the first member and then fail the transfer with a bare
CURLE_WRITE_ERROR and no hint about the cause. Detect the trailing
member and fail with a message that explains what happened.

Fixes #22156
Closes #22172
2026-06-29 22:21:34 +02:00