]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
23 months agolib: fix aws-sigv4 having date header twice in some cases
Matthias Gatto [Mon, 28 Aug 2023 11:38:20 +0000 (13:38 +0200)] 
lib: fix aws-sigv4 having date header twice in some cases

When the user was providing the header X-XXX-Date, the header was
re-added during signature computation, and we had it twice in the
request.

Reported-by: apparentorder@users.noreply.github.com
Signed-off-by: Matthias Gatto <matthias.gatto@outscale.com>
Fixes: https://github.com/curl/curl/issues/11738
Closes: https://github.com/curl/curl/pull/11754
23 months agomulti: remove 'processing: <url>' debug message
Jay Satiro [Wed, 30 Aug 2023 06:01:09 +0000 (02:01 -0400)] 
multi: remove 'processing: <url>' debug message

- Remove debug message added by e024d566.

Closes https://github.com/curl/curl/pull/11759

23 months agoftp: fix temp write of ipv6 address
Jay Satiro [Mon, 28 Aug 2023 07:09:18 +0000 (03:09 -0400)] 
ftp: fix temp write of ipv6 address

- During the check to differentiate between a port and IPv6 address
  without brackets, write the binary IPv6 address to an in6_addr.

Prior to this change the binary IPv6 address was erroneously written to
a sockaddr_in6 'sa6' when it should have been written to its in6_addr
member 'sin6_addr'. There's no fallout because no members of 'sa6' are
accessed before it is later overwritten.

Closes https://github.com/curl/curl/pull/11747

23 months agotool: change some fopen failures from warnings to errors
Jay Satiro [Sun, 20 Aug 2023 07:08:15 +0000 (03:08 -0400)] 
tool: change some fopen failures from warnings to errors

- Error on missing input file for --data, --data-binary,
  --data-urlencode, --header, --variable, --write-out.

Prior to this change if a user of the curl tool specified an input file
for one of the above options and that file could not be opened then it
would be treated as zero length data instead of an error. For example, a
POST using `--data @filenametypo` would cause a zero length POST which
is probably not what the user intended.

Closes https://github.com/curl/curl/pull/11677

23 months agohostip: fix typo
Jay Satiro [Tue, 29 Aug 2023 21:08:23 +0000 (17:08 -0400)] 
hostip: fix typo

23 months agotool: avoid including leading spaces in the Location hyperlink
Davide Masserut [Fri, 25 Aug 2023 16:41:10 +0000 (18:41 +0200)] 
tool: avoid including leading spaces in the Location hyperlink

Co-authored-by: Dan Fandrich <dan@coneharvesters.com>
Closes #11735

23 months agoSECURITY-PROCESS.md: not a sec issue: Tricking user to run a cmdline
Daniel Stenberg [Tue, 29 Aug 2023 11:24:06 +0000 (13:24 +0200)] 
SECURITY-PROCESS.md: not a sec issue: Tricking user to run a cmdline

Closes #11757

23 months agoconnect: stop halving the remaining timeout when less than 600 ms left
Daniel Stenberg [Fri, 18 Aug 2023 11:41:16 +0000 (13:41 +0200)] 
connect: stop halving the remaining timeout when less than 600 ms left

When curl wants to connect to a host, it always has a TIMEOUT. The
maximum time it is allowed to spend until a connect is confirmed.

curl will try to connect to each of the IP adresses returned for the
host. Two loops, one for each IP family.

During the connect loop, while curl has more than one IP address left to
try within a single address family, curl has traditionally allowed (time
left/2) for *this* connect attempt. This, to not get stuck on the
initial addresses in case the timeout but still allow later addresses to
get attempted.

This has the downside that when users set a very short timeout and the
host has a large number of IP addresses, the effective result might be
that every attempt gets a little too short time.

This change stop doing the divided-by-two if the total time left is
below a threshold. This threshold is 600 milliseconds.

Closes #11693

23 months agoasyn-ares: reduce timeout to 2000ms
Daniel Stenberg [Mon, 28 Aug 2023 14:07:34 +0000 (16:07 +0200)] 
asyn-ares: reduce timeout to 2000ms

When UDP packets get lost this makes for slightly faster retries. This
lower timeout is used by @c-ares itself by default starting next
release.

Closes #11753

23 months agomisc: remove duplicate words
John Bampton [Sat, 26 Aug 2023 12:08:10 +0000 (22:08 +1000)] 
misc: remove duplicate words

Closes #11740

23 months agoRELEASE-NOTES: synced
Daniel Stenberg [Tue, 29 Aug 2023 08:27:05 +0000 (10:27 +0200)] 
RELEASE-NOTES: synced

23 months agowolfSSL: avoid the OpenSSL compat API when not needed
Daniel Stenberg [Mon, 28 Aug 2023 13:47:29 +0000 (15:47 +0200)] 
wolfSSL: avoid the OpenSSL compat API when not needed

