]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
3 years agopop3/smtp: return *WEIRD_SERVER_REPLY when not understood 8506/head
Daniel Stenberg [Tue, 29 Mar 2022 12:01:48 +0000 (14:01 +0200)] 
pop3/smtp: return *WEIRD_SERVER_REPLY when not understood

This leaves the CURLE_RECV_ERROR error code for explicit failure to
receive network data and allows users to better separate the problems.

Ref #8356
Reported-by: Rianov Viacheslav
Closes #8506

3 years agodocs: lots of minor language polish
Daniel Stenberg [Tue, 29 Mar 2022 11:58:11 +0000 (13:58 +0200)] 
docs: lots of minor language polish

Mostly based on recent language decisions from "everything curl":

- remove contractions (isn't => is not)
- *an* HTTP (consistency)
- runtime (no hyphen)
- backend (no hyphen)
- URL is uppercase

Closes #8646

3 years agoprojects: Update VC version names for VS2017, VS2022
Jay Satiro [Sun, 13 Feb 2022 21:58:04 +0000 (16:58 -0500)] 
projects: Update VC version names for VS2017, VS2022

- Rename VC15 -> VC14.10, VC17 -> VC14.30.

The projects directory that holds the pre-generated Visual Studio
project files uses VC<ver> to indicate the MSVC version. At some point
support for Visual Studio 2017 (Visual Studio version 15 which uses MSVC
14.10) was added as VC15. Visual Studio 2022 (Visual Studio version 17
which uses MSVC 14.30) project files were recently added and followed
that same format using VC17.

There is no such MSVC version (yet) as VC15 or VC17.

For VS 2017 for example, the name we use is correct as either VS17,
VS2017, VC14.10. I opted for the latter since we use VC for earlier
versions (eg VC10, VC12, etc).

Ref: https://github.com/curl/curl/pull/8438#issuecomment-1037070192

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

3 years agomqtt: better handling of TCP disconnect mid-message
Daniel Stenberg [Tue, 29 Mar 2022 06:43:13 +0000 (08:43 +0200)] 
mqtt: better handling of TCP disconnect mid-message

Reported-by: Jenny Heino
Bug: https://hackerone.com/reports/1521610
Closes #8644

3 years agoCURLOPT_DISALLOW_USERNAME_IN_URL.3: use uppercase URL
Daniel Stenberg [Mon, 28 Mar 2022 17:40:47 +0000 (19:40 +0200)] 
CURLOPT_DISALLOW_USERNAME_IN_URL.3: use uppercase URL

3 years agodocs/DYNBUF: clarify documentation for Curl_dyn_ptr and Curl_dyn_uptr
Ian Blanes [Mon, 28 Mar 2022 07:39:09 +0000 (09:39 +0200)] 
docs/DYNBUF: clarify documentation for Curl_dyn_ptr and Curl_dyn_uptr

Closes #8606

3 years agocurl: fix segmentation fault for empty output file names.
Ian Blanes [Mon, 28 Mar 2022 07:39:09 +0000 (09:39 +0200)] 
curl: fix segmentation fault for empty output file names.

Function glob_match_url set *result to NULL when called with filename =
"", producing an indirect NULL pointer dereference.

Closes #8606

3 years agoTODO: Read keys from ~/.ssh/id_ecdsa, id_ed25519
Daniel Stenberg [Sun, 27 Mar 2022 14:21:29 +0000 (16:21 +0200)] 
TODO: Read keys from ~/.ssh/id_ecdsa, id_ed25519

It would be nice to expand the list of key locations curl uses for the
newer key types supported by libssh2.

Closes #8586

3 years agongtcp2: update to work after recent ngtcp2 updates
Daniel Stenberg [Sat, 26 Mar 2022 17:32:13 +0000 (18:32 +0100)] 
ngtcp2: update to work after recent ngtcp2 updates

Assisted-by: Tatsuhiro Tsujikawa
Reported-by: jurisuk on github
Fixes #8638
Closes #8639

3 years agoCURLOPT_PROGRESSFUNCTION.3: fix typo in example
Farzin [Fri, 25 Mar 2022 15:26:24 +0000 (19:56 +0430)] 
CURLOPT_PROGRESSFUNCTION.3: fix typo in example

Closes #8636

3 years agocurl/header_json: output the header names in lowercase
Daniel Stenberg [Fri, 25 Mar 2022 10:24:27 +0000 (11:24 +0100)] 
curl/header_json: output the header names in lowercase

To better allow json[“header”].

Reported-by: Peter Korsgaard
Bug: https://daniel.haxx.se/blog/2022/03/24/easier-header-picking-with-curl/comment-page-1/#comment-25878
Closes #8633

3 years agoRELEASE-NOTES: synced
Daniel Stenberg [Thu, 24 Mar 2022 14:51:43 +0000 (15:51 +0100)] 
RELEASE-NOTES: synced

3 years agoheaders.h: make Curl_headers_push() be CURLE_OK when not built
Daniel Stenberg [Wed, 23 Mar 2022 22:54:18 +0000 (23:54 +0100)] 
headers.h: make Curl_headers_push() be CURLE_OK when not built

... to avoid errors when the function isn't there.

Reported-by: Marcel Raad
Fixes #8627
Closes #8628

3 years agoscripts: move three scripts from lib/ to scripts/
Daniel Stenberg [Wed, 23 Mar 2022 14:26:09 +0000 (15:26 +0100)] 
scripts: move three scripts from lib/ to scripts/

Move checksrc.pl, firefox-db2pem.sh and mk-ca-bundle.pl since they don't
particularly belong in lib/

Also created an EXTRA_DIST= in scripts/Makefile.am instead of specifying
those files in the root Makefile.am

Closes #8625

3 years agolib/warnless.[ch]: only check for WIN32 and ignore _WIN32
Marc Hoersken [Mon, 14 Mar 2022 23:17:58 +0000 (00:17 +0100)] 
lib/warnless.[ch]: only check for WIN32 and ignore _WIN32

curl_setup.h automatically defines WIN32 if just _WIN32 is defined.

Therefore make sure curl_setup.h is included through warnless.h.

Reviewed-by: Daniel Stenberg
Reviewed-by: Jay Satiro
Closes #8594

3 years agotests/server/util.h: align WIN32 condition with util.c
Marc Hoersken [Mon, 14 Mar 2022 23:16:46 +0000 (00:16 +0100)] 
tests/server/util.h: align WIN32 condition with util.c

There is no need to test for both _WIN32 and WIN32 as curl_setup.h
automatically defines the later if the first one is defined.

Also tests/server/util.c is only checking for WIN32 arouund the
implementation of win32_perror, so just defining _WIN32
would not be sufficient for a successful compilation.

Reviewed-by: Daniel Stenberg
Reviewed-by: Jay Satiro
Closes #8594

3 years agofirefox-db2pem.sh: make the shell script safer
Philip H [Tue, 22 Mar 2022 22:13:41 +0000 (23:13 +0100)] 
firefox-db2pem.sh: make the shell script safer

Reported by lift

Closes #8616

3 years agogtls: fix build for disabled TLS-SRP
Jay Satiro [Thu, 17 Mar 2022 19:31:10 +0000 (15:31 -0400)] 
gtls: fix build for disabled TLS-SRP

Prior to this change if, at build time, the GnuTLS backend was found to
have TLS-SRP support (HAVE_GNUTLS_SRP) but TLS-SRP was disabled in curl
via --disable-tls-srp (!USE_TLS_SRP) then a build error would occur.

Bug: https://curl.se/mail/lib-2022-03/0046.html
Reported-by: Robert Brose
Closes https://github.com/curl/curl/pull/8604

3 years agowinbuild: Add a Visual Studio example to the README
Jay Satiro [Sun, 13 Mar 2022 22:45:39 +0000 (18:45 -0400)] 
winbuild: Add a Visual Studio example to the README

- Add an example that explains in detail how the user can add libcurl to
  their Visual Studio project.

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

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

3 years agodocs/opts: Mention Schannel client cert type is P12
Jay Satiro [Sat, 12 Mar 2022 23:23:12 +0000 (18:23 -0500)] 
docs/opts: Mention Schannel client cert type is P12

Schannel backend code behaves same as Secure Transport, it expects a P12
certificate file or the name of a certificate already in the user's OS
key store. Also, both backends ignore CURLOPT_SSLKEY (tool: --key)
because they expect the private key to already be available from the
keystore or P12 certificate.

Ref: https://github.com/curl/curl/discussions/8581#discussioncomment-2337260

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

3 years agolib1945: fix compiler warning 4706 on MSVC
Daniel Stenberg [Tue, 22 Mar 2022 14:29:55 +0000 (15:29 +0100)] 
lib1945: fix compiler warning 4706 on MSVC

Follow-up from d1e4a677340c

Closes #8623

3 years agoci/event-based.yml: improve impacket install
Philip H [Tue, 22 Mar 2022 11:25:34 +0000 (12:25 +0100)] 
ci/event-based.yml: improve impacket install

skip python3-pip
install impacket with library module

Closes #8621

3 years agotest1459: disable for oldlibssh
Daniel Stenberg [Tue, 22 Mar 2022 12:37:48 +0000 (13:37 +0100)] 
test1459: disable for oldlibssh

This test with libssh 0.9.3 works fine on github but fails on circleci.
Might as well disable this test for oldlibssh installations.

Closes #8622

3 years agotest1135: sync with recent API updates
Daniel Stenberg [Tue, 22 Mar 2022 10:14:45 +0000 (11:14 +0100)] 
test1135: sync with recent API updates

This test verifies that the order of functions in public headers remain
the same but hasn't been updated to care for recently added header
files. The order is important for some few platforms - or VERSIONINFO
needs to updated.

This fix also updates VERSIONINFO to be sure.

Closes #8620

3 years agocurl_easy_nextheader.3: fix two typos
Daniel Stenberg [Tue, 22 Mar 2022 10:52:37 +0000 (11:52 +0100)] 
curl_easy_nextheader.3: fix two typos

Reported-by: Timothe Litt
Bug: https://curl.se/mail/lib-2022-03/0060.html

3 years agooptions: remove mistaken space before paren in prototype
Daniel Stenberg [Tue, 22 Mar 2022 10:09:22 +0000 (11:09 +0100)] 
options: remove mistaken space before paren in prototype

3 years agocirrus: add --enable-headers-api for some windows builds
Daniel Stenberg [Sat, 19 Mar 2022 21:50:26 +0000 (22:50 +0100)] 
cirrus: add --enable-headers-api for some windows builds

3 years agoGHA: --enable-headers-api in all workflows
Daniel Stenberg [Sat, 19 Mar 2022 21:47:29 +0000 (22:47 +0100)] 
GHA: --enable-headers-api in all workflows

3 years agolib: make the headers API depend on --enable-headers-api
Daniel Stenberg [Sat, 19 Mar 2022 21:40:20 +0000 (22:40 +0100)] 
lib: make the headers API depend on --enable-headers-api

3 years agoconfigure: add --enable-headers-api to enable the headers API
Daniel Stenberg [Sat, 19 Mar 2022 21:34:19 +0000 (22:34 +0100)] 
configure: add --enable-headers-api to enable the headers API

Defaults to disabled while labeled EXPERIMENTAL.

Make all the headers API tests require 'headers-api' to run.

3 years agotest1671: verify -w '%{header_json}
Daniel Stenberg [Thu, 17 Mar 2022 22:11:22 +0000 (23:11 +0100)] 
test1671: verify -w '%{header_json}

3 years agotest1670: verify -w %header{}
Daniel Stenberg [Thu, 17 Mar 2022 22:07:56 +0000 (23:07 +0100)] 
test1670: verify -w %header{}

3 years agocurl: add %{header_json} support in -w handling
Daniel Stenberg [Thu, 17 Mar 2022 16:55:06 +0000 (17:55 +0100)] 
curl: add %{header_json} support in -w handling

Outputs all response headers as a JSON object.

3 years agocurl: add %header{name} support in -w handling
Daniel Stenberg [Thu, 17 Mar 2022 15:32:45 +0000 (16:32 +0100)] 
curl: add %header{name} support in -w handling

Outputs the response header 'name'

3 years agoheader api: add curl_easy_header and curl_easy_nextheader
Daniel Stenberg [Thu, 17 Mar 2022 09:20:19 +0000 (10:20 +0100)] 
header api: add curl_easy_header and curl_easy_nextheader

Add test 1940 to 1946 to verify.

Closes #8593

3 years agotest1459: remove the different exit code for oldlibssh
Daniel Stenberg [Mon, 21 Mar 2022 16:39:49 +0000 (17:39 +0100)] 
test1459: remove the different exit code for oldlibssh

When using libssh/0.9.3/openssl/zlib, we seem to be getting the "right"
error code.

Closes #8490

3 years agolibssh: unstick SFTP transfers when done event-based
Daniel Stenberg [Mon, 21 Mar 2022 16:39:49 +0000 (17:39 +0100)] 
libssh: unstick SFTP transfers when done event-based

Test 604 and 606 (at least).

Closes #8490

3 years agogha: move the event-based test over from Zuul
Daniel Stenberg [Mon, 21 Mar 2022 16:39:49 +0000 (17:39 +0100)] 
gha: move the event-based test over from Zuul

Switched libssh2 to libssh

Closes #8490

3 years agoRELEASE-NOTES: synced
Daniel Stenberg [Mon, 21 Mar 2022 07:43:14 +0000 (08:43 +0100)] 
RELEASE-NOTES: synced

3 years agohttp: return error on colon-less HTTP headers
Daniel Stenberg [Fri, 18 Mar 2022 21:54:59 +0000 (22:54 +0100)] 
http: return error on colon-less HTTP headers

It's a protocol violation and accepting them leads to no good.

Add test case 398 to verify

Closes #8610

3 years agotest718: edited slightly to return better HTTP
Daniel Stenberg [Sun, 20 Mar 2022 15:51:03 +0000 (16:51 +0100)] 
test718: edited slightly to return better HTTP

Since hyper is picky and won't play ball otherwise.

Bug: https://github.com/hyperium/hyper/issues/2783
Reported-by: Daniel Valenzuela
Closes #8614

3 years agohyper: no h2c support
Daniel Stenberg [Sat, 19 Mar 2022 22:12:03 +0000 (23:12 +0100)] 
hyper: no h2c support

Make tests require h2c feature present to run, and only set h2c if
nghttp2 is used in the build. Hyper does not support it.

Remove those tests from DISABLED

Fixes #8605
Closes #8613

3 years agoconfigure: bump the copyright year range int the generated output
Daniel Stenberg [Sat, 19 Mar 2022 21:21:30 +0000 (22:21 +0100)] 
configure: bump the copyright year range int the generated output

3 years agoBINDINGS.md: add Hollywood binding
Andreas Falkenhahn [Fri, 18 Mar 2022 21:56:52 +0000 (22:56 +0100)] 
BINDINGS.md: add Hollywood binding

Closes #8609

3 years agoHISTORY: add some 2022 data
Daniel Stenberg [Fri, 18 Mar 2022 09:04:20 +0000 (10:04 +0100)] 
HISTORY: add some 2022 data

3 years agoscripts/copyright.pl: ignore the new mlc_config.json file
Daniel Stenberg [Fri, 18 Mar 2022 08:15:15 +0000 (09:15 +0100)] 
scripts/copyright.pl: ignore the new mlc_config.json file

3 years agomlc_config.json: add file to ignore known troublesome URLs
Philip H [Tue, 15 Mar 2022 18:39:43 +0000 (19:39 +0100)] 
mlc_config.json: add file to ignore known troublesome URLs

This is the config file for the CI markdown link checker and lets us
filter URLs that are known to cause problems. Like
https://curl.zuul.vexxhost.dev/ for now.

Closes #8597

3 years agowinbuild/README.md: fixup dead link
Philip H [Tue, 15 Mar 2022 15:19:10 +0000 (16:19 +0100)] 
winbuild/README.md: fixup dead link

Closes #8597

3 years agortsp: don't let CSeq error override earlier errors
Jay Satiro [Mon, 28 Feb 2022 19:28:37 +0000 (14:28 -0500)] 
rtsp: don't let CSeq error override earlier errors

- When done, if an error has already occurred then don't check the
  sequence numbers for mismatch.

A sequence number may not have been received if an error occurred.

Prior to this change a sequence mismatch error would override earlier
errors. For example, a server that returns nothing would cause error
CURLE_GOT_NOTHING in Curl_http_done which was then overridden by
CURLE_RTSP_CSEQ_ERROR in rtsp_done.

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

3 years agolib: fix some misuse of curlx_convert_wchar_to_UTF8
Jay Satiro [Mon, 28 Feb 2022 08:12:12 +0000 (03:12 -0500)] 
lib: fix some misuse of curlx_convert_wchar_to_UTF8

curlx_convert_wchar_to_UTF8 must be freed by curlx_unicodefree, but
prior to this change some uses mistakenly called free.

I've reviewed all other uses of curlx_convert_wchar_to_UTF8 and
curlx_convert_UTF8_to_wchar.

Ref: https://github.com/curl/curl/commit/1d5d0ae

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

3 years agomk-ca-bundle.pl: Use stricter logic to process the certificates
Jay Satiro [Wed, 9 Feb 2022 08:19:01 +0000 (03:19 -0500)] 
mk-ca-bundle.pl: Use stricter logic to process the certificates

.. and bump version to 1.29.

This change makes the script properly ignore unknown blocks and
otherwise fail when Mozilla changes the certdata format in ways we
don't expect. Though this is less flexible behavior it makes it far less
likely that an invalid certificate can slip through.

Prior to this change the state machine did not always properly reset,
and it was possible that a certificate marked as invalid could then
later be marked as valid when there was conflicting trust info or
an unknown block was erroneously processed as part of the certificate.

Ref: https://github.com/curl/curl/pull/7801#pullrequestreview-768384569

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

3 years agotest375: fix line endings on Windows
Marcel Raad [Wed, 16 Mar 2022 09:19:45 +0000 (10:19 +0100)] 
test375: fix line endings on Windows

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

3 years agohttp: reject header contents with nul bytes
Daniel Stenberg [Wed, 16 Mar 2022 22:12:28 +0000 (23:12 +0100)] 
http: reject header contents with nul bytes

They are not allowed by the protocol and allowing them risk that curl
misbehaves somewhere where C functions are used but won't work on the
full contents. Further, they are not supported by hyper and they cause
problems for the new coming headers API work.

Updated test 262 to verify and enabled it for hyper as well

Closes #8601

3 years agoCI: Do not use buildconf. Instead, just use: autoreconf -fi
Philip H [Tue, 15 Mar 2022 09:25:25 +0000 (10:25 +0100)] 
CI: Do not use buildconf. Instead, just use: autoreconf -fi

Closes #8596

3 years agoRELEASE-NOTES: synced
Daniel Stenberg [Tue, 15 Mar 2022 09:48:47 +0000 (10:48 +0100)] 
RELEASE-NOTES: synced

3 years agolibssh: Improve fix for missing SSH_S_ stat macros
Jay Satiro [Sat, 12 Mar 2022 23:48:18 +0000 (18:48 -0500)] 
libssh: Improve fix for missing SSH_S_ stat macros

- If building libcurl against an old libssh version missing SSH_S_IFMT
  and SSH_S_IFLNK then use the values from a supported version.

Prior to this change if libssh did not define SSH_S_IFMT and SSH_S_IFLNK
then S_IFMT and S_IFLNK, respectively, were used instead. The problem
with that is the user's S_ stat macros don't have the same values across
platforms. For example Windows has values different from Linux.

Follow-up to 7b0fd39.

Ref: https://github.com/curl/curl/pull/8511#discussion_r815292391
Ref: https://github.com/curl/curl/pull/8574

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

3 years agotool and tests: force flush of all buffers at end of program
Marc Hoersken [Sat, 26 Feb 2022 13:34:42 +0000 (14:34 +0100)] 
tool and tests: force flush of all buffers at end of program

On Windows data can be lost in buffers in case of abnormal program
termination, especially in process chains as seen due to flaky tests.
Therefore flushing all buffers manually should avoid this data loss.

In the curl tool we play the safe game by only flushing write buffers,
but in the testsuite where we manage all buffers, we flush everything.

This should drastically reduce Windows CI and testsuite flakiness.

Reviewed-by: Daniel Stenberg
Supersedes #7833 and #6064
Closes #8516

3 years agoBearSSL: add CURLOPT_SSL_CTX_FUNCTION support
Jan Venekamp [Sat, 19 Feb 2022 14:34:47 +0000 (15:34 +0100)] 
BearSSL: add CURLOPT_SSL_CTX_FUNCTION support

Closes #8478

3 years agoBearSSL: add CURLOPT_SSL_CIPHER_LIST support
Jan Venekamp [Mon, 6 Dec 2021 17:36:03 +0000 (18:36 +0100)] 
BearSSL: add CURLOPT_SSL_CIPHER_LIST support

Closes #8477

3 years agotool_cb_hdr: Turn the Location: into a terminal hyperlink
Dan Fandrich [Fri, 5 Nov 2021 05:02:05 +0000 (22:02 -0700)] 
tool_cb_hdr: Turn the Location: into a terminal hyperlink

This turns even relative URLs into clickable hyperlinks in a supported
terminal when --styled-output is enabled. Many terminals already turn
URLs into clickable links but there is not enough information in a
relative URL to do this automatically otherwise.

3 years agokeepalive-time.d: It takes many probes to detect brokenness
Dan Fandrich [Thu, 10 Mar 2022 06:11:13 +0000 (22:11 -0800)] 
keepalive-time.d: It takes many probes to detect brokenness

3 years agocurl: add --no-clobber
HexTheDragon [Sun, 12 Sep 2021 04:36:21 +0000 (20:36 -0800)] 
curl: add --no-clobber

Does not overwrite output files if they already exist

Closes #7708
Co-authored-by: Daniel Stenberg
3 years agoRELEASE-NOTES: synced
Daniel Stenberg [Fri, 11 Mar 2022 07:00:56 +0000 (08:00 +0100)] 
RELEASE-NOTES: synced

also bump next pending version to become 7.83.0

3 years agoopenssl: check SSL_get_peer_cert_chain return value
Jean-Philippe Menil [Thu, 10 Mar 2022 20:32:18 +0000 (21:32 +0100)] 
openssl: check SSL_get_peer_cert_chain return value

Signed-off-by: Jean-Philippe Menil <jpmenil@gmail.com>
Closes #8579

3 years agomk-ca-bundle.vbs: delete this script in favor of mk-ca-bundle.pl
Jay Satiro [Wed, 9 Feb 2022 08:45:50 +0000 (03:45 -0500)] 
mk-ca-bundle.vbs: delete this script in favor of mk-ca-bundle.pl

mk-ca-bundle.vbs is a Windows-specific script for Mozilla certificate
extraction, similar to mk-ca-bundle.pl which runs on any platform. The
vbs version has not been maintained while the perl version has been
maintained with improvements and security fixes. I don't think it's
worth the work to maintain both versions. Windows users should be able
to use mk-ca-bundle.pl without any problems, as long as they have perl.

Closes #8412

3 years agoCURLSHOPT_UNLOCKFUNC.3: fix the callback prototype
Daniel Stenberg [Thu, 10 Mar 2022 18:42:04 +0000 (19:42 +0100)] 
CURLSHOPT_UNLOCKFUNC.3: fix the callback prototype

Copy and paste error

Reported-by: Francisco Olarte
Fixes #8573
Closes #8577

3 years agoremove-on-error.d: typo
Daniel Stenberg [Thu, 10 Mar 2022 21:56:11 +0000 (22:56 +0100)] 
remove-on-error.d: typo

Reported-by: Colin Leroy
Bug: https://github.com/curl/curl/pull/8503#pullrequestreview-906520081

3 years agocurl: add --remove-on-error
Daniel Stenberg [Thu, 24 Feb 2022 09:30:10 +0000 (10:30 +0100)] 
curl: add --remove-on-error

If a transfer returns an error, using this option makes curl remove the
leftover downloded (partial) local file before exiting.

Added test 376 to verify

Closes #8503

3 years agolibssh: fix build with old libssh versions
Daniel Stenberg [Thu, 10 Mar 2022 16:47:22 +0000 (17:47 +0100)] 
libssh: fix build with old libssh versions

... that don't have the SSH_S_* defines. Spotted on a machine using
libssh 0.7.3

Closes #8574

3 years agohyper: fix status_line() return code
Daniel Stenberg [Thu, 10 Mar 2022 15:55:54 +0000 (16:55 +0100)] 
hyper: fix status_line() return code

Detected while working on #7708 that happened to trigger an error here
with a new test case.

Closes #8572

3 years agoconfigure.ac: move -pthread CFLAGS setting back where it used to be
Alejandro R. Sedeño [Sat, 5 Mar 2022 14:46:38 +0000 (09:46 -0500)] 
configure.ac: move -pthread CFLAGS setting back where it used to be

The fix for #8276 proposed in #8374 set `CFLAGS="$CFLAGS -pthead"`
earlier than it used to be set, applying it in cases where it should not
have been applied.

This moves the AIX XLC check to a new `case $host in` block inside of
the `if test "$USE_THREADS_POSIX" != "1"` block, where `CFLAGS="$CFLAGS
-pthead"` used to happen.

Fixes #8541
Closes #8542

3 years agongtcp2: add client certificate authentication for OpenSSL
Tatsuhiro Tsujikawa [Mon, 28 Feb 2022 12:21:06 +0000 (21:21 +0900)] 
ngtcp2: add client certificate authentication for OpenSSL

Closes #8522

3 years agotool_operate: fix a scan-build warning
Daniel Stenberg [Wed, 9 Mar 2022 10:43:24 +0000 (11:43 +0100)] 
tool_operate: fix a scan-build warning

... and avoid the temp storing of the return code in a diff variable.

Closes #8565

3 years agotest375: verify that --proxy errors out if proxy is disabled in the build
Daniel Stenberg [Wed, 9 Mar 2022 09:39:41 +0000 (10:39 +0100)] 
test375: verify that --proxy errors out if proxy is disabled in the build

Closes #8565

3 years agocurl: error out when options need features not present in libcurl
Daniel Stenberg [Wed, 9 Mar 2022 09:00:21 +0000 (10:00 +0100)] 
curl: error out when options need features not present in libcurl

Trying to use a proxy when libcurl was built with proxy support disabled
should make curl error out properly.

Remove knowledge of disabled features from the tool code and instead
make it properly respond to what libcurl returns. Update all tests to
properly require the necessary features to be present/absent so that the
test suite can still be run even with libcurl builds with disabled
features.

Ref: https://curl.se/mail/archive-2022-03/0013.html
Closes #8565

3 years agongtcp2: disconnect the QUIC connection proper
Daniel Stenberg [Wed, 9 Mar 2022 13:16:47 +0000 (14:16 +0100)] 
ngtcp2: disconnect the QUIC connection proper

Reported-by: mehatzri on github
Reviewed-by: Tatsuhiro Tsujikawa
Fixes #8534
closes #8569

3 years agotest386: Fix an incorrect test markup tag
Dan Fandrich [Wed, 9 Mar 2022 17:49:20 +0000 (09:49 -0800)] 
test386: Fix an incorrect test markup tag

3 years agononblock: restore setsockopt method to curlx_nonblock
Don [Tue, 8 Mar 2022 18:44:34 +0000 (10:44 -0800)] 
nonblock: restore setsockopt method to curlx_nonblock

The implementation using setsockopt was removed when BeOS support was
purged. However this functionality wasn't BeOS specific, it is still
used by for example Orbis OS (Playstation 4/5 OS).

Closes #8562

3 years agoopenssl: fix CN check error code
Daniel Stenberg [Tue, 8 Mar 2022 12:38:13 +0000 (13:38 +0100)] 
openssl: fix CN check error code

Due to a missing 'else' this returns error too easily.

Regressed in: d15692ebb

Reported-by: Kristoffer Gleditsch
Fixes #8559
Closes #8560

3 years agoconnect: make Curl_getconnectinfo work with conn cache from share handle
Frank Meier [Wed, 23 Feb 2022 14:35:06 +0000 (15:35 +0100)] 
connect: make Curl_getconnectinfo work with conn cache from share handle

Closes #8524

3 years agoopenssl: enable CURLOPT_SSL_EC_CURVES with BoringSSL
lwthiker [Mon, 28 Feb 2022 09:05:34 +0000 (11:05 +0200)] 
openssl: enable CURLOPT_SSL_EC_CURVES with BoringSSL

The CURLOPT_SSL_EC_CURVES option (used by the '--curves' flag) in
libcurl was ignored when compiling with BoringSSL because
HAVE_SSL_CTX_SET_EC_CURVES was explicitly disabled if BoringSSL was
detected.  However, this feature is supported in BoringSSL since
5fd1807d. This commit enables it, and also reduces the required minimal
OpenSSL version to 1.0.2 as per OpenSSL's official documentation.

Fixes #8553
Closes #8556

3 years agojson.d: fix typo (overriden -> overridden)
Samuel Henrique [Mon, 7 Mar 2022 18:30:23 +0000 (18:30 +0000)] 
json.d: fix typo (overriden -> overridden)

Closes #8557

3 years agowolfssl: fix compiler error without IPv6
Daniel Stenberg [Mon, 7 Mar 2022 07:40:47 +0000 (08:40 +0100)] 
wolfssl: fix compiler error without IPv6

Reported-by: Joseph Chen
Fixes #8550
Closes #8552

3 years agoRELEASE-NOTES: synced
Daniel Stenberg [Mon, 7 Mar 2022 08:03:36 +0000 (09:03 +0100)] 
RELEASE-NOTES: synced

and bump pending version to 7.82.1

3 years agoruntests: make 'oldlibssh' be before 0.9.4
Paul Howarth [Sun, 6 Mar 2022 13:13:34 +0000 (13:13 +0000)] 
runtests: make 'oldlibssh' be before 0.9.4

The 'oldlibssh' feature indicates that the error code returned by libssh
for a broken known_hosts file should be 67 rather than 60 (test1459).
This feature was added as part of #8444 with 'oldlibssh' mapping to
libssh versions prior to 0.9.6, and then refined as part of #8511 to map
to versions prior to 0.9.5.

In Red Hat Enterprise Linux 8.5 there is a patched version of libssh
version 0.9.4 (https://git.centos.org/rpms/libssh/blob/c8/f/SOURCES) in
which test1459 fails because it returns the "new" value rather than the
"old" one. It's plausible that one of the patches is responsible for
this rather than the underlying code but I don't think so.

This change therefore drops the 'oldlibssh' version check to map to
libssh versions older than 0.9.4, which fixes builds on RHEL-8.

Closes #8548

3 years agoipv4/6.d: clarify that they are about using IP addresses
Daniel Stenberg [Sat, 5 Mar 2022 16:24:02 +0000 (17:24 +0100)] 
ipv4/6.d: clarify that they are about using IP addresses

... they may still *resolve* other families, but not use those
addresses.

Ref: #8530
Closes #8543

3 years agocurl/system.h: update ifdef condition for MCST-LCC compiler
r-a-sattarov [Sat, 5 Mar 2022 22:21:04 +0000 (01:21 +0300)] 
curl/system.h: update ifdef condition for MCST-LCC compiler

in mcst-lcc compiler => 1.25 added a new macro definition to determine
compiler

Closes #8546

3 years agoCI: install Python package impacket to run SMB test 1451
Marc Hoersken [Mon, 13 Dec 2021 19:51:19 +0000 (20:51 +0100)] 
CI: install Python package impacket to run SMB test 1451

Install Python package impacket in relevant CI workflows.

Follow up to #7935
Supersedes #7940
Closes #8544

3 years agoconnect: use TCP_KEEPALIVE only if TCP_KEEPIDLE is not defined
MAntoniak [Wed, 2 Mar 2022 22:36:38 +0000 (23:36 +0100)] 
connect: use TCP_KEEPALIVE only if TCP_KEEPIDLE is not defined

Closes #8539

3 years agodocs/HYPER.md: updated to reflect current hyper build needs
Daniel Stenberg [Sat, 5 Mar 2022 22:21:58 +0000 (23:21 +0100)] 
docs/HYPER.md: updated to reflect current hyper build needs

3 years agoGHA: build hyper with nightly rustc
Daniel Stenberg [Sat, 5 Mar 2022 22:17:56 +0000 (23:17 +0100)] 
GHA: build hyper with nightly rustc

Closes #8545

3 years agoRELEASE-NOTES: synced curl-7_82_0
Daniel Stenberg [Sat, 5 Mar 2022 08:41:24 +0000 (09:41 +0100)] 
RELEASE-NOTES: synced

The 7.82.0 release

3 years agoTHANKS: updates from the 7.82.0 release notes
Daniel Stenberg [Sat, 5 Mar 2022 08:41:24 +0000 (09:41 +0100)] 
THANKS: updates from the 7.82.0 release notes

3 years agomisc: update copyright year ranges
Daniel Stenberg [Sat, 5 Mar 2022 08:41:24 +0000 (09:41 +0100)] 
misc: update copyright year ranges

3 years agounit1610: init SSL library before calling SHA256 functions
Jay Satiro [Fri, 4 Mar 2022 23:34:06 +0000 (18:34 -0500)] 
unit1610: init SSL library before calling SHA256 functions

The SSL library must be initialized (via global initialization) because
libcurl's SHA256 functions may call SHA256 functions in the SSL library.

Reported-by: Gisle Vanem
Fixes https://github.com/curl/curl/issues/8538
Closes https://github.com/curl/curl/pull/8540

3 years agoexamples/curlx: support building with OpenSSL 1.1.0+
Jay Satiro [Tue, 1 Mar 2022 23:17:46 +0000 (18:17 -0500)] 
examples/curlx: support building with OpenSSL 1.1.0+

- Access members of X509_STORE_CTX in OpenSSL 1.1.0+ by using API
  functions.

The X509_STORE_CTX struct has been opaque since OpenSSL 1.1.0.

Ref: https://curl.se/mail/lib-2022-03/0004.html

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

3 years agoh2h3: fix typo
Jay Satiro [Tue, 1 Mar 2022 18:09:02 +0000 (13:09 -0500)] 
h2h3: fix typo

Bug: https://github.com/curl/curl/issues/8381#issuecomment-1055440241
Reported-by: Michael Kaufmann
3 years agoCURLOPT_XFERINFOFUNCTION.3: fix example struct assignment
Farzin [Sun, 27 Feb 2022 14:13:52 +0000 (17:43 +0330)] 
CURLOPT_XFERINFOFUNCTION.3: fix example struct assignment

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

3 years agoazure-pipelines: add a build on Windows with libssh
Daniel Stenberg [Fri, 25 Feb 2022 12:56:28 +0000 (13:56 +0100)] 
azure-pipelines: add a build on Windows with libssh

Closes #8511

3 years agoruntests: make 'oldlibssh' be before 0.9.5
Daniel Stenberg [Fri, 25 Feb 2022 15:17:04 +0000 (16:17 +0100)] 
runtests: make 'oldlibssh' be before 0.9.5

Closes #8511