]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
2 years 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

2 years 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

2 years 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

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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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.

2 years 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

2 years 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.

2 years 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.

2 years 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

2 years 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

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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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.

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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.

2 years 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

2 years 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()

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years agocmake: allow `SHARE_LIB_OBJECT=ON` on all platforms
Viktor Szakats [Tue, 8 Aug 2023 11:45:26 +0000 (11:45 +0000)] 
cmake: allow `SHARE_LIB_OBJECT=ON` on all platforms

2ebc74c36a19a1700af394c16855ce144d9878e3 #11546 introduced sharing
libcurl objects for shared and static targets.

The above automatically enabled for Windows builds, with an option to
disable with `SHARE_LIB_OBJECT=OFF`.

This patch extend this feature to all platforms as a manual option.
You can enable it by setting `SHARE_LIB_OBJECT=ON`. Then shared objects
are built in PIC mode, meaning the static lib will also have PIC code.

[EXPERIMENTAL]

Closes #11627

2 years agocmake: assume `wldap32` availability on Windows
Viktor Szakats [Tue, 8 Aug 2023 09:41:20 +0000 (09:41 +0000)] 
cmake: assume `wldap32` availability on Windows

This system library first shipped with Windows ME, available as an extra
install for some older releases (according to [1]). The import library
was present already in old MinGW 3.4.2 (year 2007).

Drop the feature check and its associated `HAVE_WLDAP32` variable.

To manually disable `wldap32`, you can use the `USE_WIN32_LDAP=OFF`
CMake option, like before.

[1]: https://dlcdn.apache.org/httpd/binaries/win32/LEGACY.html

Reviewed-by: Jay Satiro
Closes #11624

2 years agopage-header: move up a URL paragraph from GLOBBING to URL
Daniel Stenberg [Wed, 9 Aug 2023 08:49:36 +0000 (10:49 +0200)] 
page-header: move up a URL paragraph from GLOBBING to URL

2 years agovariable.d: output the function names table style
Daniel Stenberg [Wed, 9 Aug 2023 08:37:18 +0000 (10:37 +0200)] 
variable.d: output the function names table style

Also correct the url function name in the header

Closes #11641

2 years agohaproxy-clientip.d: remove backticks
Daniel Stenberg [Wed, 9 Aug 2023 08:17:53 +0000 (10:17 +0200)] 
haproxy-clientip.d: remove backticks

This is not markdown

Follow-up to 0a75964d0d94a4

Closes #11639

2 years agoRELEASE-NOTES: synced
Daniel Stenberg [Wed, 9 Aug 2023 07:58:43 +0000 (09:58 +0200)] 
RELEASE-NOTES: synced

2 years agogen.pl: escape all dashes (ascii minus) to avoid unicode hyphens
Daniel Stenberg [Wed, 9 Aug 2023 07:00:23 +0000 (09:00 +0200)] 
gen.pl: escape all dashes (ascii minus) to avoid unicode hyphens

Reported-by: FC Stegerman
Fixes #11635
Closes #11637

2 years agocmdline-opts/page-header: reorder, clean up
Daniel Stenberg [Wed, 9 Aug 2023 07:26:18 +0000 (09:26 +0200)] 
cmdline-opts/page-header: reorder, clean up

- removed some unnecessary blurb to focus
- moved up the more important URL details
- put "globbing" into its own subtitle and moved down a little
- mention the online man page in the version section

Closes #11638

2 years agoc-hyper: adjust the hyper to curlcode conversion
Daniel Stenberg [Tue, 8 Aug 2023 11:19:37 +0000 (13:19 +0200)] 
c-hyper: adjust the hyper to curlcode conversion

Closes #11621

2 years agotest2306: make it use a persistent connection
Daniel Stenberg [Tue, 8 Aug 2023 09:30:17 +0000 (11:30 +0200)] 
test2306: make it use a persistent connection

+ enable verbose already from the start

Closes #11621

2 years agolist-only.d: mention SFTP as supported protocol
eppesuig [Tue, 8 Aug 2023 12:55:43 +0000 (14:55 +0200)] 
list-only.d: mention SFTP as supported protocol

Closes #11628

2 years agorequest.d: use .TP for protocol "labels"
Daniel Stenberg [Tue, 8 Aug 2023 13:44:14 +0000 (15:44 +0200)] 
request.d: use .TP for protocol "labels"

To render the section nicer in man page.

Closes #11630