... and instead call wolfSSL functions directly.

Closes #11752

23 months agolib: fix null ptr derefs and uninitialized vars (h2/h3)
Viktor Szakats [Fri, 25 Aug 2023 22:28:35 +0000 (22:28 +0000)] 
lib: fix null ptr derefs and uninitialized vars (h2/h3)

Fixing compiler warnings with gcc 13.2.0 in unity builds.

Assisted-by: Jay Satiro
Assisted-by: Stefan Eissing
Closes #11739

23 months agosecureserver.pl: fix stunnel version parsing
Jay Satiro [Wed, 23 Aug 2023 06:49:47 +0000 (02:49 -0400)] 
secureserver.pl: fix stunnel version parsing

- Allow the stunnel minor-version version part to be zero.

Prior to this change with the stunnel version scheme of <major>.<minor>
if either part was 0 then version parsing would fail, causing
secureserver.pl to fail with error "No stunnel", causing tests that use
the SSL protocol to be skipped. As a practical matter this bug can only
be caused by a minor-version part of 0, since the major-version part is
always greater than 0.

Closes https://github.com/curl/curl/pull/11722

23 months agosecureserver.pl: fix stunnel path quoting
Jay Satiro [Wed, 23 Aug 2023 07:37:43 +0000 (03:37 -0400)] 
secureserver.pl: fix stunnel path quoting

- Store the stunnel path in the private variable $stunnel unquoted and
  instead quote it in the command strings.

Prior to this change the quoted stunnel path was passed to perl's file
operators which cannot handle quoted paths. For example:

$stunnel = "\"/C/Program Files (x86)/stunnel/bin/tstunnel\"";
if(-x $stunnel or -x "$stunnel")
# false even if path exists and is executable

Our other test scripts written in perl, unlike this one, use servers.pm
which has a global $stunnel variable with the path stored unquoted and
therefore those scripts don't have this problem.

Closes https://github.com/curl/curl/pull/11721

23 months agoaltsvc: accept and parse IPv6 addresses in response headers
Daniel Stenberg [Sat, 26 Aug 2023 22:06:02 +0000 (00:06 +0200)] 
altsvc: accept and parse IPv6 addresses in response headers

Store numerical IPv6 addresses in the alt-svc file with the brackets
present.

Verify with test 437 and 438

Fixes #11737
Reported-by: oliverpool on github
Closes #11743

23 months agolibtest: use curl_free() to free libcurl allocated data
Daniel Stenberg [Mon, 28 Aug 2023 06:29:15 +0000 (08:29 +0200)] 
libtest: use curl_free() to free libcurl allocated data

In several test programs. These mistakes are not detected or a problem
as long as memdebug.h is included, as that provides the debug wrappers
for all memory functions in the same style libcurl internals do it,
which makes curl_free and free effectively the same call.

Reported-by: Nicholas Nethercote
Closes #11746

23 months agodisable.d: explain --disable not implemented prior to 7.50.0
Jay Satiro [Tue, 22 Aug 2023 18:48:45 +0000 (14:48 -0400)] 
disable.d: explain --disable not implemented prior to 7.50.0

Option -q/--disable was added in 5.0 but only -q was actually
implemented. Later --disable was implemented in e200034 (precedes
7.49.0), but incorrectly, and fixed in 6dbc23c (precedes 7.50.0).

Reported-by: pszlazak@users.noreply.github.com
Fixes https://github.com/curl/curl/issues/11710
Closes #11712

23 months agohyper: fix ownership problems
Nicholas Nethercote [Mon, 28 Aug 2023 04:35:08 +0000 (14:35 +1000)] 
hyper: fix ownership problems

Some of these changes come from comparing `Curl_http` and
`start_CONNECT`, which are similar, and adding things to them that are
present in one and missing in another.

The most important changes:
- In `start_CONNECT`, add a missing `hyper_clientconn_free` call on the
  happy path.
- In `start_CONNECT`, add a missing `hyper_request_free` on the error
  path.
- In `bodysend`, add a missing `hyper_body_free` on an early-exit path.
- In `bodysend`, remove an unnecessary `hyper_body_free` on a different
  error path that would cause a double-free.
  https://docs.rs/hyper/latest/hyper/ffi/fn.hyper_request_set_body.html
  says of `hyper_request_set_body`: "This takes ownership of the
  hyper_body *, you must not use it or free it after setting it on the
  request." This is true even if `hyper_request_set_body` returns an
  error; I confirmed this by looking at the hyper source code.

Other changes are minor but make things slightly nicer.

Closes #11745

23 months agomulti.h: the 'revents' field of curl_waitfd is supported
Daniel Stenberg [Mon, 28 Aug 2023 08:48:37 +0000 (10:48 +0200)] 
multi.h: the 'revents' field of curl_waitfd is supported

