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

23 months 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

23 months 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

23 months 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

23 months 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

23 months 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

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

23 months 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

23 months 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

23 months 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

23 months 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

23 months 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

23 months 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

23 months 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

23 months 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

23 months 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

23 months 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

23 months 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

23 months 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

23 months 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

23 months 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

23 months 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

23 months 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

23 months 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

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

23 months 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

23 months 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

23 months 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

23 months 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

23 months 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

23 months 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

23 months 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

23 months 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

23 months agoCURLOPT_SSL_VERIFYPEER.3: add two more see also options
Daniel Stenberg [Sun, 6 Aug 2023 21:24:32 +0000 (23:24 +0200)] 
CURLOPT_SSL_VERIFYPEER.3: add two more see also options

CURLINFO_CAINFO and CURLINFO_CAPATH

Closes #11603

23 months agoKNOWN_BUGS: aws-sigv4 does not behave well with AWS VPC Lattice
Daniel Stenberg [Sun, 6 Aug 2023 21:38:28 +0000 (23:38 +0200)] 
KNOWN_BUGS: aws-sigv4 does not behave well with AWS VPC Lattice

Closes #11007

23 months agoCI: use openssl 3.0.10+quic, nghttp3 0.14.0, ngtcp2 0.18.0
Graham Campbell [Fri, 4 Aug 2023 09:51:06 +0000 (10:51 +0100)] 
CI: use openssl 3.0.10+quic, nghttp3 0.14.0, ngtcp2 0.18.0

Closes #11585

23 months agoTODO: add *5* entries for aws-sigv4
Daniel Stenberg [Sun, 6 Aug 2023 21:04:57 +0000 (23:04 +0200)] 
TODO: add *5* entries for aws-sigv4

Closes #7559
Closes #8107
Closes #8810
Closes #9717
Closes #10129

23 months agoTODO: LDAP Certificate-Based Authentication
Daniel Stenberg [Sun, 6 Aug 2023 20:58:42 +0000 (22:58 +0200)] 
TODO: LDAP Certificate-Based Authentication

Closes #9641

23 months agohttp2: cleanup trace messages
Stefan Eissing [Fri, 4 Aug 2023 09:35:03 +0000 (11:35 +0200)] 
http2: cleanup trace messages

- more compact format with bracketed stream id
- all frames traced in and out

Closes #11592

23 months agotests/tftpd+mqttd: make variables static to silence picky warnings
Daniel Stenberg [Fri, 4 Aug 2023 12:43:16 +0000 (14:43 +0200)] 
tests/tftpd+mqttd: make variables static to silence picky warnings

Closes #11594

23 months agodocs/cmdline: remove repeated working for negotiate + ntlm
Daniel Stenberg [Fri, 4 Aug 2023 14:34:25 +0000 (16:34 +0200)] 
docs/cmdline: remove repeated working for negotiate + ntlm

The extra wording is added automatically by the gen.pl tool

Closes #11597

23 months agodocs/cmdline: add small "warning" to verbose options
Daniel Stenberg [Fri, 4 Aug 2023 14:07:16 +0000 (16:07 +0200)] 
docs/cmdline: add small "warning" to verbose options

"Note that verbose output of curl activities and network traffic might
contain sensitive data, including user names, credentials or secret data
content. Be aware and be careful when sharing trace logs with others."

Closes #11596

2 years agoRELEASE-NOTES: synced
Daniel Stenberg [Fri, 4 Aug 2023 14:00:08 +0000 (16:00 +0200)] 
RELEASE-NOTES: synced

2 years agopingpong: don't use *bump_headersize
Daniel Stenberg [Fri, 4 Aug 2023 07:32:55 +0000 (09:32 +0200)] 
pingpong: don't use *bump_headersize

We use that for HTTP(S) only.

Follow-up to 3ee79c1674fd6

Closes #11590

2 years agourldata: remove spurious parenthesis to unbreak no-proxy build
Daniel Stenberg [Fri, 4 Aug 2023 07:59:18 +0000 (09:59 +0200)] 
urldata: remove spurious parenthesis to unbreak no-proxy build

Follow-up to e12b39e13382

Closes #11591

2 years agoeasy: don't call Curl_trc_opt() in disabled-verbose builds
Daniel Stenberg [Fri, 4 Aug 2023 07:35:40 +0000 (09:35 +0200)] 
easy: don't call Curl_trc_opt() in disabled-verbose builds

Follow-up to e12b39e133822c6a0

Closes #11588

2 years agohttp: use %u for printfing int
Daniel Stenberg [Fri, 4 Aug 2023 06:45:39 +0000 (08:45 +0200)] 
http: use %u for printfing int

Follow-up to 3ee79c1674fd6f99e8efca5

Closes #11587

2 years agovquic: show stringified messages for errno
Goro FUJI [Thu, 3 Aug 2023 08:37:22 +0000 (08:37 +0000)] 
vquic: show stringified messages for errno

Closes #11584

2 years agotrace: make tracing available in non-debug builds
Stefan Eissing [Thu, 3 Aug 2023 15:32:25 +0000 (17:32 +0200)] 
trace: make tracing available in non-debug builds

Add --trace-config to curl

Add curl_global_trace() to libcurl

Closes #11421