2 years agocf-haproxy: make CURLOPT_HAPROXY_CLIENT_IP set the *source* IP
Daniel Stenberg [Tue, 8 Aug 2023 11:49:21 +0000 (13:49 +0200)] 
cf-haproxy: make CURLOPT_HAPROXY_CLIENT_IP set the *source* IP

... as documented.

Update test 3201 and 3202 accordingly.

Reported-by: Markus Sommer
Fixes #11619
Closes #11626

2 years agopage-footer: QLOGDIR works with ngtcp2 and quiche
Daniel Stenberg [Tue, 8 Aug 2023 14:12:57 +0000 (16:12 +0200)] 
page-footer: QLOGDIR works with ngtcp2 and quiche

It previously said "both" backends which is confusing as we currently
have three...

Closes #11631

2 years agohttp3: quiche, handshake optimization, trace cleanup
Stefan Eissing [Mon, 7 Aug 2023 11:50:14 +0000 (13:50 +0200)] 
http3: quiche, handshake optimization, trace cleanup

- load x509 store after clienthello
- cleanup of tracing

Closes #11618

2 years agongtcp2: remove dead code
Daniel Stenberg [Tue, 8 Aug 2023 09:36:21 +0000 (11:36 +0200)] 
ngtcp2: remove dead code

'result' is always zero (CURLE_OK) at this point

Detected by Coverity

Closes #11622

2 years agoopenssl: auto-detect `SSL_R_TLSV13_ALERT_CERTIFICATE_REQUIRED`
Viktor Szakats [Mon, 7 Aug 2023 23:06:50 +0000 (23:06 +0000)] 
openssl: auto-detect `SSL_R_TLSV13_ALERT_CERTIFICATE_REQUIRED`

OpenSSL 1.1.1 defines this macro, but no ealier version, or any of the
popular forks (yet). Use the macro itself to detect its presence,
replacing the hard-wired fork-specific conditions.

This way the feature will enable automatically when forks implement it,
while also shorter and possibly requiring less future maintenance.

Follow-up to 94241a9e78397a2aaf89a213e6ada61e7de7ee02 #6721

Reviewed-by: Jay Satiro
Closes #11617

2 years agoopenssl: use `SSL_CTX_set_ciphersuites` with LibreSSL 3.4.1
Viktor Szakats [Mon, 7 Aug 2023 23:02:46 +0000 (23:02 +0000)] 
openssl: use `SSL_CTX_set_ciphersuites` with LibreSSL 3.4.1

LibreSSL 3.4.1 (2021-10-14) added support for
`SSL_CTX_set_ciphersuites`.

Ref: https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.4.1-relnotes.txt

Reviewed-by: Jay Satiro
Closes #11616

2 years agoopenssl: use `SSL_CTX_set_keylog_callback` with LibreSSL 3.5.0
Viktor Szakats [Mon, 7 Aug 2023 22:34:26 +0000 (22:34 +0000)] 
openssl: use `SSL_CTX_set_keylog_callback` with LibreSSL 3.5.0

LibreSSL 3.5.0 (2022-02-24) added support for
`SSL_CTX_set_keylog_callback`.

Ref: https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.5.0-relnotes.txt

Reviewed-by: Jay Satiro
Closes #11615

2 years agocmake: drop `HAVE_LIBWINMM` and `HAVE_LIBWS2_32` feature checks
Viktor Szakats [Mon, 7 Aug 2023 19:50:11 +0000 (19:50 +0000)] 
cmake: drop `HAVE_LIBWINMM` and `HAVE_LIBWS2_32` feature checks

- `HAVE_LIBWINMM` was detected but unused. The `winmm` system library is
  also not used by curl, but it is by its optional dependency `librtmp`.
  Change the logic to always add `winmm` when `USE_LIBRTMP` is set. This
  library has been available since the early days of Windows.

- `HAVE_LIBWS2_32` detected `ws2_32` lib on Windows. This lib is present
  since Windows 95 OSR2 (AFAIR). Winsock1 already wasn't supported and
  other existing logic already assumed this lib being present, so delete
  the check and replace the detection variable with `WIN32` and always
  add `ws2_32` on Windows.

Closes #11612

2 years agocrypto: ensure crypto initialization works
Daniel Gustafsson [Fri, 10 Mar 2023 09:01:44 +0000 (10:01 +0100)] 
crypto: ensure crypto initialization works