Since 6d30f8ebed34e7276

Reported-by: Nicolás Ojeda Bär
Ref: #11748
Closes #11749

23 months agotool_paramhlp: improve str2num(): avoid unnecessary call to strlen()
Gerome Fournier [Sun, 27 Aug 2023 11:25:47 +0000 (13:25 +0200)] 
tool_paramhlp: improve str2num(): avoid unnecessary call to strlen()

Closes #11742

23 months agodocs: mention critical files in same directories as curl saves
Daniel Stenberg [Mon, 21 Aug 2023 07:37:08 +0000 (09:37 +0200)] 
docs: mention critical files in same directories as curl saves

... cannot be fully protected. Don't do it.

Co-authored-by: Jay Satiro
Reported-by: Harry Sintonen
Fixes #11530
Closes #11701

23 months agoOpenSSL: clear error queue after SSL_shutdown
John Hawthorn [Fri, 25 Aug 2023 18:06:28 +0000 (11:06 -0700)] 
OpenSSL: clear error queue after SSL_shutdown

We've seen errors left in the OpenSSL error queue (specifically,
"shutdown while in init") by adding some logging it revealed that the
source was this file.

Since we call SSL_read and SSL_shutdown here, but don't check the return
code for an error, we should clear the OpenSSL error queue in case one
was raised.

This didn't affect curl because we call ERR_clear_error before every
write operation (a0dd9df9ab35528eb9eb669e741a5df4b1fb833c), but when
libcurl is used in a process with other OpenSSL users, they may detect
an OpenSSL error pushed by libcurl's SSL_shutdown as if it was their
own.

Co-authored-by: Satana de Sant'Ana <satana@skylittlesystem.org>
Closes #11736

23 months agotests: update cookie expiry dates to far in the future
Alexander Kanavin [Fri, 4 Aug 2023 11:48:12 +0000 (13:48 +0200)] 
tests: update cookie expiry dates to far in the future

This allows testing Y2038 with system time set to after that, so that
actual Y2038 issues can be exposed, and not masked by expiry errors.

Fixes #11576
Closes #11610

23 months agomisc: fix spelling
John Bampton [Fri, 25 Aug 2023 11:57:53 +0000 (21:57 +1000)] 
misc: fix spelling

Closes #11733

23 months agocmdline-opts/page-header: clarify stronger that !opt == URL
Daniel Stenberg [Fri, 25 Aug 2023 14:44:20 +0000 (16:44 +0200)] 
cmdline-opts/page-header: clarify stronger that !opt == URL

Everything provided on the command line that is not an option (or an
argument to an option) is treated as a URL.

Closes #11734

23 months agotests/runner: fix %else handling
Daniel Stenberg [Fri, 25 Aug 2023 10:37:32 +0000 (12:37 +0200)] 
tests/runner: fix %else handling

Getting the show state proper for %else and %endif did not properly work
in nested cases.

Follow-up to 3d089c41ea9

Closes #11731

23 months agodocs: Remove mention of #10803 from `KNOWN_BUGS`.
Nicholas Nethercote [Fri, 25 Aug 2023 08:42:43 +0000 (18:42 +1000)] 
docs: Remove mention of #10803 from `KNOWN_BUGS`.

Because the leaks have been fixed.

23 months agoc-hyper: fix another memory leak in `Curl_http`.
Nicholas Nethercote [Fri, 25 Aug 2023 08:40:31 +0000 (18:40 +1000)] 
c-hyper: fix another memory leak in `Curl_http`.

There is a `hyper_clientconn_free` call on the happy path, but not one
on the error path. This commit adds one.

Fixes the second memory leak reported by Valgrind in #10803.

Fixes #10803
Closes #11729

23 months agoc-hyper: fix a memory leak in `Curl_http`.
Nicholas Nethercote [Fri, 25 Aug 2023 05:01:53 +0000 (15:01 +1000)] 
c-hyper: fix a memory leak in `Curl_http`.

A request created with `hyper_request_new` must be consumed by either
`hyper_clientconn_send` or `hyper_request_free`.

This is not terrifically clear from the hyper docs --
`hyper_request_free` is documented only with "Free an HTTP request if
not going to send it on a client" -- but a perusal of the hyper code
confirms it.

This commit adds a `hyper_request_free` to the `error:` path in
`Curl_http` so that the request is consumed when an error occurs after
the request is created but before it is sent.

Fixes the first memory leak reported by Valgrind in #10803.

Closes #11729

23 months agoRELEASE-NOTES: synced
Daniel Stenberg [Fri, 25 Aug 2023 11:56:46 +0000 (13:56 +0200)] 
RELEASE-NOTES: synced

23 months agomisc: spellfixes
John Bampton [Fri, 25 Aug 2023 09:42:38 +0000 (19:42 +1000)] 
misc: spellfixes

