]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
17 months agomanagen: error on trailing blank lines in input files
Daniel Stenberg [Tue, 25 Jun 2024 11:23:37 +0000 (13:23 +0200)] 
managen: error on trailing blank lines in input files

Ref: #14014
Closes #14015

17 months agotidy-up: more whitespace
Viktor Szakats [Tue, 25 Jun 2024 11:12:30 +0000 (13:12 +0200)] 
tidy-up: more whitespace

Closes #14014

17 months agomulti: multi_getsock(), check correct socket
Stefan Eissing [Tue, 25 Jun 2024 09:35:48 +0000 (11:35 +0200)] 
multi: multi_getsock(), check correct socket

 - in phase CONNECTING/TUNNELING/PROTOCONNECT, retrieve
   the socket from the connection filters and do not rely
   on `conn->sockfd` being already set by the transfer.
 - this applies to the default behaviour, a protocol handler
   may override this via its callbacks.
 - add a warning message in multi_getsock() when the transfer
   is expected to have something in its pollset, but instead
   it is empty.

Reported-by: saurabhsingh-dev on github
Fixes #13998
Closes #14011

17 months agomanagen: fix each options footer to end with newline
Daniel Stenberg [Tue, 25 Jun 2024 09:35:48 +0000 (11:35 +0200)] 
managen: fix each options footer to end with newline

A previous change sometimes made a command line option's description not
end with a newline immediately before the next command line.

Also widened the lines to wrap on column 79 instead of 78.

Closes #14010

17 months agowolfssl: assume key_file equal to clientcert in the absence of key_file
Alex Snast [Mon, 24 Jun 2024 21:28:23 +0000 (14:28 -0700)] 
wolfssl: assume key_file equal to clientcert in the absence of key_file

When user sets CURLOPT_SSLCERT but leaves CURLOPT_SSLKEY unset assume
the path passed in CURLOPT_SSLCERT holds the ssl key which is what we do
in openssl implementation.

Fixes #14007
Closes #14008

17 months agoautotools: fix pkg-config names (zstd, ngtcp2*)
Viktor Szakats [Mon, 24 Jun 2024 18:29:02 +0000 (20:29 +0200)] 
autotools: fix pkg-config names (zstd, ngtcp2*)

Also verified that all names now match up with CMake.

Follow-up to f057de5a1a950a90d1920021db152a4b695f1a8a #13911
Follow-up to eeab0ea7aa19af61af881e8a0bf9ff1f2e28ef79 #13994
Reported-by: 李四
Fixes #14005
Closes #14006

17 months agotidy-up: whitespace [ci skip]
Viktor Szakats [Mon, 24 Jun 2024 18:26:34 +0000 (20:26 +0200)] 
tidy-up: whitespace [ci skip]

17 months agocmdline-docs: "added in" cleanups
Daniel Stenberg [Mon, 24 Jun 2024 14:25:40 +0000 (16:25 +0200)] 
cmdline-docs: "added in" cleanups

- markup fixes
- remove some mentions of < 7.60.0 changes

Closes #14003

17 months agoRELEASE-NOTES: synced
Daniel Stenberg [Mon, 24 Jun 2024 14:34:14 +0000 (16:34 +0200)] 
RELEASE-NOTES: synced

17 months agomanagen: "added in" fixes
Daniel Stenberg [Mon, 24 Jun 2024 11:57:02 +0000 (13:57 +0200)] 
managen: "added in" fixes

 - up the limit: remove all mentions of 7.60 or earlier from manpage
   7.60 is 6 years old now.
 - warn on "broken" added in lines, as they avoid detection
 - fixup added in markup in a few curldown files

Closes #14002

17 months agoconfigure: fix pkg-config library name 'libnghttp3'
Matt Jolly [Mon, 24 Jun 2024 06:49:10 +0000 (16:49 +1000)] 
configure: fix pkg-config library name 'libnghttp3'

Closes #13994

17 months agomanagen: cleanups to generate nicer-looking output
Daniel Stenberg [Mon, 24 Jun 2024 08:53:29 +0000 (10:53 +0200)] 
managen: cleanups to generate nicer-looking output

- output "see also" last
- when there are multiple mutex items, use commas between all of them
  except the last.
- call them mututally exclusive WITH not TO other options.
- remove trailing space from added in, add newline prefix
- smoother language for requires

Closes #14001

17 months agoconfigure: require a QUIC library if nghttp3 is used
Daniel Stenberg [Mon, 24 Jun 2024 08:27:08 +0000 (10:27 +0200)] 
configure: require a QUIC library if nghttp3 is used

Instead of just silently disabling HTTP/3.

Reported-by: Matt Jolly
Fixes #13995
Closes #13999

17 months agodocs/cmdline-opts: remove two superfluous "Added in" mentions
Daniel Stenberg [Mon, 24 Jun 2024 09:08:19 +0000 (11:08 +0200)] 
docs/cmdline-opts: remove two superfluous "Added in" mentions