Make sure that context initialization during hash setup works to avoid
going forward with the risk of a null pointer dereference.

Reported-by: Philippe Antoine on HackerOne
Assisted-by: Jay Satiro
Assisted-by: Daniel Stenberg
Closes #11614

2 years agoopenssl: switch to modern init for LibreSSL 2.7.0+
Viktor Szakats [Mon, 7 Aug 2023 16:32:46 +0000 (16:32 +0000)] 
openssl: switch to modern init for LibreSSL 2.7.0+

LibreSSL 2.7.0 (2018-03-21) introduced automatic initialization,
`OPENSSL_init_ssl()` function and deprecated the old, manual init
method, as seen in OpenSSL 1.1.0. Switch to the modern method when
available.

Ref: https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-2.7.0-relnotes.txt

Reviewed-by: Daniel Stenberg
Closes #11611

2 years agogskit: remove
Daniel Stenberg [Mon, 7 Aug 2023 11:02:32 +0000 (13:02 +0200)] 
gskit: remove

We remove support for building curl with gskit.

 - This is a niche TLS library, only running on some IBM systems
 - no regular curl contributors use this backend
 - no CI builds use or verify this backend
 - gskit, or the curl adaption for it, lacks many modern TLS features
   making it an inferior solution
 - build breakages in this code take weeks or more to get detected
 - fixing gskit code is mostly done "flying blind"

This removal has been advertized in DEPRECATED in Jan 2, 2023 and it has
been mentioned on the curl-library mailing list.

It could be brought back, this is not a ban. Given proper effort and
will, gskit support is welcome back into the curl TLS backend family.

Closes #11460

2 years agoRELEASE-NOTES: synced
Daniel Stenberg [Mon, 7 Aug 2023 18:39:32 +0000 (20:39 +0200)] 
RELEASE-NOTES: synced

2 years agoTHANKS-filter: add a name typo
Dan Fandrich [Mon, 7 Aug 2023 16:12:42 +0000 (09:12 -0700)] 
THANKS-filter: add a name typo

2 years agohttp3/ngtcp2: shorten handshake, trace cleanup
Stefan Eissing [Mon, 7 Aug 2023 09:42:23 +0000 (11:42 +0200)] 
http3/ngtcp2: shorten handshake, trace cleanup

- shorten handshake timing by delayed x509 store load (OpenSSL)
  as we do for HTTP/2
- cleanup of trace output, align with HTTP/2 output

Closes #11609

2 years agoheaders: accept leading whitespaces on first response header
Daniel Stenberg [Mon, 7 Aug 2023 10:45:45 +0000 (12:45 +0200)] 
headers: accept leading whitespaces on first response header

This is a bad header fold but since the popular browsers accept this
violation, so does curl now. Unless built with hyper.

Add test 1473 to verify and adjust test 2306.

Reported-by: junsik on github
Fixes #11605
Closes #11607

2 years agoinclude/curl/mprintf.h: add __attribute__ for the prototypes
Daniel Stenberg [Sun, 6 Aug 2023 20:28:01 +0000 (22:28 +0200)] 
include/curl/mprintf.h: add __attribute__ for the prototypes

- if gcc or clang is used
- if __STDC_VERSION__ >= 199901L, which means greater than C90
- if not using mingw
- if CURL_NO_FMT_CHECKS is not defined

Closes #11589

2 years agotests: fix bad printf format flags in test code
Daniel Stenberg [Sun, 6 Aug 2023 20:29:40 +0000 (22:29 +0200)] 
tests: fix bad printf format flags in test code

2 years agotests: fix header scan tools for attribute edits in mprintf.h
Daniel Stenberg [Sun, 6 Aug 2023 20:29:11 +0000 (22:29 +0200)] 
tests: fix header scan tools for attribute edits in mprintf.h

2 years agocf-socket: log successful interface bind
Daniel Stenberg [Mon, 7 Aug 2023 07:58:47 +0000 (09:58 +0200)] 
cf-socket: log successful interface bind

When the setsockopt SO_BINDTODEVICE operation succeeds, output that in
the verbose output.

Ref: #11599
Closes #11608

2 years agoCURLOPT_SSL_VERIFYPEER.3: mention it does not load CA certs when disabled
Daniel Stenberg [Mon, 7 Aug 2023 06:30:19 +0000 (08:30 +0200)] 
CURLOPT_SSL_VERIFYPEER.3: mention it does not load CA certs when disabled

Ref: #11457
Closes #11606