Closes #11730

23 months agotests: add support for nested %if conditions
Daniel Stenberg [Thu, 24 Aug 2023 21:51:24 +0000 (23:51 +0200)] 
tests: add support for nested %if conditions

Provides more flexiblity to test cases.

Also warn and bail out if there is an '%else' or %endif' without a
preceeding '%if'.

Ref: #11610
Closes #11728

23 months agotime-cond.d: mention what happens on a missing file
Daniel Stenberg [Thu, 24 Aug 2023 15:36:37 +0000 (17:36 +0200)] 
time-cond.d: mention what happens on a missing file

Closes #11727

23 months agodocs/cmdline-opts: match the current output
Christian Hesse [Thu, 24 Aug 2023 08:02:53 +0000 (10:02 +0200)] 
docs/cmdline-opts: match the current output

The release date has been added in output, reflect that in documentation.

Closes #11723

23 months agolib: minor comment corrections
Daniel Stenberg [Thu, 24 Aug 2023 08:02:23 +0000 (10:02 +0200)] 
lib: minor comment corrections

23 months agodocs: rewrite to present tense
Daniel Stenberg [Tue, 22 Aug 2023 15:40:39 +0000 (17:40 +0200)] 
docs: rewrite to present tense

... instead of using future tense.

+ numerous cleanups and improvements
+ stick to "reuse" not "re-use"
+ fewer contractions

Closes #11713

23 months agourlapi: setting a blank URL ("") is not an ok URL
Daniel Stenberg [Wed, 23 Aug 2023 12:30:17 +0000 (14:30 +0200)] 
urlapi: setting a blank URL ("") is not an ok URL

Test it in 1560
Fixes #11714
Reported-by: ad0p on github
Closes #11715

23 months agospelling: use 'reuse' not 're-use' in code and elsewhere
Daniel Stenberg [Wed, 23 Aug 2023 12:47:45 +0000 (14:47 +0200)] 
spelling: use 'reuse' not 're-use' in code and elsewhere

Unify the spelling as both versions were previously used intermittently

Closes #11717

23 months agosystem.h: add CURL_OFF_T definitions on HP-UX with HP aCC
Michael Osipov [Wed, 23 Aug 2023 12:55:31 +0000 (14:55 +0200)] 
system.h: add CURL_OFF_T definitions on HP-UX with HP aCC

HP-UX on IA64 provides two modes: 32 and 64 bit while 32 bit being the
default one. Use "long long" in 32 bit mode and just "long" in 64 bit
mode.

Closes #11718

23 months agotests: don't call HTTP errors OK in test cases
Dan Fandrich [Wed, 16 Aug 2023 16:03:53 +0000 (09:03 -0700)] 
tests: don't call HTTP errors OK in test cases

Some HTTP errors codes were accompanied by the text OK, which causes
some cognitive dissonance when reading them.

23 months agohttp: close the connection after a late 417 is received
Dan Fandrich [Tue, 15 Aug 2023 20:43:07 +0000 (13:43 -0700)] 
http: close the connection after a late 417 is received

In this situation, only part of the data has been sent before aborting
so the connection is no longer usable.

Assisted-by: Jay Satiro
Fixes #11678
Closes #11679

23 months agoruntests: slightly increase the longest log file displayed
Dan Fandrich [Thu, 17 Aug 2023 01:20:11 +0000 (18:20 -0700)] 
runtests: slightly increase the longest log file displayed

The new limit provides enough space for a 64 KiB data block to be logged
in a trace file, plus a few lines at the start and end for context. This
happens to be the amount of data sent at a time in a PUT request.

23 months agotests: add delay command to the HTTP server
Dan Fandrich [Mon, 21 Aug 2023 21:10:25 +0000 (14:10 -0700)] 
tests: add delay command to the HTTP server

This adds a delay after client connect.

23 months agocirrus: install everthing with pkg, avoid pip
Daniel Stenberg [Tue, 22 Aug 2023 15:47:56 +0000 (17:47 +0200)] 
cirrus: install everthing with pkg, avoid pip

Assisted-by: Sevan Janiyan
Closes #11711

23 months agocurl_url*.3: update function descriptions
Daniel Stenberg [Tue, 22 Aug 2023 09:26:05 +0000 (11:26 +0200)] 
curl_url*.3: update function descriptions

- expand and clarify several descriptions
- avoid using future tense all over

Closes #11708

23 months agoRELEASE-NOTES: synced
Daniel Stenberg [Tue, 22 Aug 2023 06:26:12 +0000 (08:26 +0200)] 
RELEASE-NOTES: synced

23 months agoCI/cirrus: disable python install on FreeBSD
Stefan Eissing [Mon, 21 Aug 2023 12:05:38 +0000 (14:05 +0200)] 
CI/cirrus: disable python install on FreeBSD

