Commit graph

7501 commits

Author SHA1 Message Date
Stefan Eissing
4ff212f8ed
url: connection reuse fixes for starttls
Add test_31_13 to check connection reuse on mixed --ssl-reqd setting.
For that add debug env var CURL_DBG_NO_USE_SSL_ON_FIRST to disable
--ssl-reqd for the first url. Check that the connection without SSL
from the first url is not reused on the second URL that requires it.

Tweak special ftp: protocol check to fail a DEBUGASSERT on mismatched
`use_ssl` settings as that should have been caught before in the
connection reuse matching (imap/smtp etc. do not have this extra check
and rely on the general part doing its job).

Closes #21665
2026-05-31 23:29:15 +02:00
Viktor Szakats
f1a6f190a6
badwords: prefer 'workaround' (without hyphen)
Closes #21807
2026-05-31 22:05:54 +02:00
Viktor Szakats
cfa735c40a
h3-proxy: rename feature 'Proxy/PROXY-HTTP3' to 'proxy-HTTP3'
For consistency and to follow existing 'HTTPS-proxy' (with lowercase
'proxy') feature tag more closely.

Follow-up to e78b1b3ecc #21153

Closes #21796
2026-05-28 12:52:50 +02:00
Viktor Szakats
f2183f51b6
build: say 'experimental' in option descriptions
Also:
- INSTALL-CMAKE.md: alpha-sort enable options.
- cmake: sync a description between source and docs.

Closes #21795
2026-05-28 12:52:50 +02:00
Viktor Szakats
4f31f076c2
INSTALL-CMAKE.md: document H2O config variable
Follow-up to e78b1b3ecc #21153

Closes #21769
2026-05-27 16:53:57 +02:00
Viktor Szakats
7e1001bcd6
tidy-up: miscellaneous
- H3 proxy: re-sync code with original source `curl_ngtcp2.c` to reduce
  differences, and to apply missed minor fixes. Also apply clang-format.
  Drop redundant `#undef`s, casts, `#endif` comments, includes, drop
  intermediate variables, sync include and macro order.
  Follow-up to e78b1b3ecc #21153