The key "added in" phrase for the option itself is added automatically.

Closes #14000

17 months agocookie-jar.md: see also --junk-session-cookies
Daniel Stenberg [Mon, 24 Jun 2024 07:36:39 +0000 (09:36 +0200)] 
cookie-jar.md: see also --junk-session-cookies

Closes #13996

17 months agoruntests: support crlf="yes" for the <stderr> section
Daniel Stenberg [Sun, 23 Jun 2024 14:22:40 +0000 (16:22 +0200)] 
runtests: support crlf="yes" for the <stderr> section

17 months agoTODO: -h option
Daniel Stenberg [Sun, 23 Jun 2024 14:05:44 +0000 (16:05 +0200)] 
TODO: -h option

Support "curl -h --insecure" etc to output the manpage section for the
--insecure command line option in the terminal. Should be possible to
work with either long or short versions of command line options.

Closes #13990

17 months agotrace-ascii.md: mention "%" for stderr
Daniel Stenberg [Sun, 23 Jun 2024 14:12:50 +0000 (16:12 +0200)] 
trace-ascii.md: mention "%" for stderr

Closes #13991

17 months agoconnect-to.md: expand with examples
Daniel Stenberg [Sun, 23 Jun 2024 12:12:33 +0000 (14:12 +0200)] 
connect-to.md: expand with examples

- add referer from the resolve section to connect-to if user wants
  wildcard for the port number

Closes #13989

17 months agoTODO: connect to multiple IPs in parallel
Daniel Stenberg [Sun, 23 Jun 2024 09:31:16 +0000 (11:31 +0200)] 
TODO: connect to multiple IPs in parallel

Closes #13986

17 months agodump-header.md: mention minus for stdout
Daniel Stenberg [Sun, 23 Jun 2024 09:33:47 +0000 (11:33 +0200)] 
dump-header.md: mention minus for stdout

Closes #13985

17 months agoCURLOPT_RESOLVE.md: mention hostname can be wildcard ('*')
Daniel Stenberg [Sat, 22 Jun 2024 20:50:15 +0000 (22:50 +0200)] 
CURLOPT_RESOLVE.md: mention hostname can be wildcard ('*')

Closes #13983

17 months agocf-socket: optimize curlx_nonblock() and check its return error
Andy Pan [Thu, 13 Jun 2024 13:28:01 +0000 (21:28 +0800)] 
cf-socket: optimize curlx_nonblock() and check its return error

Reviewed-by: Stefan Eissing
Closes #13942

17 months agox509asn1: prevent NULL dereference
z2_ [Thu, 20 Jun 2024 19:57:07 +0000 (21:57 +0200)] 
x509asn1: prevent NULL dereference

Closes #13978

17 months agounit2604: use 'unitfail' instead of 'error' variable
Daniel Stenberg [Wed, 19 Jun 2024 07:34:43 +0000 (09:34 +0200)] 
unit2604: use 'unitfail' instead of 'error' variable

Since the framework is already returning that variable by default.
Avoids a warning for unreachable code.

Reported-by: Tal Regev
Fixes #13967
Closes #13973

17 months agoKNOWN_BUGS: TFTP tests fail on OpenBSD
Daniel Stenberg [Wed, 19 Jun 2024 10:02:40 +0000 (12:02 +0200)] 
KNOWN_BUGS: TFTP tests fail on OpenBSD

Closes #13623
Closes #13975

17 months agoVULN-DISCLOSURE-POLICY: NULL dereferences and crashes
Daniel Stenberg [Wed, 19 Jun 2024 09:47:26 +0000 (11:47 +0200)] 
VULN-DISCLOSURE-POLICY: NULL dereferences and crashes

If a malicious server can trigger a NULL dereference in curl or
otherwise cause curl to crash (and nothing worse), chances are big that
we do not consider that a security problem.

Closes #13974

17 months agoRELEASE-NOTES: synced
Daniel Stenberg [Wed, 19 Jun 2024 09:36:39 +0000 (11:36 +0200)] 
RELEASE-NOTES: synced

17 months agombedtls: support CURLOPT_CERTINFO
Sergey Markelov [Wed, 13 Mar 2024 00:21:06 +0000 (17:21 -0700)] 
mbedtls: support CURLOPT_CERTINFO

Closes #13113

17 months agox509asn1: ASN1tostr() should fail when 'constructed' is set
Daniel Stenberg [Wed, 19 Jun 2024 07:16:56 +0000 (09:16 +0200)] 
x509asn1: ASN1tostr() should fail when 'constructed' is set