- python cryptography package does not build build FreeBSD
- install just mentions "error"
- this gets the build and the main test suite going again

Closes #11705

23 months agotest2600: fix flakiness on low cpu
Stefan Eissing [Fri, 18 Aug 2023 09:08:52 +0000 (11:08 +0200)] 
test2600: fix flakiness on low cpu

- refs #11355 where failures to to low cpu resources in CI
  are reported
- vastly extend CURLOPT_CONNECTTIMEOUT_MS and max durations
  to test cases
- trigger Curl_expire() in test filter to allow re-checks before
  the usual 1second interval

Closes #11690

23 months agotool_urlglob: use the correct format specifier for curl_off_t in msnprintf
Maksim Sciepanienka [Sat, 19 Aug 2023 23:59:31 +0000 (01:59 +0200)] 
tool_urlglob: use the correct format specifier for curl_off_t in msnprintf

Closes #11698

23 months agotest687/688: two more basic --xattr tests
Daniel Stenberg [Sat, 19 Aug 2023 21:33:25 +0000 (23:33 +0200)] 
test687/688: two more basic --xattr tests

Closes #11697

23 months agocmdline-opts/docs: mentioned the negative option part
Daniel Stenberg [Sat, 19 Aug 2023 18:06:14 +0000 (20:06 +0200)] 
cmdline-opts/docs: mentioned the negative option part

... for --no-alpn and --no-buffer in the same style done for other --no-
options:

"Note that this is the negated option name documented."

Closes #11695

23 months agotool/var: also error when expansion result starts with NUL
Emanuele Torre [Sat, 19 Aug 2023 16:51:16 +0000 (18:51 +0200)] 
tool/var: also error when expansion result starts with NUL

Expansions whose output starts with NUL were being expanded to the empty
string, and not being recognised as values that contain a NUL byte, and
should error.

Closes #11694

23 months agotests: add 'large-time' as a testable feature
Daniel Stenberg [Sat, 19 Aug 2023 19:20:03 +0000 (21:20 +0200)] 
tests: add 'large-time' as a testable feature

This allows test cases to require this feature to run and to be used in
%if conditions.

Large here means larger than 32 bits. Ie does not suffer from y2038.

Closes #11696

23 months agotests/Makefile: add check-translatable-options.pl to tarball
Daniel Stenberg [Fri, 18 Aug 2023 06:48:34 +0000 (08:48 +0200)] 
tests/Makefile: add check-translatable-options.pl to tarball

Used in test 1544

Follow-up to ae806395abc8c

23 months agogen.pl: fix a long version generation mistake
Daniel Stenberg [Thu, 17 Aug 2023 21:21:02 +0000 (23:21 +0200)] 
gen.pl: fix a long version generation mistake

Too excessive escaping made the parsing not find the correct long names
later and instead add "wrong" links.

Follow-up to 439ff2052e219

Reported-by: Lukas Tribus
Fixes #11688
Closes #11689

23 months agolib: move mimepost data from ->req.p.http to ->state
Daniel Stenberg [Wed, 16 Aug 2023 08:43:02 +0000 (10:43 +0200)] 
lib: move mimepost data from ->req.p.http to ->state

When the legacy CURLOPT_HTTPPOST option is used, it gets converted into
the modem mimpost struct at first use. This data is (now) kept for the
entire transfer and not only per single HTTP request. This re-enables
rewind in the beginning of the second request instead of in end of the
first, as brought by 1b39731.

The request struct is per-request data only.

Extend test 650 to verify.

Fixes #11680
Reported-by: yushicheng7788 on github
Closes #11682

23 months agoos400: do not check translatable options at build time
Patrick Monnerat [Thu, 10 Aug 2023 23:03:37 +0000 (01:03 +0200)] 
os400: do not check translatable options at build time

Now that there is a test for this, the build time check is not needed
anymore.

Closes #11650

23 months agotest1554: check translatable string options in OS400 wrapper
Patrick Monnerat [Thu, 10 Aug 2023 22:30:17 +0000 (00:30 +0200)] 
test1554: check translatable string options in OS400 wrapper

This test runs a perl script that checks all string options are properly
translated by the OS400 character code conversion wrapper. It also
verifies these options are listed in alphanumeric order in the wrapper
switch statement.

Closes #11650

23 months agounit3200: skip testing if function is not present
Daniel Stenberg [Thu, 17 Aug 2023 12:43:37 +0000 (14:43 +0200)] 
unit3200: skip testing if function is not present

Fake a successful run since we have no easy mechanism to skip this test
for this advanced condition.

23 months agounit2600: fix build warning if built without verbose messages
Daniel Stenberg [Thu, 17 Aug 2023 12:43:14 +0000 (14:43 +0200)] 
unit2600: fix build warning if built without verbose messages