- INSTALL-CMAKE.md: move `CURL_ENABLE_SMB` to the enable section.
- tests/http/env: rename `tcpdmp` to `tcpdump` to match object variable.
- mbedtls: drop incorrect `mbedTLS 4+` comments.
  (features are also supported by 3+, meaning it's always supported.)
- lib1648: rename a variable to match purpose.
- CIPHERS.md: alpha-sort link list.
- replace rare `X''` hex markup with `0x`.
- `IP v4/6` -> `IPv4/6`.
- 'version X.Y' -> 'vX.Y', where sensible.
- 'VX.Y' -> 'vX.Y', where sensible.
- fix indents, casing, newlines, typos.

Closes #21772
2026-05-27 16:53:57 +02:00
Aritra Basu
e78b1b3ecc
HTTP/3: add proxy CONNECT and MASQUE CONNECT-UDP support (ngtcp2 QUIC)
This patch adds two major proxy capabilities to curl (ngtcp2 QUIC):
- HTTP/3 Proxy CONNECT: Tunnel HTTP/1.1 or HTTP/2 traffic through an
  HTTPS proxy that speaks HTTP/3 (QUIC) using the standard CONNECT
  method over an HTTP/3 connection.
- MASQUE CONNECT-UDP: Tunnel HTTP/3 (QUIC) traffic through an HTTP
  proxy (speaking HTTP/1.1, HTTP/2, or HTTP/3) using the extended
  CONNECT method with the CONNECT-UDP protocol (RFC9297 & RFC9298).

Public API additions:
- `CURLPROXY_HTTPS3`: new proxy type constant for HTTP/3 proxy
- `--proxy-http3`: new CLI flag to negotiate HTTP/3 with HTTPS proxy

The implementation adds two new filters:
- `H3-PROXY` - enables negotiating HTTP/3 (QUIC) to the proxy and
  running CONNECT/CONNECT-UDP through that proxy transport.
- `CAPSULE` - dedicated filter inserted between QUIC transport and
  HTTP-PROXY to handle datagram capsule encapsulation/decapsulation.

Here is how the curl filter chaining looks in different scenarios:
- HTTP/3 Proxy CONNECT (tunneling TCP protocols over QUIC proxy):
  conn -> HTTP/1.1 or HTTP/2  -> SSL -> HTTP-PROXY ->
                                 H3-PROXY -> HAPPY-EYEBALLS -> UDP
- MASQUE CONNECT-UDP (tunneling QUIC over any proxy):
  conn -> HTTP/3 -> CAPSULE -> HTTP-PROXY -> H3-PROXY ->
                               HAPPY-EYEBALLS -> UDP
  conn -> HTTP/3 -> CAPSULE -> HTTP-PROXY -> H1-PROXY or H2-PROXY ->
                               SSL -> HAPPY-EYEBALLS -> TCP

- Both features currently require the ngtcp2 QUIC backend.
- Both features are experimental (disabled by default). Enable with
  `--enable-proxy-http3`(autotools) or `-DUSE_PROXY_HTTP3=ON`(CMake).

Tests:
- tests/unit/unit3400.c: Unit tests for capsule protocol encode/decode
- tests/http/test_60_h3_proxy.py: Comprehensive pytest integration suite
- tests/http/testenv/h2o.py: Managing h2o instances with HTTP/1.1, HTTP/2,
  and HTTP/3 (QUIC) listeners, proxy.connect and proxy.connect-udp enabled.

References:
  RFC 9297 - HTTP Datagrams and the Capsule Protocol
  RFC 9298 - Proxying UDP in HTTP
  RFC 9000 §16 — Variable-Length Integer Encoding

Signed-off-by: Aritra Basu <aritrbas+gh@cisco.com>

Closes #21153
2026-05-27 08:49:53 +02:00
Viktor Szakats
0cb455aa85
INSTALL-CMAKE.md: drop two obsolete sections
Follow-up to 89043ba906 #20407

Closes #21761
2026-05-26 21:59:48 +02:00
mik
32227f83b4
docs: fix odd wording in CONTRIBUTE.md
Found with AI assistance, verified manually

Closes #21705
2026-05-26 11:27:46 +02:00
Daniel Stenberg
a4d8fd7a2a
VULN-DISCLOSURE-POLICY.md: emphasize the no email thank you part
Closes #21747
2026-05-26 10:00:22 +02:00
Max Dymond
307cfd008b KNOWN_BUGS: remove stale Threads::Threads entry
The old CMake bug about exporting -lpthread instead of Threads::Threads
no longer matches current master. As of 2d546d239e
("cmake: use Threads::Threads imported target for POSIX Threads"),
the build now uses Threads::Threads and the generated CMake package
config resolves the dependency explicitly, so this KNOWN_BUGS entry is stale.

Closes #21734
2026-05-24 11:12:30 +02:00
Jay Satiro
2ba0a0e41e CIPHERS.md: fix the example that uses only TLS 1.3
- Add --tls-max 1.3 to set the maximum version to TLS 1.3.

- Remove Schannel because it doesn't support TLS 1.3 ciphers since
  6238888.

Prior to this change the example set the minimum version to TLS 1.3 but
not the maximum version to TLS 1.3.

Ref: https://github.com/curl/curl/issues/21702

Closes https://github.com/curl/curl/pull/21719
2026-05-22 11:18:02 -04:00
Stefan Eissing
bfbff7852f
http2: remove stream dependency tracking
The HTTP/2 feature is deprecated, few servers implement it and our
implementation is complicated by its state management. Make the two
CURLOPT_* involved a nop and deprecate them.

Closes #21723
2026-05-22 09:44:08 +02:00
11soda11
2056498625
KNOWN_BUGS.md: remove fixed GnuTLS <-> OpenSSL incompat bug
The entry is about GnuTLS not sending the client cert when it doesn't
match the `DN` the server requested.  OpenSSL does the opposite.

The issue was already fixed by #4958 and removed from KNOWN_BUGS,
but it was added back to the list by #16677, seemingly by mistake.

The issue is still fixed for GnuTLS >= 3.5.0.
As curl only supports GnuTLS >= 3.6.5, remove the bug entry from
KNOWN_BUGS.md

Fixes #21720
Closes #21722
2026-05-22 08:13:51 +02:00
Viktor Szakats
419b1c0b75
checksrc: detect curlx_safefree() opportunities
Follow-up to bcd0497c81 #21700
Follow-up to 1c3289c85e #21684
Follow-up to c0f0e400e0 #5968
Follow-up to 0f4a03cbb6

Closes #21703
2026-05-21 11:07:34 +02:00
Joshua Rogers
f2692b54f7
docs: note CURLOPT_PINNEDPUBLICKEY has no effect on legacy LDAP backend
Closes #21682
2026-05-21 08:08:25 +02:00
Viktor Szakats
b3f76b21c9
tidy-up: miscellaneous
- fix typos and wording in documentation and comments.
- KNOWN_BUGS: merge duplicate H1 section.
- test_10_proxy: delete stray expressions.
- Perl: `while()` -> `while(1)`.
- Perl: fix indent, whitespace, drop redundant quotes and parentheses.
- fix casing: URL, SSL, Windows.
- badwords: readd `threadsafe`, add `well-known` (and fix it).
- replace `WinXP` -> `Windows XP` to match other uses.

Closes #21646
2026-05-20 00:50:43 +02:00
Viktor Szakats
d99dcfb04a
BUFQ.md: re-sync with source code
Also:
- move bullet points out from C code fences.
- fold long lines.

Follow-up to d4983ffc13 #17396

Closes #21678
2026-05-19 16:55:45 +02:00
Viktor Szakats
1fb734bc2d
docs: tidy-up scheme references
After this patch `://` schemes are lowercase and enclosed in backticks.

Also:
- docs/libcurl/libcurl-multi.md: drop a stray C code fence.
- docs/libcurl/libcurl-tutorial.md: replace single/double quotes with
  Markdown markup where applicable.

Ref: #21646

Closes #21674
2026-05-19 16:55:45 +02:00
Dan Fandrich
d24652971a docs/libcurl: fix the version for curl_multi_socket_action
It was added in 7.16.3, not 7.15.4 (that's when curl_multi_socket was
added).
2026-05-18 22:34:05 -07:00
Daniel Stenberg
64824e439d
VULN-DISCLOSURE-POLICY.md: test code is not secure
Don't tell us about it

Closes #21660
2026-05-18 16:19:06 +02:00
Daniel Stenberg
9107e8ba98
curl_easy_pause.md: rephrase the stream cache when pause clause
- mention HTTP/3
- it is 10 MB per stream these days

Closes #21658
2026-05-18 15:51:08 +02:00
Daniel Stenberg
5c1e017987
curl_easy_setopt.md: change options when no transfer runs
Underscore this. Changing them mid-transfer may cause problems.

Fixes #21604
Reported-by: Joshua Rogers
Closes #21657
2026-05-18 15:07:00 +02:00
Viktor Szakats
64adc43a6e
scripts: catch Credits-to contributors
Also:
- THANKS: add Credits-to attribution missed earlier.

Closes #21653
2026-05-17 22:48:22 +02:00
Viktor Szakats
5688c2a8ee
SSLCERTS: document 8.19.0 default Native CA builds (Windows)
Ref: https://curl.se/docs/sslcerts.html

Follow-up to 1730407b74 #18279
Reported-by: chrizilla on github
Fixes #21634

Closes #21639
2026-05-16 11:55:59 +02:00
Viktor Szakats
614b94eecc
tidy-up: miscellaneous
- avoid "will" in builds scripts, scripts folder, curl_easy_ssls_export.md,
  and few other files.
- badwords: add "initialise", "nul terminated", "thread safety" and
  variations.
- prefer "null-terminat", where missing (two places).
- fix "null-terminat*" missing dash.
- hostip: merge two `#if` blocks.
- tool_doswin: fix comment
  Spotted by GitHub Code Quality
  Follow-up to 9a2663322c #17572
- fix stray spaces and newlines.

Closes #21638
2026-05-16 01:56:17 +02:00
Emanuel Krollmann
978ea5afec
KNOWN_BUGS.md: remove fixed x509asn.1 bug
KNOWN_BUGS.md contains an entry about a CURLE_OUT_OF_MEMORY
error on a CURLOPT_CERTINFO call when using Schannel.

This bug was fixed by 137a668e8c.

remove the entry from KNOWN_BUGS.md.

Ref: https://github.com/curl/curl/issues/8741#issuecomment-4445486705

Closes #21611
2026-05-16 01:03:16 +02:00
Daniel Stenberg
60cd4815fd
CURLOPT_SSH_HOSTKEYFUNCTION.md: for new connections only
curl can then reuse the connection for subsequent transfers without
calling this function again.

Fixes #21606
Reported-by: Joshua Rogers
Closes #21628
2026-05-16 00:54:40 +02:00
Stefan Eissing
aafbe089a8
CURLOPT_SHARE: warn about early remove
Add a warning to removing a SHARE from an EASY handle before it is
finished.

Closes #21633
2026-05-15 16:15:28 +02:00
Viktor Szakats
3da249e1f0
gsasl: fix potential double free
Also:
- require libgsasl 1.6.0+ (2010-12-14) for a `gsasl_finish()` that
  handles a NULL argument.
  Ref: b550032df8

Reported-by: Joshua Rogers (Aisle Research)

Closes #21609
2026-05-15 11:49:06 +02:00
Viktor Szakats
eb9b253d66
libssh: add support for SHA256 host public keys
Reported-by: Joshua Rogers
Fixes #21605

Closes #21607
2026-05-15 11:49:06 +02:00
Viktor Szakats
cc5eb4aba9
docs: fix a couple of typos
Spotted by GitHub Code Quality

Closes #21617
2026-05-15 01:37:38 +02:00
0xN3R3K3
db4a6f286b
docs: fix grammar and wording in FAQ
Closes #21593
2026-05-13 23:19:26 +02:00
Daniel Stenberg
2238f0921c
curl: named globs in output file name for upload glob references
Use parts of text from the upload filename field when that uses globbing
by giving it a name the same way we do it for URL globs. For example, if
you upload three files to a HTTP URL and want to save the corresponding
responses in separate files:

    curl -T 'file{<num>1,2,3}' https://upload.example/ -o 'response-#<num>'

Verified by test 2014

Closes #21407
2026-05-13 10:07:50 +02:00
Daniel Stenberg
89f38c168c
CURLOPT_MAXFILESIZE: clarify this also works for on-going transfers
It was not really clear, but it has worked like this since 8.4.0 which
now is a while.

Closes #21582
2026-05-13 09:45:33 +02:00
Viktor Szakats
54d5de5305
THANKS-filter: update
Source: https://github.com/andrew

Closes #21577
2026-05-13 00:43:27 +02:00
Andrei Rybak
a3618d166d
VULN-DISCLOSURE-POLICY.md: remove mention of bug bounty reward
As a follow-up to commits ca7ef4b817 ("BUG-BOUNTY.md: we stop the
bug-bounty end of Jan 2026", 2026-01-22) and ed7bf43a08 ("BUG-BOUNTY.md:
minor rephrase to say there is no bug bounty", 2026-03-10), remove a
leftover mention of the reward for vulnerability reports, that no longer
exists, in file `VULN-DISCLOSURE-POLICY.md`.

Fixes #21571
Reported-by: Alan De Smet
Closes #21574
2026-05-12 23:47:29 +02:00
Stefan Eissing
8f71d0fde5
creds: hold credentials
Authorizdation credentials are kept in `struct Curl_creds`. This contains:

* `user`: the username, maybe the empty string
* `passwd`: the password, maybe the empty string
* `sasl_authzid`: the SASL authz value, maybe the empty string
* `oauth_bearer`: the OAUTH bearer token, maybe the empty string
* `source`: where the credentials from from
* `refcount`: a reference counter to link/unkink creds

A `creds` with all values empty is equivalent to NULL, e.g. no `creds`
instance. With reference counting, `creds` can be linked/unlinked
in several places.

See docs/internals/CREDENTIALS.md for use.

Closes #21548
2026-05-12 16:05:15 +02:00
Daniel Stenberg
cb0636980b
tool_urlglob: add named globs
Idea-by: Bastian Jesuiter

Verified by test 2408 - 2411

Closes #21409
2026-05-12 08:33:01 +02:00
Tim Martin
185e67e1fa
docs: fix --follow doc typo
Let the singular ~~object~~ subject "option" agree with the verb "set".

Closes #21553
2026-05-12 02:10:27 +02:00
Daniel Stenberg
37b2403f48
lib: drop support for CURLAUTH_DIGEST_IE
This bit was used to do Digest authentication like Internet Explorer
before version 7 (released on October 18, 2006). Presumably no one uses
this anymore and since it is hard to use and does broken auth, starting
in 8.21.0 this bit does nothing (except setting the actual Digest bit).

Closes #21486
2026-05-11 13:43:47 +02:00
Viktor Szakats
4815070794
tidy-up: sort TLS backends, distros, alphabetically
Also:
- replace stray [Rr]ustls-ffi with Rustls for consistency.
- add AWS-LC to a couple of lists where missing.

Closes #21481
2026-05-11 11:57:25 +02:00
Daniel Stenberg
d656ff9458
CURLOPT_ECH.md: simplify the description language
It no longer requires "a special build" of OpenSSL, just OpenSSL 4+.

Emphasize the experimental part a little clearer.

Drop the caveat for wolfSSL from the main description.

Closes #21536
2026-05-08 16:23:05 +02:00
Daniel Stenberg
94729ce4e4
CURLOPT_HAPROXYPROTOCOL.md: only sent for newly setup connections
Closes #21517
2026-05-07 09:11:30 +02:00
Stefan Eissing
bc40e09f63
lib: introduce Curl_peer
`struct Curl_peer` keeps information about a communication endpoint
together. It will replace `conn->host` and `conn->conn_to_host` and
proxyinfo host. It will also become part of `struct ssl_peer`.

It has a reference counter, so an instance can be shared between
connections and filters.

Elminiates `conn->host` and `conn->connect_to_host`, used in the
proxyinfo structures. Passed to DNS resolution and socks filters, etc.

Pass peer to http proxy and socks tunnel filters. Use peer in dns filter
and resolving. Make `Curl_peer` a member in the `struct ssl_peer`.

Add `docs/internals/PEERS.md` for documentation.

Closes #21472
2026-05-05 16:22:11 +02:00
Daniel Stenberg
a575601b5b
show-headers.md: mention bold headers and --no-styled-output
Mentioned-by: Sollace on github
Fixes #21495
Closes #21497
2026-05-04 17:31:08 +02:00
Daniel Stenberg
a790b634c0
libcurl-easy.md: minor clarifications
Closes #21491
2026-05-04 11:22:05 +02:00
Daniel Stenberg
d0717acaf0
user-agent.md: mention double quotes too
Reported-by: Jeremy Nicoll
Bug: https://curl.se/mail/archive-2026-04/0029.html
Closes #21477
2026-05-01 10:27:17 +02:00
Viktor Szakats
91232fc2a2
tidy-up: miscellaneous
- sha256: fix backend priority in comment.
- URLs: link to IETF URLs to the HTML document, to match others.
- VERSIONS.md: use unified date format for recent entries too.
  Ref: ce5d32032f
- GHA/labeler.yml: alpha-sort file masks in a label block.
- tests/server/mqttd: fix call arg list in a disabled function.
- tests/server/mqttd: fix comment.

Closes #21473
2026-04-30 20:22:23 +02:00
Daniel Stenberg
a05f34973e
RELEASE-NOTES: synced
curl 8.20.0 release

plus VERSIONS.md update
2026-04-29 07:45:21 +02:00