This is a regression from my refactor in 623c3a8fa0bdb (#12808)

Follow-up to 623c3a8fa0bdb2751f14b37417

Closes #13972

17 months agox509asn1: remove two static variables
Daniel Stenberg [Wed, 19 Jun 2024 06:59:39 +0000 (08:59 +0200)] 
x509asn1: remove two static variables

cnOID and sanOID were not used outside of the OID table anyway

Closes #13971

17 months agoTODO: TLS channel binding
brian m. carlson [Tue, 18 Jun 2024 08:29:43 +0000 (10:29 +0200)] 
TODO: TLS channel binding

Closes #13483

17 months agocmake: add CURL_USE_GSASL option with detection + CI test
Tal Regev [Fri, 14 Jun 2024 05:09:55 +0000 (08:09 +0300)] 
cmake: add CURL_USE_GSASL option with detection + CI test

Reviewed-by: Viktor Szakats
Closes #13948

17 months agox509asn1: make Curl_extract_certinfo store error message
Daniel Stenberg [Sun, 16 Jun 2024 09:07:40 +0000 (11:07 +0200)] 
x509asn1: make Curl_extract_certinfo store error message

To help us all better understand where the error actually comes from.

Ref: #13958
Closes #13959

17 months agoappveyor: dump build logs on failure in VS2008 jobs
Viktor Szakats [Fri, 14 Jun 2024 15:50:21 +0000 (17:50 +0200)] 
appveyor: dump build logs on failure in VS2008 jobs

This seems to be the only way to see what actual toolchain commands were
run, and with what arguments.

Without `dos2unix`, `cat` output comes out empty.

Closes #13957

17 months agocmake: fix quotes when appending multiple options (SecureTransport)
Viktor Szakats [Fri, 14 Jun 2024 11:10:10 +0000 (13:10 +0200)] 
cmake: fix quotes when appending multiple options (SecureTransport)

Copied from a vcpkg distro patch:
https://github.com/microsoft/vcpkg/blob/02745e0f4749d1f51d2025824209408f5a6c3614/ports/curl/dependencies.patch#L43C38-L44

Ref: https://github.com/microsoft/vcpkg/pull/38847
Ref: https://github.com/microsoft/vcpkg/commit/795f2f137e6cf6d985fcc927bffcaf9c0a96e4ac
Ref: https://github.com/microsoft/vcpkg/pull/38847/commits/36f0c917de5319e95361451fc0aef0698b264874#diff-ab5c23e5dc5df412539cc93e24b37abbc588e1918236f8abc019d676b270c85fR39 (sub-commit)

Authored-by: Kai Pastor
Closes #13953

17 months agoCURLOPT_NETRC.md: clarify what it does on Windows
Daniel Stenberg [Sat, 15 Jun 2024 09:49:40 +0000 (11:49 +0200)] 
CURLOPT_NETRC.md: clarify what it does on Windows

Closes #13956

17 months agoKNOWN_BUGS: "HTTP/2 + TLS spends a lot of time in recv"
Daniel Stenberg [Fri, 14 Jun 2024 21:56:37 +0000 (23:56 +0200)] 
KNOWN_BUGS: "HTTP/2 + TLS spends a lot of time in recv"

Closes #13416
Closes #13955

17 months agoRELEASE-NOTES: synced
Daniel Stenberg [Fri, 14 Jun 2024 11:30:06 +0000 (13:30 +0200)] 
RELEASE-NOTES: synced

17 months agoexamples: add missing binaries to .gitignore
Yedaya Katsman [Fri, 14 Jun 2024 10:34:53 +0000 (13:34 +0300)] 
examples: add missing binaries to .gitignore

They were showing as changed when built. Add them sorted alphabetically,
while also moving a few more entries to sorted order.

Closes #13952

17 months agodocs: reference non deprecated libcurl options
Yedaya Katsman [Fri, 14 Jun 2024 08:19:32 +0000 (11:19 +0300)] 
docs: reference non deprecated libcurl options

There are a places where man pages reference deprecated CURLOPT options,
where it doesn't make sense, replace them with the reccomended
replacement option.

also remove reference to the removed mesalink TLS backend

Closes #13951

17 months agognutls: pass in SNI name, not hostname when checking cert
Daniel Stenberg [Fri, 14 Jun 2024 06:46:50 +0000 (08:46 +0200)] 
gnutls: pass in SNI name, not hostname when checking cert

The function we use is called 'gnutls_x509_crt_check_hostname()' but if
we pass in the hostname with a trailing dot, the check fails. If we pass
in the SNI name, which cannot have a trailing dot, it succeeds for
https://pyropus.ca./

I consider this as a flaw in GnuTLS and have submitted this issue
upstream:

  https://gitlab.com/gnutls/gnutls/-/issues/1548

In order to work with old and existing GnuTLS versions, we still need
this change no matter how they view the issue or might change it in the
future.

Fixes #13428
Reported-by: Ryan Carsten Schmidt
Closes #13949

17 months agoBINDINGS: update java link to one that exists
Daniel Stenberg [Fri, 14 Jun 2024 07:45:33 +0000 (09:45 +0200)] 
BINDINGS: update java link to one that exists

The previous java binding seems to have vanished. Link to one that still
exists.

Bug: https://github.com/curl/everything-curl/issues/456
Reported-by: Jiang Wenjian
Closes #13950

17 months agoGHA: update pinned actions
renovate[bot] [Thu, 13 Jun 2024 15:18:24 +0000 (15:18 +0000)] 
GHA: update pinned actions

- github/codeql-action digest to 23acc5c
- actions/checkout digest to 692973e
- rojopolis/spellcheck-github-actions digest to d354a4d

Closes #13935
Closes #13945
Closes #13946

17 months agotool_cb_hdr: allow etag and content-disposition for 3xx reply
Jay Satiro [Fri, 26 Apr 2024 06:29:20 +0000 (02:29 -0400)] 
tool_cb_hdr: allow etag and content-disposition for 3xx reply

- Parse etag and content-disposition headers for 3xx replies.

For example, a server may send a content-disposition filename header
with a redirect reply (3xx) but not with the final response (2xx).
Without this change curl would ignore the server's specified filename
and continue to use the filename extracted from the user-specified URL.

Prior to this change, 75d79a4 had limited etag and content-disposition
to 2xx replies only.

Tests-by: Daniel Stenberg
Reported-by: Morgan Willcock
Fixes https://github.com/curl/curl/issues/13302
Closes #13484

17 months agotransfer: set CSELECT_IN if there is data pending
Daniel Stenberg [Thu, 13 Jun 2024 15:02:55 +0000 (17:02 +0200)] 
transfer: set CSELECT_IN if there is data pending

When aborting the transfer loop early, like when there is rate limiting
in effect, there might be buffered data already read off the socket so
the socket might not signal reability. Therefore we must set the
CSELECT_IN manually if data_pending_() suggests there might be more data
to get. This is particularly noticeable with SSH when the underlying
library has drained the socket and holds pending data in its buffer.

Reported-by: alervd on github
Fixes #13695
Closes #13943

17 months agocmake: enable SOVERSION for Cygwin and `CMAKE_DLL_NAME_WITH_SOVERSION`
Viktor Szakats [Thu, 13 Jun 2024 11:43:59 +0000 (13:43 +0200)] 
cmake: enable SOVERSION for Cygwin and `CMAKE_DLL_NAME_WITH_SOVERSION`

- enable SOVERSION when `CMAKE_DLL_NAME_WITH_SOVERSION=ON` is set.
  Ref: https://cmake.org/cmake/help/v3.27/variable/CMAKE_DLL_NAME_WITH_SOVERSION.html
  Use: https://github.com/search?q=-DCMAKE_DLL_NAME_WITH_SOVERSION&type=code

- enable SOVERSION for Cygwin builds by default.

Ref: #13936
Ref: #13944
Closes #13898

17 months agocmake: allow SOVERSION override with `CURL_LIBCURL_SOVERSION`
Viktor Szakats [Thu, 13 Jun 2024 11:43:22 +0000 (13:43 +0200)] 
cmake: allow SOVERSION override with `CURL_LIBCURL_SOVERSION`

Allow overriding SOVERSION with the new CMake option:
`CURL_LIBCURL_SOVERSION=ON/OFF`

For certain target platforms the shared libcurl library filename
contains the SOVERSION. This new option allows to enable/disable
this behavior manually. If set, it takes precedence over the default
setting.

Ref: #13898
Closes #13944

17 months agoDockerfile: update debian:bookworm-slim to 84d83b2
renovate[bot] [Thu, 13 Jun 2024 07:46:58 +0000 (07:46 +0000)] 
Dockerfile: update debian:bookworm-slim to 84d83b2

Closes #13934

17 months agoconfigure: use AC_MSG_WARN for TLS/experimental warning texts
Daniel Stenberg [Thu, 13 Jun 2024 14:08:19 +0000 (16:08 +0200)] 
configure: use AC_MSG_WARN for TLS/experimental warning texts

- no longer warns for mbedtls
- warns for each item on individual lines
- no longer shows irrelevant TLS libraries when multiple are selected
- removes ech repetition

Closes #13941

17 months agoGHA: detect and warn for more English contractions
Daniel Stenberg [Thu, 13 Jun 2024 13:40:39 +0000 (15:40 +0200)] 
GHA: detect and warn for more English contractions

As we try to avoid them in curl documentation

Closes #13940

17 months agotransfer: do not use EXPIRE_NOW while blocked
Stefan Eissing [Fri, 7 Jun 2024 12:38:51 +0000 (14:38 +0200)] 
transfer: do not use EXPIRE_NOW while blocked

- When a transfer sets `data->state.select_bits`, it is
  scheduled for rerun with EXPIRE_NOW. If such a transfer
  is blocked (due to PAUSE, for example), this will lead to
  a busy loop.
- multi.c: check for transfer block
- sendf.*: add Curl_xfer_is_blocked()
- sendf.*: add client reader `is_paused()` callback
- implement is_paused()` callback where needed

Closes #13908

17 months agoci: update dependency ngtcp2/ngtcp2 to v1.6.0
renovate[bot] [Thu, 13 Jun 2024 11:39:21 +0000 (11:39 +0000)] 
ci: update dependency ngtcp2/ngtcp2 to v1.6.0

Closes #13939

17 months agoci: update ngtcp2/nghttp3 to v1.4.0
renovate[bot] [Thu, 13 Jun 2024 11:39:16 +0000 (11:39 +0000)] 
ci: update ngtcp2/nghttp3 to v1.4.0

Closes #13938

17 months agocmake: stop setting SOVERSION for the static lib target
Viktor Szakats [Thu, 13 Jun 2024 09:34:28 +0000 (11:34 +0200)] 
cmake: stop setting SOVERSION for the static lib target

Also move the logic closer to its use and related tidy-ups.

Cherry-picked from #13898
Closes #13936

17 months agoos400: make it compilable again
Patrick Monnerat [Wed, 12 Jun 2024 12:18:16 +0000 (14:18 +0200)] 
os400: make it compilable again

A newly introduced use of getsockname() in the cli tool makes it require
the ascii wrapper module, which is not available outside of the library:
as the tool only uses the address family field (binary), disable
wrappers outside of libcurl.

Fix setsockopt() parameter type mismatch using a (void *) cast.

Sync ILE/RPG binding.

Closes #13930

17 months agolibcurl.pc: add `Requires.private`, `Requires` for static linking
Viktor Szakats [Fri, 7 Jun 2024 22:41:24 +0000 (00:41 +0200)] 
libcurl.pc: add `Requires.private`, `Requires` for static linking

- cmake: populate for dependencies.
- autotools: populate for dependencies.
  (including mbedtls, though the script does not detect
  mbedtls through pkgconfig. mbedtls 3.6.0 now supports it.)

Skip dealing with gssapi in this patch.

Fixes #864
Closes #13911

17 months agocmake: bring `curl-config.cmake` closer to `FindCURL`
Viktor Szakats [Wed, 5 Jun 2024 20:35:48 +0000 (22:35 +0200)] 
cmake: bring `curl-config.cmake` closer to `FindCURL`

Set `CURL_LIBRARIES` and `CURL_INCLUDE_DIRS` variables
for compatibility with CMake's `FindCURL.cmake`:
https://github.com/Kitware/CMake/blob/b411d0146c2e06acfb0c823bb039e99f0191b611/Modules/FindCURL.cmake#L209

For dependent projects, CMake's suggestion is to replace
`CURL_LIBRARIES` with `CURL::libcurl`, and drop `CURL_INCLUDE_DIRS`.

Reported-by: Aurélien Pierre
Ref: https://curl.se/mail/lib-2024-06/0014.html
Ref: https://gitlab.kitware.com/cmake/cmake/-/issues/24580
Closes #13897

17 months agotool_getparam: fix the bsearch call for ip-tos names
Daniel Stenberg [Wed, 12 Jun 2024 22:36:40 +0000 (00:36 +0200)] 
tool_getparam: fix the bsearch call for ip-tos names

Follow-up to 3c20ae08b9591
Reported-by: Samuel Chiang
Fixes #13932
Closes #13933

17 months agorequest: change the struct field bodywrites to a bool, only for hyper
Daniel Stenberg [Wed, 12 Jun 2024 09:20:00 +0000 (11:20 +0200)] 
request: change the struct field bodywrites to a bool, only for hyper

Only hyper needs to know this, and it can use it as a boolean.

Closes #13928

17 months agotest: fix CURLOPT_TCP_KEEPCNT typo
Andy Pan [Wed, 12 Jun 2024 13:23:27 +0000 (21:23 +0800)] 
test: fix CURLOPT_TCP_KEEPCNT typo

Follow up to b77d627d242

Closes #13931

17 months agohttp: remove "struct HTTP"
Daniel Stenberg [Wed, 12 Jun 2024 09:05:44 +0000 (11:05 +0200)] 
http: remove "struct HTTP"

It is not actually used anymore and only contained a dummy struct field.
Remove all traces and uses of it.

Closes #13927

17 months agocd2nroff: convert two warnings to errors
Daniel Stenberg [Wed, 12 Jun 2024 09:38:13 +0000 (11:38 +0200)] 
cd2nroff: convert two warnings to errors

Since the warnings tend to get missed too easily and these are problems
we rather want addressed than letting slide.

Closes #13929

17 months agourlapi: use a correct value for CURLU_NO_GUESS_SCHEME
Daniel Stenberg [Wed, 12 Jun 2024 09:06:34 +0000 (11:06 +0200)] 
urlapi: use a correct value for CURLU_NO_GUESS_SCHEME

It was mistakenly set to the same value as CURLU_GET_EMPTY uses.

Reported-by: Patrick Monnerat
Bug: https://github.com/curl/curl/commit/655d44d139489625e77cf6790d36
Closes #13926

17 months agofile: separate fake headers and body with a stand-alone CRLF
Daniel Stenberg [Wed, 12 Jun 2024 06:55:07 +0000 (08:55 +0200)] 
file: separate fake headers and body with a stand-alone CRLF

Instead of bolting on the extra CRLF to the final header - as that makes
the behavior inconsistent and not as documented. The final CRLF is now
also made unconditional, just like it is for HTTP.

Reported-by: dogma
Bug: https://curl.se/mail/lib-2024-06/0033.html
Closes #13925

17 months agoRELEASE-NOTES: synced
Daniel Stenberg [Wed, 12 Jun 2024 07:37:36 +0000 (09:37 +0200)] 
RELEASE-NOTES: synced

17 months agotcpkeepalive: add CURLOPT_TCP_KEEPCNT and --keepalive-cnt
Andy Pan [Wed, 5 Jun 2024 03:30:16 +0000 (11:30 +0800)] 
tcpkeepalive: add CURLOPT_TCP_KEEPCNT and --keepalive-cnt

Closes #13885

17 months agoTODO: make it "Add missing features to TLS backends"
Daniel Stenberg [Tue, 11 Jun 2024 21:26:42 +0000 (23:26 +0200)] 
TODO: make it "Add missing features to TLS backends"

... instead of just mentioning CA caching.

Closes #13924

17 months agocurl: support VLAN Priority: --vlan-priority
Orgad Shaneh [Tue, 14 May 2024 06:54:26 +0000 (09:54 +0300)] 
curl: support VLAN Priority: --vlan-priority

Add --vlan-priority option to the command line tool for setting VLAN
priority.

Closes #13907

17 months agomisc: fix typos
RainRat [Tue, 11 Jun 2024 17:16:50 +0000 (10:16 -0700)] 
misc: fix typos

Closes #13923

17 months agoCURLOPT_ECH.md: remove repeated 'if'
Daniel Stenberg [Tue, 11 Jun 2024 12:19:52 +0000 (14:19 +0200)] 
CURLOPT_ECH.md: remove repeated 'if'

Closes #13922

17 months agovms: fixed language in comment
Daniel Stenberg [Tue, 11 Jun 2024 12:01:35 +0000 (14:01 +0200)] 
vms: fixed language in comment

It started with me fixing a repeated "are are" but the wording was
incomprehensible so I tried to untangle it.

Closes #13921

17 months agolib: xfer_setup and non-blocking shutdown
Stefan Eissing [Mon, 10 Jun 2024 11:32:13 +0000 (13:32 +0200)] 
lib: xfer_setup and non-blocking shutdown

- clarify Curl_xfer_setup() with RECV/SEND flags and different calls for
  which socket they operate on. Add a shutdown flag for secondary
  sockets
- change Curl_xfer_setup() calls to new functions
- implement non-blocking connection shutdown at the end of receiving or
  sending a transfer

Closes #13913

17 months agotest1486: verify that write-out.md and tool_writeout.c are in sync
Daniel Stenberg [Tue, 11 Jun 2024 07:30:29 +0000 (09:30 +0200)] 
test1486: verify that write-out.md and tool_writeout.c are in sync

- also verify alphabetialal order in the source
- add two missing variables to write-out.md

Closes #13920

17 months agoGHA: add cmake MSYS2 native job
Viktor Szakats [Mon, 10 Jun 2024 21:10:47 +0000 (23:10 +0200)] 
GHA: add cmake MSYS2 native job

curl, libcurl, examples, build-only.

To compare build behaviour with autotools.

Closes #13917

17 months agoopenssl: shortcut store_expired for negative timeouts
Daniel Stenberg [Tue, 11 Jun 2024 06:03:28 +0000 (08:03 +0200)] 
openssl: shortcut store_expired for negative timeouts

Avoid some unnecessary computation if the timeout is negative.

Spotted by CodeSonar
Closes #13919

17 months agoRELEASE-NOTES: synced
Daniel Stenberg [Tue, 11 Jun 2024 07:37:32 +0000 (09:37 +0200)] 
RELEASE-NOTES: synced

17 months agocurl: support -w '%{num_retries}
Daniel Stenberg [Fri, 7 Jun 2024 22:18:44 +0000 (00:18 +0200)] 
curl: support -w '%{num_retries}

Suggested-by: Jay Guerette
Ref: https://github.com/curl/curl/discussions/13901
Closes #13910

17 months agopytest: include testenv/vsftpd.py in dist tarball
Guilherme Puida [Mon, 10 Jun 2024 23:01:38 +0000 (20:01 -0300)] 
pytest: include testenv/vsftpd.py in dist tarball

Closes #13918

17 months agoDISTROS: add MSYS2 (native) links
Viktor Szakats [Mon, 10 Jun 2024 20:36:16 +0000 (22:36 +0200)] 
DISTROS: add MSYS2 (native) links

Also rename existing 'MSYS2' to 'MSYS2 (mingw-w64)'.

Closes #13915

17 months agotool_writeout: get certinfo only when needing it
Daniel Stenberg [Mon, 10 Jun 2024 11:57:01 +0000 (13:57 +0200)] 
tool_writeout: get certinfo only when needing it

Removes a fairly expensive libcurl call when not necessary

Closes #13914

17 months agotool_writeout: bsearch the variable name
Daniel Stenberg [Mon, 10 Jun 2024 11:33:16 +0000 (13:33 +0200)] 
tool_writeout: bsearch the variable name

As the list of variable names grows, doing a simple loop to find the
name get increasingly worse. This switches to a bsearch.

Also: do a case sensitive check for the variable name. The names have
not been documented to be case insensitive and there is no point in
having them so.

Closes #13914

17 months agomulti: prepare multi_wait() for future shutdown usage
Stefan Eissing [Thu, 6 Jun 2024 10:40:38 +0000 (12:40 +0200)] 
multi: prepare multi_wait() for future shutdown usage

- new struct curl_pollfds and struct curl_waitfds
- add structs and methods to init/add/cleanup an array of pollfd and
  struct curl_waitfd. Use in multi_wait() and multi_waitfds() to
  populate the sets for polling.
- place USE_WINSOCK WSAEventSelect() setting into a separate loop over
  all collected pfds

Closes #13900

17 months agoconnection: shutdown TLS (for FTP) better
Stefan Eissing [Fri, 7 Jun 2024 08:12:39 +0000 (10:12 +0200)] 
connection: shutdown TLS (for FTP) better

This adds connection shutdown infrastructure and first use for FTP. FTP
data connections, when not encountering an error, are now shut down in a
blocking way with a 2sec timeout.

    - add cfilter `Curl_cft_shutdown` callback
    - keep a shutdown start timestamp and timeout at connectdata
    - provide shutdown timeout default and member in
      `data->set.shutdowntimeout`.
    - provide methods for starting, interrogating and clearing
      shutdown timers
    - provide `Curl_conn_shutdown_blocking()` to shutdown the
      `sockindex` filter chain in a blocking way. Use that in FTP.
    - add `Curl_conn_cf_poll()` to wait for socket events during
      shutdown of a connection filter chain.
      This gets the monitoring sockets and events via the filters
      "adjust_pollset()" methods. This gives correct behaviour when
      shutting down a TLS connection through a HTTP/2 proxy.
    - Implement shutdown for all socket filters
      - for HTTP/2 and h2 proxying to send GOAWAY
      - for TLS backends to the best of their capabilities
      - for tcp socket filter to make a final, nonblocking
        receive to avoid unwanted RST states
    - add shutdown forwarding to happy eyeballers and
      https connect ballers when applicable.

Closes #13904

17 months agoCURLOPT_CONNECTTIMEOUT*: clarify, document the milliseond version
Daniel Stenberg [Fri, 7 Jun 2024 08:44:28 +0000 (10:44 +0200)] 
CURLOPT_CONNECTTIMEOUT*: clarify, document the milliseond version

Provide an explanation in the CURLOPT_CONNECTTIMEOUT_MS page instead of
just referring to the non-MS version.

Closes #13905

17 months agocmdline-opts: tidy up --ip-tos and --mptcp
Daniel Stenberg [Fri, 7 Jun 2024 09:02:46 +0000 (11:02 +0200)] 
cmdline-opts: tidy up --ip-tos and --mptcp

To make them render nicer in the manpage and minor polish.

Closes #13906

17 months agoRELEASE-NOTES: synced
Daniel Stenberg [Fri, 7 Jun 2024 09:08:46 +0000 (11:08 +0200)] 
RELEASE-NOTES: synced

17 months agocurl: (on linux) add MPTCP support
Dorian Craps [Thu, 4 Apr 2024 09:42:50 +0000 (11:42 +0200)] 
curl: (on linux) add MPTCP support

Multipath TCP (MPTCP), standardized in RFC8684 [1], is a TCP extension
that enables a TCP connection to use different paths.

Multipath TCP has been used for several use cases. On smartphones, MPTCP
enables seamless handovers between cellular and Wi-Fi networks while
preserving established connections. This use-case is what pushed Apple
to use MPTCP since 2013 in multiple applications [2]. On dual-stack
hosts, Multipath TCP enables the TCP connection to automatically use the
best performing path, either IPv4 or IPv6. If one path fails, MPTCP
automatically uses the other path.

To benefit from MPTCP, both the client and the server have to support
it. Multipath TCP is a backward-compatible TCP extension that is enabled
by default on recent Linux distributions (Debian, Ubuntu, Redhat, ...).
Multipath TCP is included in the Linux kernel since version 5.6 [3]. To
use it on Linux, an application must explicitly enable it when creating
the socket. No need to change anything else in the application.

This attached patch adds an --mptcp option which allows the creation of
an MPTCP socket instead of TCP on Linux. If Multipath TCP is not
supported on the system, an error will be reported. It is important to
note that if the end server doesn't support MPTCP, the connection will
continue after a seamless fallback to TCP.

Link: https://www.rfc-editor.org/rfc/rfc8684.html
Link: https://www.tessares.net/apples-mptcp-story-so-far/
Link: https://www.mptcp.dev
Co-developed-by: Dorian Craps (@CrapsDorian) <doriancraps@gmail.com>
Co-developed-by: Olivier Bonaventure (@obonaventure) <Olivier.Bonaventure@uclouvain.be>
Co-developed-by: Matthieu Baerts (@matttbe) <matttbe@kernel.org>
Signed-off-by: Dorian Craps <dorian.craps@student.vinci.be>
Closes #13278

17 months agocurl: support IP Type of Service / Traffic Class: --ip-tos
Orgad Shaneh [Sun, 12 May 2024 05:31:15 +0000 (08:31 +0300)] 
curl: support IP Type of Service / Traffic Class: --ip-tos

Add --ip-tos option to the command line tool for setting TOS for IPv4 or
Traffic Class for IPv6.

Closes #13606

17 months agosocketpair: provide `Curl_socketpair` only when `!CURL_DISABLE_SOCKETPAIR`
Andy Pan [Wed, 5 Jun 2024 08:08:15 +0000 (16:08 +0800)] 
socketpair: provide `Curl_socketpair` only when `!CURL_DISABLE_SOCKETPAIR`

Ref: https://curl.se/dev/log.cgi?id=20240605035856-3529577

Reported-by: Marcel Raad
Closes #13888

17 months agonoproxy: test bad ipv6 net size first
Daniel Stenberg [Thu, 6 Jun 2024 20:58:45 +0000 (22:58 +0200)] 
noproxy: test bad ipv6 net size first

No need to parse anything if the size is out of range.

Added some tests to this effect to test 1614.

Closes #13902

17 months agomanagen: warn on excessively long help texts
Daniel Stenberg [Wed, 5 Jun 2024 12:08:02 +0000 (14:08 +0200)] 
managen: warn on excessively long help texts

Help texts at 49 characters or longer get a warning displayed because
they make --help output uglier and we should make an effort to keep the
help texts short and succinct.

The warning is only for display, it does not break the build. That is
left for the future if necessary.

I picked 49 because the longest current text is 48.

Closes #13895

17 months agolib: tidy up types and casts
Viktor Szakats [Sun, 2 Jun 2024 20:30:52 +0000 (22:30 +0200)] 
lib: tidy up types and casts

Cherry-picked from #13489
Closes #13862

17 months agocmdline-opts/ech.md: shorten the help text
Daniel Stenberg [Wed, 5 Jun 2024 11:44:02 +0000 (13:44 +0200)] 
cmdline-opts/ech.md: shorten the help text

To make --help look sensible again

Closes #13894

17 months agocmdline-opts/_PROTOCOLS.md: mention WS(S)
Daniel Stenberg [Wed, 5 Jun 2024 09:08:33 +0000 (11:08 +0200)] 
cmdline-opts/_PROTOCOLS.md: mention WS(S)

Closes #13891

17 months agoGHA: disable TFTP and WebSockets tests in old-mingw-w64
Viktor Szakats [Wed, 5 Jun 2024 10:35:59 +0000 (12:35 +0200)] 
GHA: disable TFTP and WebSockets tests in old-mingw-w64

Follow-up to 03bd16e5339b069aa9409b75fcab2b21fd3a4b16 #13860
Follow-up to def7d05382743ea7aa1d356d1e41dcb22ecdd4d7

17 months agocmdline-opts/fail.md: expand and clarify
Daniel Stenberg [Wed, 5 Jun 2024 08:52:29 +0000 (10:52 +0200)] 
cmdline-opts/fail.md: expand and clarify

Closes #13890

17 months agodoh-insecure.md: expand
Daniel Stenberg [Wed, 5 Jun 2024 08:18:21 +0000 (10:18 +0200)] 
doh-insecure.md: expand

Closes #13889

17 months agocmdline: expand proxy option explanations
Daniel Stenberg [Wed, 5 Jun 2024 08:10:47 +0000 (10:10 +0200)] 
cmdline: expand proxy option explanations

- do less references to other options
- provide more specific text about proxies
- added more see-also references

Closes #13887

17 months agocmdline-opts: expand the parallel explanations
Daniel Stenberg [Wed, 5 Jun 2024 07:34:32 +0000 (09:34 +0200)] 
cmdline-opts: expand the parallel explanations

Closes #13886