23 months agotest1608: make it build and get skipped without shuffle DNS support
Daniel Stenberg [Thu, 17 Aug 2023 12:42:51 +0000 (14:42 +0200)] 
test1608: make it build and get skipped without shuffle DNS support

23 months agolib: --disable-bindlocal builds curl without local binding support
Daniel Stenberg [Thu, 17 Aug 2023 12:36:30 +0000 (14:36 +0200)] 
lib: --disable-bindlocal builds curl without local binding support

23 months agotest1304: build and skip without netrc support
Daniel Stenberg [Thu, 17 Aug 2023 12:36:05 +0000 (14:36 +0200)] 
test1304: build and skip without netrc support

23 months agolib: build fixups when built with most things disabled
Daniel Stenberg [Thu, 17 Aug 2023 12:18:06 +0000 (14:18 +0200)] 
lib: build fixups when built with most things disabled

Closes #11687

23 months agoworkflows/macos.yml: disable zstd and alt-svc in the http-only build
Daniel Stenberg [Wed, 16 Aug 2023 11:44:13 +0000 (13:44 +0200)] 
workflows/macos.yml: disable zstd and alt-svc in the http-only build

Closes #11683

23 months agobearssl: handshake fix, provide proper get_select_socks() implementation
Stefan Eissing [Thu, 17 Aug 2023 09:16:11 +0000 (11:16 +0200)] 
bearssl: handshake fix, provide proper get_select_socks() implementation

- bring bearssl handshake times down from +200ms down to other TLS backends
- vtls: improve generic get_select_socks() implementation
- tests: provide Apache with a suitable ssl session cache

Closes #11675

23 months agotests: TLS session sharing test
Stefan Eissing [Tue, 15 Aug 2023 11:24:56 +0000 (13:24 +0200)] 
tests: TLS session sharing test

- test TLS session sharing with special test client
- expect failure with wolfSSL
- disable flaky wolfSSL test_02_07b

Closes #11675

23 months agoCURLOPT_*TIMEOUT*: extend and clarify
Daniel Stenberg [Thu, 17 Aug 2023 09:25:22 +0000 (11:25 +0200)] 
CURLOPT_*TIMEOUT*: extend and clarify

Closes #11686

23 months agourlapi: return CURLUE_BAD_HOSTNAME if puny2idn encoding fails
Daniel Stenberg [Tue, 15 Aug 2023 07:16:54 +0000 (09:16 +0200)] 
urlapi: return CURLUE_BAD_HOSTNAME if puny2idn encoding fails

And document it. Only return out of memory when it actually is a memory
problem.

Pointed-out-by: Jacob Mealey
Closes #11674

23 months agocmake: add GnuTLS option
Mathew Benson [Wed, 16 Aug 2023 23:09:33 +0000 (02:09 +0300)] 
cmake: add GnuTLS option

- Option to use GNUTLS was missing. Hence was not able to use GNUTLS
  with ngtcp2 for http3.

Closes #11685

23 months agoRELEASE-NOTES: synced
Daniel Stenberg [Wed, 16 Aug 2023 09:11:24 +0000 (11:11 +0200)] 
RELEASE-NOTES: synced

23 months agohttp: remove the p_pragma struct field
Daniel Stenberg [Wed, 16 Aug 2023 08:30:39 +0000 (10:30 +0200)] 
http: remove the p_pragma struct field

unused since 40e8b4e52 (2008)

Closes #11681

23 months agoCURLINFO_CERTINFO.3: better explain curl_certinfo struct
Jay Satiro [Sat, 12 Aug 2023 07:29:25 +0000 (03:29 -0400)] 
CURLINFO_CERTINFO.3: better explain curl_certinfo struct

Closes https://github.com/curl/curl/pull/11666

23 months agoCURLINFO_TLS_SSL_PTR.3: clarify a recommendation
Jay Satiro [Sat, 12 Aug 2023 07:38:55 +0000 (03:38 -0400)] 
CURLINFO_TLS_SSL_PTR.3: clarify a recommendation

- Remove the out-of-date SSL backend list supported by
  CURLOPT_SSL_CTX_FUNCTION.

It makes more sense to just refer to that document instead of having
a separate list that has to be kept in sync.

Closes https://github.com/curl/curl/pull/11665

23 months agowrite-out.d: clarify %{time_starttransfer}
Jay Satiro [Mon, 14 Aug 2023 07:29:36 +0000 (03:29 -0400)] 
write-out.d: clarify %{time_starttransfer}

sync it up with CURLINFO_STARTTRANSFER_TIME_T

23 months agotransfer: don't set TIMER_STARTTRANSFER on first send
Daniel Stenberg [Mon, 14 Aug 2023 06:38:50 +0000 (08:38 +0200)] 
transfer: don't set TIMER_STARTTRANSFER on first send

The time stamp is for measuring the first *received* byte

Fixes #11669
Reported-by: JazJas on github
Closes #11670

23 months agoquiche: enable quiche to handle timeout events
trrui-huawei [Fri, 11 Aug 2023 06:14:11 +0000 (14:14 +0800)] 
quiche: enable quiche to handle timeout events

In parallel with ngtcp2, quiche also offers the `quiche_conn_on_timeout`
interface for the application to invoke upon timer
expiration. Therefore, invoking the `on_timeout` function of the
Connection is crucial to ensure seamless functionality of quiche with
timeout events.

Closes #11654

23 months agoquiche: adjust quiche `QUIC_IDLE_TIMEOUT` to 60s
trrui-huawei [Fri, 11 Aug 2023 03:30:13 +0000 (11:30 +0800)] 
quiche: adjust quiche `QUIC_IDLE_TIMEOUT` to 60s

Set the `QUIC_IDLE_TIMEOUT` parameter to match ngtcp2 for consistency.

23 months agoKNOWN_BUGS: LDAPS requests to ActiveDirectory server hang
Daniel Stenberg [Tue, 15 Aug 2023 12:21:15 +0000 (14:21 +0200)] 
KNOWN_BUGS: LDAPS requests to ActiveDirectory server hang

Closes #9580

23 months agoimap: add a check for failing strdup()
Daniel Stenberg [Mon, 14 Aug 2023 11:43:33 +0000 (13:43 +0200)] 
imap: add a check for failing strdup()

23 months agoimap: remove the only sscanf() call in the IMAP code
Daniel Stenberg [Mon, 14 Aug 2023 11:38:09 +0000 (13:38 +0200)] 
imap: remove the only sscanf() call in the IMAP code

Avoids the use of a stack buffer.

Closes #11673

23 months agoimap: use a dynbuf in imap_atom
Daniel Stenberg [Mon, 14 Aug 2023 09:41:03 +0000 (11:41 +0200)] 
imap: use a dynbuf in imap_atom

Avoid a calculation + malloc. Build the output in a dynbuf.

Closes #11672

23 months agohttp: do not require a user name when using CURLAUTH_NEGOTIATE
Marin Hannache [Mon, 14 Aug 2023 08:21:46 +0000 (10:21 +0200)] 
http: do not require a user name when using CURLAUTH_NEGOTIATE

In order to get Negotiate (SPNEGO) authentication to work in HTTP you
used to be required to provide a (fake) user name (this concerned both
curl and the lib) because the code wrongly only considered
authentication if there was a user name provided, as in:

  curl -u : --negotiate https://example.com/

This commit leverages the `struct auth` want member to figure out if the
user enabled CURLAUTH_NEGOTIATE, effectively removing the requirement of
setting a user name both in curl and the lib.

Signed-off-by: Marin Hannache <git@mareo.fr>
Reported-by: Enrico Scholz
Fixes https://sourceforge.net/p/curl/bugs/440/
Fixes #1161
Closes #9047

23 months agobuild: streamline non-UWP wincrypt detections
Viktor Szakats [Fri, 11 Aug 2023 00:37:26 +0000 (00:37 +0000)] 
build: streamline non-UWP wincrypt detections

- with CMake, use the variable `WINDOWS_STORE` to detect an UWP build
  and disable our non-UWP-compatible use the Windows crypto API. This
  allows to drop two dynamic feature checks.

  `WINDOWS_STORE` is true when invoking CMake with
  `CMAKE_SYSTEM_NAME` == `WindowsStore`. Introduced in CMake v3.1.

  Ref: https://cmake.org/cmake/help/latest/variable/WINDOWS_STORE.html

- with autotools, drop the separate feature check for `wincrypt.h`. On
  one hand this header has been present for long (even Borland C 5.5 had
  it from year 2000), on the other we used the check result solely to
  enable another check for certain crypto functions. This fails anyway
  with the header not present. We save one dynamic feature check at the
  configure stage.

Reviewed-by: Marcel Raad
Closes #11657

23 months agodocs/HYPER.md: update hyper build instructions
Nicholas Nethercote [Fri, 11 Aug 2023 20:18:19 +0000 (06:18 +1000)] 
docs/HYPER.md: update hyper build instructions

Nightly Rust and `-Z unstable-options` are not needed.

The instructions here now match the hyper docs exactly:
https://github.com/hyperium/hyper/commit/bd7928f3dd6a8461f0f0fdf7ee0fd95c2f156f88

Closes #11662

23 months agoRELEASE-NOTES: synced
Daniel Stenberg [Sun, 13 Aug 2023 13:43:32 +0000 (15:43 +0200)] 
RELEASE-NOTES: synced

23 months agourlapi: CURLU_PUNY2IDN - convert from punycode to IDN name
Daniel Stenberg [Fri, 11 Aug 2023 07:41:28 +0000 (09:41 +0200)] 
urlapi: CURLU_PUNY2IDN - convert from punycode to IDN name

Asssisted-by: Jay Satiro
Closes #11655

23 months agospellcheck: adapt to backslashed minuses
Daniel Stenberg [Fri, 11 Aug 2023 21:51:15 +0000 (23:51 +0200)] 
spellcheck: adapt to backslashed minuses

As the curl.1 has more backslashed minus, the cleanup sed lines xneed to
adapt.

Adjusted some docs slighly.

Follow-up to 439ff2052e

Closes #11663

23 months agogen: escape more minus
Daniel Stenberg [Fri, 11 Aug 2023 15:01:34 +0000 (17:01 +0200)] 
gen: escape more minus

Detected since it was still hard to search for option names using dashes
in the middle in the man page.

Closes #11660

23 months agocookie-jar.d: enphasize that this option is ONLY writing cookies
Daniel Stenberg [Fri, 11 Aug 2023 15:04:37 +0000 (17:04 +0200)] 
cookie-jar.d: enphasize that this option is ONLY writing cookies

Reported-by: Dan Jacobson
Tweaked-by: Jay Satiro
Ref: #11642
Closes #11661

23 months agodocs/HYPER.md: document a workaround for a link error
Nicholas Nethercote [Fri, 11 Aug 2023 06:47:21 +0000 (16:47 +1000)] 
docs/HYPER.md: document a workaround for a link error

Closes #11653

23 months agoschannel: verify hostname independent of verify cert
Jay Satiro [Thu, 8 Dec 2022 06:26:13 +0000 (01:26 -0500)] 
schannel: verify hostname independent of verify cert

Prior to this change when CURLOPT_SSL_VERIFYPEER (verifypeer) was off
and CURLOPT_SSL_VERIFYHOST (verifyhost) was on we did not verify the
hostname in schannel code.

This fixes KNOWN_BUG 2.8 "Schannel disable CURLOPT_SSL_VERIFYPEER and
verify hostname". We discussed a fix several years ago in #3285 but it
went stale.

Assisted-by: Daniel Stenberg
Bug: https://curl.haxx.se/mail/lib-2018-10/0113.html
Reported-by: Martin Galvan
Ref: https://github.com/curl/curl/pull/3285

Fixes https://github.com/curl/curl/issues/3284
Closes https://github.com/curl/curl/pull/10056

23 months agocurl_quiche: remove superfluous NULL check
Daniel Stenberg [Fri, 11 Aug 2023 09:12:45 +0000 (11:12 +0200)] 
curl_quiche: remove superfluous NULL check

'stream' is always non-NULL at this point

Pointed out by Coverity

Closes #11656

23 months agocurl/urlapi.h: tiny typo
Daniel Stenberg [Fri, 11 Aug 2023 07:17:11 +0000 (09:17 +0200)] 
curl/urlapi.h: tiny typo

23 months agogithub/labeler: make HYPER.md set Hyper and not TLS
Daniel Stenberg [Fri, 11 Aug 2023 06:59:26 +0000 (08:59 +0200)] 
github/labeler: make HYPER.md set Hyper and not TLS

23 months agodocs/cmdline-opts/gen.pl: hide "added in" before 7.50.0
Daniel Stenberg [Thu, 10 Aug 2023 11:38:49 +0000 (13:38 +0200)] 
docs/cmdline-opts/gen.pl: hide "added in" before 7.50.0

7.50.0 shipped on Jul 21 2016, over seven years ago. We no longer need
to specify version changes for earlier releases in the generated output.

This ups the limit from the previous 7.30.0 (Apr 12 2013)

This hides roughly 35 "added in" mentions.

Closes #11651

23 months agobug_report: require reporters to specify curl and os versions
Jay Satiro [Wed, 9 Aug 2023 06:48:11 +0000 (02:48 -0400)] 
bug_report: require reporters to specify curl and os versions

- Change curl version and os sections from single-line input to
  multi-line textarea.

- Require curl version and os sections to be filled out before report
  can be submitted.

Closes https://github.com/curl/curl/pull/11636

23 months agogen.pl: replace all single quotes with aq
Daniel Stenberg [Wed, 9 Aug 2023 15:58:34 +0000 (17:58 +0200)] 
gen.pl: replace all single quotes with aq

- this prevents man from using a unicode sequence for them
- which then allows search to work properly

Closes #11645

23 months agocmake: fix to use variable for the curl namespace
Viktor Szakats [Tue, 8 Aug 2023 13:03:58 +0000 (13:03 +0000)] 
cmake: fix to use variable for the curl namespace

Replace (wrong) literal with a variable to specify the curl
namespace.

Follow-up to 1199308dbc902c52be67fc805c72dd2582520d30 #11505

Reported-by: balikalina on Github
Fixes https://github.com/curl/curl/commit/1199308dbc902c52be67fc805c72dd2582520d30#r123923098
Closes #11629