]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
5 years agoversion: add 'cainfo' and 'capath' to version info struct
Daniel Stenberg [Thu, 26 Mar 2020 12:05:03 +0000 (13:05 +0100)] 
version: add 'cainfo' and 'capath' to version info struct

Suggested-by: Timothe Litt
URL: https://curl.haxx.se/mail/lib-2020-03/0090.html
Reviewed-by: Jay Satiro
Closes #5150

5 years agoRELEASE-NOTES: synced
Daniel Stenberg [Thu, 26 Mar 2020 23:08:14 +0000 (00:08 +0100)] 
RELEASE-NOTES: synced

5 years agoSSLCERTS.md: Fix example code for setting CA cert file
Jay Satiro [Thu, 26 Mar 2020 22:11:28 +0000 (18:11 -0400)] 
SSLCERTS.md: Fix example code for setting CA cert file

Prior to this change the documentation erroneously said use
CURLOPT_CAPATH to set a CA cert file.

Bug: https://curl.haxx.se/mail/lib-2020-03/0121.html
Reported-by: Timothe Litt
Closes https://github.com/curl/curl/pull/5151

5 years agosockfilt: add logmsg output to select_ws_wait_thread on Windows
Marc Hoersken [Wed, 11 Mar 2020 13:19:59 +0000 (14:19 +0100)] 
sockfilt: add logmsg output to select_ws_wait_thread on Windows

Assisted-by: Jay Satiro
Reviewed-by: Daniel Stenberg
Closes #5086

5 years agodocs/make: generate curl.1 from listed files only
Daniel Stenberg [Wed, 25 Mar 2020 22:16:28 +0000 (23:16 +0100)] 
docs/make: generate curl.1 from listed files only

Previously it rendered the page from files matching "*.d" in the correct
directory, which worked fine in git builds when the files were added but
made it easy to forget adding the files to the dist.

Now, only man page sections listed in DPAGES in Makefile.inc will be
used, thus "forcing" us to update this to get the man page right and get
it included in the dist at the same time.

Ref: #5146
Closes #5149

5 years agoopenssl: adapt to functions marked as deprecated since version 3
Daniel Stenberg [Mon, 23 Mar 2020 11:28:20 +0000 (12:28 +0100)] 
openssl: adapt to functions marked as deprecated since version 3

OpenSSL 3 deprecates SSL_CTX_load_verify_locations and the MD4, DES
functions we use.

Fix the MD4 and SSL_CTX_load_verify_locations warnings.

In configure, detect OpenSSL v3 and if so, inhibit the deprecation
warnings. OpenSSL v3 deprecates the DES functions we use for NTLM and
until we rewrite the code to use non-deprecated functions we better
ignore these warnings as they don't help us.

Closes #5139

5 years agodist: add mail-rcpt-allowfails.d to the tarball
Daniel Stenberg [Wed, 25 Mar 2020 15:31:13 +0000 (16:31 +0100)] 
dist: add mail-rcpt-allowfails.d to the tarball

Reported-by: Maksim Stsepanenka
Reviewed-by: Jat Satiro
Closes #5146

5 years agotravis: update the ngtcp2 build to use the latest OpenSSL patch
Daniel Stenberg [Tue, 24 Mar 2020 22:16:03 +0000 (23:16 +0100)] 
travis: update the ngtcp2 build to use the latest OpenSSL patch

... which also makes it OpenSSL 1.1.1d based and not v3.

5 years agoCI: remove default Ubuntu build from GitHub Actions
Marc Hoersken [Tue, 24 Mar 2020 17:24:52 +0000 (18:24 +0100)] 
CI: remove default Ubuntu build from GitHub Actions

We are already running a very similar Ubuntu build on Travis CI.
The macOS variant of this default build is kept on Github Actions.

5 years agoCI: bring GitHub Actions fuzzing job in line with macOS jobs
Marc Hoersken [Tue, 24 Mar 2020 17:19:35 +0000 (18:19 +0100)] 
CI: bring GitHub Actions fuzzing job in line with macOS jobs

Update YAML formatting, job naming and triggers.

5 years agoCI: migrate macOS jobs from Azure and Travis CI to GitHub Actions
Marc Hoersken [Tue, 24 Mar 2020 17:18:15 +0000 (18:18 +0100)] 
CI: migrate macOS jobs from Azure and Travis CI to GitHub Actions

Reduce workload on Azure Pipelines and Travis CI while
consolidating macOS jobs onto less utilized GitHub Actions.

Reviewed-by: Daniel Stenberg
Closes #5124

5 years agoconfig: remove all defines of HAVE_DES_H
Daniel Stenberg [Tue, 24 Mar 2020 14:22:48 +0000 (15:22 +0100)] 
config: remove all defines of HAVE_DES_H

As there's no code using it.

Closes #5144

5 years agocopyright: fix out-of-date copyright ranges and missing headers
Daniel Stenberg [Mon, 23 Mar 2020 13:44:29 +0000 (14:44 +0100)] 
copyright: fix out-of-date copyright ranges and missing headers

Reported by the new script 'scripts/copyright.pl'. The script has a
regex whitelist for the files that don't need copyright headers.

Removed three (mostly usesless) README files from docs/

Closes #5141

5 years agopackages: add OS400/chkstrings.c to the dist
Daniel Stenberg [Tue, 24 Mar 2020 11:54:03 +0000 (12:54 +0100)] 
packages: add OS400/chkstrings.c to the dist

Reported-by: Jon Rumsey
Fixes #5142
Closes #5143

5 years agonghttp2: 1.12.0 required
Clément Notin [Mon, 23 Mar 2020 20:17:21 +0000 (21:17 +0100)] 
nghttp2: 1.12.0 required

since nghttp2_session_set_local_window_size is needed

Closes #5140

5 years agoRELEASE-NOTES: synced
Daniel Stenberg [Mon, 23 Mar 2020 09:47:10 +0000 (10:47 +0100)] 
RELEASE-NOTES: synced

5 years agoOS400: Update strings for ccsid-ifier
Calvin Buckley [Sat, 21 Mar 2020 18:54:16 +0000 (19:54 +0100)] 
OS400: Update strings for ccsid-ifier

Fixes build.

Closes #5132

5 years agocirrus: make freebsd ignore the tests instead of skipping
Daniel Stenberg [Fri, 20 Mar 2020 22:59:13 +0000 (23:59 +0100)] 
cirrus: make freebsd ignore the tests instead of skipping

To allow us to see in the CI logs how they actually behave

Closes #5091

5 years agocirrus: move the sanitizer build from freebsd 13 to freebsd 12
Daniel Stenberg [Thu, 19 Mar 2020 13:33:53 +0000 (14:33 +0100)] 
cirrus: move the sanitizer build from freebsd 13 to freebsd 12

5 years agoRevert "cirrus-ci: disable the FreeBSD 13 builds"
Daniel Stenberg [Thu, 12 Mar 2020 14:29:42 +0000 (15:29 +0100)] 
Revert "cirrus-ci: disable the FreeBSD 13 builds"

This reverts commit 691b71be930f0e285c8f7a76efd56bbe0576cda6.

5 years agogetinfo: provide CURLINFO_HEADER_SIZE and CURLINFO_REQUEST_SIZE override
Daniel Stenberg [Sun, 22 Mar 2020 11:25:46 +0000 (12:25 +0100)] 
getinfo: provide CURLINFO_HEADER_SIZE and CURLINFO_REQUEST_SIZE override

To let debug-builds return fake values, like in test 970.

Ref: #5131
Closes #5136

5 years agotest970: improve the test
Daniel Stenberg [Sun, 22 Mar 2020 11:08:39 +0000 (12:08 +0100)] 
test970: improve the test

- send more data to make problems more obvious
- don't start the data with minus, it makes diffs harder to read
- skip the headers in the stdout comparison
- save to a file name to also verify 'filename_effective'

Ref: #5131

5 years agoCURLINFO_NUM_CONNECTS: improve accuracy
Daniel Stenberg [Sun, 22 Mar 2020 10:49:16 +0000 (11:49 +0100)] 
CURLINFO_NUM_CONNECTS: improve accuracy

The counter was not bumped in all cases correctly.

Reported-by: Marcel Raad
Ref: #5131
Closes #5135

5 years agoTODO: Use "random" ports for the test servers
Daniel Stenberg [Sun, 22 Mar 2020 22:30:09 +0000 (23:30 +0100)] 
TODO: Use "random" ports for the test servers

5 years agolib/curl_setup: adjust the copyright year range
Daniel Stenberg [Sat, 21 Mar 2020 22:19:39 +0000 (23:19 +0100)] 
lib/curl_setup: adjust the copyright year range

Follow-up from d820224b8

5 years agocurl_setup: define _WIN32_WINNT_[OS] symbols
Jay Satiro [Sat, 7 Mar 2020 08:21:33 +0000 (03:21 -0500)] 
curl_setup: define _WIN32_WINNT_[OS] symbols

.. because not all Windows build systems have those symbols, and even
those that do may be missing newer symbols (eg the Windows 7 SDK does
not define _WIN32_WINNT_WIN10).

Those symbols are used in build-time logic to decide which API to use
and prior to this change if the symbols were missing it would have
resulted in deprecated API being used when more recent functions were
available (eg GetVersionEx used instead of VerifyVersionInfo).

Reported-by: FuccDucc@users.noreply.github.com
Probably fixes https://github.com/curl/curl/issues/4995
Closes https://github.com/curl/curl/pull/5057

5 years agocurl-functions.m4: remove inappropriate AC_REQUIRE
Ross Burton [Fri, 20 Mar 2020 21:16:24 +0000 (21:16 +0000)] 
curl-functions.m4: remove inappropriate AC_REQUIRE

AC_REQUIRE means "if this macro hasn't been executed already, execute
it".  So in a wrapper around AC_RUN_IFELSE, AC_REQUIRE(AC_RUN_IFELSE)
isn't correct at that will execute AC_RUN_IFELSE without any arguments.

With autoconf 2.69 this is basically a no-op, but with autoconf 2.70,
AC_RUN_IFELSE without a default value when cross-compiling is fatal.
The result is that curl with autoconf 2.70 cannot cross-compile.

Fixes https://github.com/curl/curl/issues/5126
Closes https://github.com/curl/curl/pull/5130

5 years agoci/tests: fix Azure Pipelines not running Windows containers
Marc Hoersken [Fri, 20 Mar 2020 17:18:04 +0000 (18:18 +0100)] 
ci/tests: fix Azure Pipelines not running Windows containers

Workaround posted here: microsoft/azure-pipelines-agent#2864

Assisted-by: Simon Chalifoux
Assisted-by: Tommy Petty
Fixes #5117
Closes #5129

5 years agotests: add test 430, 431 and 432 to verify the --config fix
Daniel Stenberg [Fri, 20 Mar 2020 09:34:18 +0000 (10:34 +0100)] 
tests: add test 430, 431 and 432 to verify the --config fix

Verify the fixes in 4e0b4fee4

5 years agocmdline: fix handling of OperationConfig linked list (--next)
Rici Lake [Wed, 18 Mar 2020 23:28:19 +0000 (18:28 -0500)] 
cmdline: fix handling of OperationConfig linked list (--next)

Ensures that -K/--config inserts new items at the end of the list
instead of overwriting the second item, and that after a -K/--config
option has been parsed, the option parser's view of the current config
is update.

Fixes #5120
Closes #5123

5 years agotest2100: fix static port instead of dynamic value being used
Marc Hoersken [Thu, 19 Mar 2020 23:28:31 +0000 (00:28 +0100)] 
test2100: fix static port instead of dynamic value being used

5 years agotest970: fix static ip:port instead of dynamic values being used
Marc Hoersken [Thu, 19 Mar 2020 23:24:36 +0000 (00:24 +0100)] 
test970: fix static ip:port instead of dynamic values being used

5 years agosecure transport: remove the BACKEND define kludge
Daniel Stenberg [Wed, 18 Mar 2020 22:44:25 +0000 (23:44 +0100)] 
secure transport: remove the BACKEND define kludge

Closes #5122

5 years agombedtls: remove the BACKEND define kludge
Daniel Stenberg [Wed, 18 Mar 2020 22:22:01 +0000 (23:22 +0100)] 
mbedtls: remove the BACKEND define kludge

5 years agobearssl: remove the BACKEND define kludge
Daniel Stenberg [Wed, 18 Mar 2020 22:18:33 +0000 (23:18 +0100)] 
bearssl: remove the BACKEND define kludge

5 years agowolfssl: remove the BACKEND define kludge
Daniel Stenberg [Wed, 18 Mar 2020 22:16:02 +0000 (23:16 +0100)] 
wolfssl: remove the BACKEND define kludge

5 years agonss: remove the BACKEND define kludge
Daniel Stenberg [Wed, 18 Mar 2020 22:12:58 +0000 (23:12 +0100)] 
nss: remove the BACKEND define kludge

5 years agognutls: remove the BACKEND define kludge
Daniel Stenberg [Wed, 18 Mar 2020 22:09:01 +0000 (23:09 +0100)] 
gnutls: remove the BACKEND define kludge

5 years agoopenssl: remove the BACKEND define kludge
Daniel Stenberg [Wed, 18 Mar 2020 15:58:38 +0000 (16:58 +0100)] 
openssl: remove the BACKEND define kludge

Use a proper variable instead to make it easier to use a debugger and
read the code.

5 years agotests: make Python-based servers compatible with Python 2 and 3
Marc Hoersken [Tue, 17 Mar 2020 09:36:25 +0000 (10:36 +0100)] 
tests: make Python-based servers compatible with Python 2 and 3

Update smbserver.py and negtelnetserver.py to be compatible with
Python 3 while staying backwards-compatible to support Python 2.

Fix string encoding and handling of echoed and transferred data.

Tested with both Python 2.7.17 and Python 3.7.7

Reported-by: Daniel Stenberg
Assisted-by: Kamil Dudka
Reviewed-by: Marcel Raad
Fixes #5104
Closes #5110

5 years agowriteout_json: use curl_off_t printf() option for the time output
Daniel Stenberg [Tue, 17 Mar 2020 22:29:10 +0000 (23:29 +0100)] 
writeout_json: use curl_off_t printf() option for the time output

Follow-up to: 04c03416e68fd635a15

Closes #5115

5 years agoRELEASE-NOTES: synced
Daniel Stenberg [Wed, 18 Mar 2020 09:23:47 +0000 (10:23 +0100)] 
RELEASE-NOTES: synced

Uh, I missed this in 1a46b218db

5 years agoRELEASE-NOTES: synced
Daniel Stenberg [Wed, 18 Mar 2020 07:47:51 +0000 (08:47 +0100)] 
RELEASE-NOTES: synced

... and bumped curlver.h to 7.70.0

5 years agohttp2: Fix erroneous debug message that h2 connection closed
Jay Satiro [Wed, 18 Mar 2020 06:51:55 +0000 (02:51 -0400)] 
http2: Fix erroneous debug message that h2 connection closed

Prior to this change in libcurl debug builds http2 stream closure was
erroneously referred to as connection closure.

Before:
* nread <= 0, server closed connection, bailing

After:
* nread == 0, stream closed, bailing

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

5 years agotool_setopt: correct the copyright year range
Daniel Stenberg [Wed, 18 Mar 2020 07:33:28 +0000 (08:33 +0100)] 
tool_setopt: correct the copyright year range

Follow-up to 5450428491

5 years agoschannel: add "best effort" revocation check option
Johannes Schindelin [Wed, 26 Feb 2020 10:24:26 +0000 (11:24 +0100)] 
schannel: add "best effort" revocation check option

- Implement new option CURLSSLOPT_REVOKE_BEST_EFFORT and
  --ssl-revoke-best-effort to allow a "best effort" revocation check.

A best effort revocation check ignores errors that the revocation check
was unable to take place. The reasoning is described in detail below and
discussed further in the PR.

---

When running e.g. with Fiddler, the schannel backend fails with an
unhelpful error message:

Unknown error (0x80092012) - The revocation function was unable
to check revocation for the certificate.

Sadly, many enterprise users who are stuck behind MITM proxies suffer
the very same problem.

This has been discussed in plenty of issues:
https://github.com/curl/curl/issues/3727,
https://github.com/curl/curl/issues/264, for example.

In the latter, a Microsoft Edge developer even made the case that the
common behavior is to ignore issues when a certificate has no recorded
distribution point for revocation lists, or when the server is offline.
This is also known as "best effort" strategy and addresses the Fiddler
issue.

Unfortunately, this strategy was not chosen as the default for schannel
(and is therefore a backend-specific behavior: OpenSSL seems to happily
ignore the offline servers and missing distribution points).

To maintain backward-compatibility, we therefore add a new flag
(`CURLSSLOPT_REVOKE_BEST_EFFORT`) and a new option
(`--ssl-revoke-best-effort`) to select the new behavior.

Due to the many related issues Git for Windows and GitHub Desktop, the
plan is to make this behavior the default in these software packages.

The test 2070 was added to verify this behavior, adapted from 310.

Based-on-work-by: georgeok <giorgos.n.oikonomou@gmail.com>
Co-authored-by: Markus Olsson <j.markus.olsson@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Closes https://github.com/curl/curl/pull/4981

5 years agomulti: Improve parameter check for curl_multi_remove_handle
Jay Satiro [Tue, 17 Mar 2020 22:59:07 +0000 (18:59 -0400)] 
multi: Improve parameter check for curl_multi_remove_handle

- If an easy handle is owned by a multi different from the one specified
  then return CURLM_BAD_EASY_HANDLE.

Prior to this change I assume user error could cause corruption.

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

5 years agowindows: suppress UI in all CryptAcquireContext() calls
Viktor Szakats [Tue, 17 Mar 2020 23:06:05 +0000 (23:06 +0000)] 
windows: suppress UI in all CryptAcquireContext() calls

Ref: https://docs.microsoft.com/windows/win32/api/wincrypt/nf-wincrypt-cryptacquirecontexta#parameters
Reviewed-by: Marc Hörsken
Closes https://github.com/curl/curl/pull/5088

5 years agowriteout_json: add missing comma to fix the HTTP version
Daniel Stenberg [Tue, 17 Mar 2020 15:04:35 +0000 (16:04 +0100)] 
writeout_json: add missing comma to fix the HTTP version

Follow-up to 04c03416e68fd635a15

5 years agotest 970: verify --write-out '%{json}'
Daniel Stenberg [Sat, 8 Feb 2020 23:04:05 +0000 (00:04 +0100)] 
test 970: verify --write-out '%{json}'

Makes curl_easy_getinfo() of "variable" numerical content instead return
the number set in the env variable `CURL_TIME`.

Makes curl_version() of "variable" textual content. This guarantees a
stable version string which can be tested against. Environment variable
`CURL_VERSION` defines the content.

Assisted-by: Mathias Gumz
5 years agowriteout: support to generate JSON output
Mathias Gumz [Sat, 1 Feb 2020 17:55:24 +0000 (18:55 +0100)] 
writeout: support to generate JSON output

This commit adds support to generate JSON via the writeout feature:

    -w "%{json}"

It leverages the existing infrastructure as much as possible. Thus,
generating the JSON on STDERR is possible by:

    -w "%{stderr}%{json}"

This implements a variant of
https://github.com/curl/curl/wiki/JSON#--write-out-json.

Closes #4870

5 years agoCI: stop ignoring 323, it is disabled
Daniel Stenberg [Mon, 16 Mar 2020 21:21:37 +0000 (22:21 +0100)] 
CI: stop ignoring 323, it is disabled

5 years agoDISABLED: disable test 323
Daniel Stenberg [Mon, 16 Mar 2020 13:53:14 +0000 (14:53 +0100)] 
DISABLED: disable test 323

The test uses SRP to "a server not supporting it" but modern stunnel
versions will silently accept it and remain happy. The test is therefore
faulty.

I haven't figured out how to make stunnel explicitly reject SRP-using
connects.

Reported-by: Marc Hörsken
Fixes #5105
Closes #5113

5 years agoci/tests: increase timeouts for torture builds on Azure Pipelines
Marc Hoersken [Tue, 17 Mar 2020 08:24:29 +0000 (09:24 +0100)] 
ci/tests: increase timeouts for torture builds on Azure Pipelines

For some reason the torture builds have slowed down recently.

Reported-by: Daniel Stenberg
5 years agocmake: add support for building with wolfSSL 5095/head
Daniel Stenberg [Thu, 12 Mar 2020 16:18:40 +0000 (17:18 +0100)] 
cmake: add support for building with wolfSSL

My working build cmdline:

$ cmake -DCMAKE_PREFIX_PATH=$HOME/build-wolfssl -DCMAKE_USE_WOLFSSL=ON .

Assisted-by: Brad King
Closes #5095

5 years agotool_operate: fix add_parallel_transfers when more are in queue
Daniel Stenberg [Mon, 16 Mar 2020 08:33:27 +0000 (09:33 +0100)] 
tool_operate: fix add_parallel_transfers when more are in queue

Trying to return early from the function if no new transfers were added
would break the "morep" argument and cause issues. This could lead to
zero content "transfers" (within quotes since they would never be
started) when parallel-max was reduced.

Reported-by: Gavin Wong
Analyzed-by: Jay Satiro
Fixes #4937
Closes #5112

5 years agovtls: free ssl_config leftovers on out-of-memory
Daniel Stenberg [Sun, 15 Mar 2020 22:19:50 +0000 (23:19 +0100)] 
vtls: free ssl_config leftovers on out-of-memory

Torture testing 2034 and 2037 found this.

Reported-by: Marc Hörsken
Fixes #5108
Closes #5109

5 years agoci/tests: fix Azure Pipelines not running for pull requests
Marc Hoersken [Sun, 15 Mar 2020 22:57:04 +0000 (23:57 +0100)] 
ci/tests: fix Azure Pipelines not running for pull requests

Closes #5111

5 years agogskit: update the copyright year range
Daniel Stenberg [Sun, 15 Mar 2020 22:43:50 +0000 (23:43 +0100)] 
gskit: update the copyright year range

Follow-up from 083603c63a3

5 years agogskit: use our internal select wrapper for portability
Marc Hoersken [Sun, 15 Mar 2020 11:56:12 +0000 (12:56 +0100)] 
gskit: use our internal select wrapper for portability

Follow up to c52b342
Closes #5106

5 years agotests: fix verification of stdout in test 1452 due to newline
Marc Hoersken [Sun, 15 Mar 2020 22:17:01 +0000 (23:17 +0100)] 
tests: fix verification of stdout in test 1452 due to newline

Fixes test1452:41:1: error: missing </stdout> tag before </verify>

5 years agoci/tests: install impacket for SMB tests on FreeBSD using CirrusCI
Marc Hoersken [Sun, 15 Mar 2020 12:38:41 +0000 (13:38 +0100)] 
ci/tests: install impacket for SMB tests on FreeBSD using CirrusCI

Also force the package index/cache to be updated before installing.

Closes #5103

5 years agotests/README: add note about manually installing python-impacket
Marc Hoersken [Sun, 15 Mar 2020 11:33:55 +0000 (12:33 +0100)] 
tests/README: add note about manually installing python-impacket

Follow up to 4be2560

5 years agotransfer: cap retries of "dead connections" to 5
Daniel Stenberg [Tue, 10 Mar 2020 21:31:47 +0000 (22:31 +0100)] 
transfer: cap retries of "dead connections" to 5

When libcurl retries a connection due to it being "seemingly dead" or by
REFUSED_STREAM, it will now only do it up five times before giving up,
to avoid never-ending loops.

Reported-by: Dima Tisnek
Bug: https://curl.haxx.se/mail/lib-2020-03/0044.html
Closes #5074

5 years agoTODO: TLS-PSK with OpenSSL
Daniel Stenberg [Sun, 15 Mar 2020 10:34:14 +0000 (11:34 +0100)] 
TODO: TLS-PSK with OpenSSL

Closes #5081

5 years agoselect: add 'timeout_ms' wrap-around precaution to Curl_select
Marc Hoersken [Thu, 12 Mar 2020 08:34:34 +0000 (09:34 +0100)] 
select: add 'timeout_ms' wrap-around precaution to Curl_select

5 years agoselect: fix 'pending_ms' is assigned a value that is never used
Marc Hoersken [Thu, 12 Mar 2020 08:32:50 +0000 (09:32 +0100)] 
select: fix 'pending_ms' is assigned a value that is never used

Detected by Codacy

5 years agoselect: move duplicate select preparation code into Curl_select
Marc Hoersken [Sun, 15 Mar 2020 10:07:08 +0000 (11:07 +0100)] 
select: move duplicate select preparation code into Curl_select

Reviewed by Daniel Stenberg
Reviewed by Marcel Raad
Closes #5078

5 years agoconnect: happy eyeballs cleanup
Daniel Stenberg [Thu, 12 Mar 2020 13:03:26 +0000 (14:03 +0100)] 
connect: happy eyeballs cleanup

Make sure each separate index in connn->tempaddr[] is used for a fixed
family (and only that family) during the connection process.

If family one takes a long time and family two fails immediately, the
previous logic could misbehave and retry the same family two address
repeatedly.

Reported-by: Paul Vixie
Reported-by: Jay Satiro
Fixes #5083
Fixes #4954
Closes #5089

5 years agoci/tests: fix and align setting TFLAGS for make test-nonflaky
Marc Hoersken [Sat, 14 Mar 2020 22:50:16 +0000 (23:50 +0100)] 
ci/tests: fix and align setting TFLAGS for make test-nonflaky

5 years agoci/tests: install test suite dependencies stunnel and impacket
Marc Hoersken [Sat, 14 Mar 2020 22:49:03 +0000 (23:49 +0100)] 
ci/tests: install test suite dependencies stunnel and impacket

5 years agotests: remove python_dependencies for smbserver from our tree
Marc Hoersken [Sun, 15 Mar 2020 09:01:38 +0000 (10:01 +0100)] 
tests: remove python_dependencies for smbserver from our tree

Users of the SMB tests will have to install impacket manually.

Reasoning: our in-tree version of impacket was quite outdated
and only compatible with Python 2 which is already end-of-life.
Upgrading to Python 3 and a compatible impacket version would
require to import additional Python-only and CPython-extension
dependencies. This would have hindered portability enormously.

Closes #5094

5 years agoMakefile.m32: Improve windres parameter compatibility
Jay Satiro [Sat, 14 Mar 2020 06:51:33 +0000 (02:51 -0400)] 
Makefile.m32: Improve windres parameter compatibility

- s/COFF/coff/

Some versions of windres do not recognize uppercase COFF as a valid
way to specify the COFF output format.

Reported-by: Steven Penny
Fixes https://github.com/curl/curl/issues/5099
Closes https://github.com/curl/curl/pull/5101

5 years agoeasy: Fix curl_easy_duphandle for builds missing IPv6 that use c-ares
Jay Satiro [Sat, 14 Mar 2020 06:19:04 +0000 (02:19 -0400)] 
easy: Fix curl_easy_duphandle for builds missing IPv6 that use c-ares

- Ignore CURLE_NOT_BUILT_IN errors returned by c-ares functions in
  curl_easy_duphandle.

Prior to this change if c-ares was used as the resolver backend and
either it was too old or libcurl was built without IPv6 support then
some of our resolver functions could return CURLE_NOT_BUILT_IN to
curl_easy_duphandle causing it to fail.

Caused by c8f086b which shipped in 7.69.1.

Reported-by: Karl Chen
Fixes https://github.com/curl/curl/issues/5097
Closes https://github.com/curl/curl/pull/5100

5 years agodocs: add warnings about FILE: URLs on Windows
Daniel Stenberg [Mon, 9 Mar 2020 13:59:21 +0000 (14:59 +0100)] 
docs: add warnings about FILE: URLs on Windows

 - --url man page section
 - libcurl-security.3 gets the full text
 - CURLOPT_URL.3

Reported-by: Tim Sedlmeyer
5 years agoserver/getpart: make the "XML-parser" stricter
Daniel Stenberg [Tue, 10 Mar 2020 16:47:44 +0000 (17:47 +0100)] 
server/getpart: make the "XML-parser" stricter

When extracting a <section> <part> and there's no </part> before
</section>, this now outputs an error and returns a wrong string to
make users spot the mistake.

Ref: #5070
Closes #5071

5 years agoimpacket: some more Python 3 code compatibility updates
Marc Hoersken [Thu, 12 Mar 2020 08:26:56 +0000 (09:26 +0100)] 
impacket: some more Python 3 code compatibility updates

This makes smbserver load on Python 3, but still not work completely.

5 years agosmbserver: pin Python version to 2 since we are not yet 3 compatible
Marc Hoersken [Thu, 12 Mar 2020 08:26:00 +0000 (09:26 +0100)] 
smbserver: pin Python version to 2 since we are not yet 3 compatible

Even though the existing code can be fixed to run on Python 3, the
tests will fail due to the Unicode transition the protocol is invalid.

Follow up to ee63837
Closes #5085

5 years agocleanup: fix some text/comment typos
Viktor Szakats [Thu, 12 Mar 2020 12:15:22 +0000 (12:15 +0000)] 
cleanup: fix some text/comment typos

Closes #5087

5 years agosmbserver: fix Python version specific ConfigParser import
Marc Hoersken [Thu, 12 Mar 2020 08:15:36 +0000 (09:15 +0100)] 
smbserver: fix Python version specific ConfigParser import

Follow up to ee63837 and 8c7c4a6
Fixes #5077

5 years agoRELEASE-NOTES: synced
Daniel Stenberg [Wed, 11 Mar 2020 10:07:42 +0000 (11:07 +0100)] 
RELEASE-NOTES: synced

bumped to 7.69.2

5 years agotests/data: Fix some XML formatting issues in test cases
Dan Fandrich [Tue, 10 Mar 2020 15:44:10 +0000 (16:44 +0100)] 
tests/data: Fix some XML formatting issues in test cases

This allows these test files to pass xmllint.

5 years agoMakefile: run the cd commands in a subshell
Muhammad Herdiansyah [Tue, 10 Mar 2020 23:51:05 +0000 (06:51 +0700)] 
Makefile: run the cd commands in a subshell

In bmake, if the directory is changed (with cd or anything else), bmake
won't return to the "root directory" on the next command (in the same
Makefile rule). This commit runs the cd command in a subshell so it
would work in bmake.

Closes #5073

5 years agoconfigure: convert -I to -isystem as a last step
Daniel Stenberg [Sun, 8 Mar 2020 10:08:13 +0000 (11:08 +0100)] 
configure: convert -I to -isystem as a last step

As all the -I uses in CFLAGS at that point are for system headers and
third party libraries this helps us remove/ignore warnings on those!

Closes #5060

5 years agoconfigure: fix -pedantic-errors for GCC 5 and later
Daniel Stenberg [Tue, 10 Mar 2020 12:55:44 +0000 (13:55 +0100)] 
configure: fix -pedantic-errors for GCC 5 and later

If --enable-werror is used.

Follow-up to d5c0351055d5709da which added it too early in the configure
script before $compiler_num was set correctly and thus this option was
never used.

Reported-by: Stepan Efremov
Fixes #5067
Closes #5068

5 years agoconfigure: document 'compiler_num' for gcc
Daniel Stenberg [Tue, 10 Mar 2020 13:37:43 +0000 (14:37 +0100)] 
configure: document 'compiler_num' for gcc

The CURL_CHECK_COMPILER_GNU_C function sets the number to MAJOR*100 +
MINOR and ignores the patch version, and since gcc version 7 it only
sets it to MAJOR*100.

Reported-by: Stepan Efremov
Ref: #5067
Closes #5069

5 years agoRELEASE-NOTES: 7.69.1 curl-7_69_1
Daniel Stenberg [Mon, 9 Mar 2020 14:24:32 +0000 (15:24 +0100)] 
RELEASE-NOTES: 7.69.1

5 years agoTHANKS: from the 7.69.1 release
Daniel Stenberg [Tue, 10 Mar 2020 08:22:00 +0000 (09:22 +0100)] 
THANKS: from the 7.69.1 release

5 years agotest1129: fix invalid case of closing XML-tag and Content-Length
Marc Hoersken [Tue, 10 Mar 2020 17:19:03 +0000 (18:19 +0100)] 
test1129: fix invalid case of closing XML-tag and Content-Length

Fixes #5070
Closes #5072

5 years agotests/data: fix static ip instead of dynamic value being used
Marc Hoersken [Tue, 10 Mar 2020 12:31:19 +0000 (13:31 +0100)] 
tests/data: fix static ip instead of dynamic value being used

Follow up to 94ced8e

5 years agotests/data: fix static ip:port instead of dynamic values being used
Marc Hoersken [Tue, 10 Mar 2020 02:56:50 +0000 (03:56 +0100)] 
tests/data: fix static ip:port instead of dynamic values being used

Closes #5065

5 years agotests/server: fix missing use of exe_ext helper function
Marc Hoersken [Tue, 10 Mar 2020 02:56:17 +0000 (03:56 +0100)] 
tests/server: fix missing use of exe_ext helper function

Follow up to 9819984 and 3dce984
Reviewed-By: Daniel Stenberg
Closes #5064

5 years agoruntests: log minimal and maximal used port numbers
Marc Hoersken [Mon, 9 Mar 2020 16:12:35 +0000 (17:12 +0100)] 
runtests: log minimal and maximal used port numbers

5 years agosftp: fix segfault regression introduced by #4747
Jim Fuller [Sun, 8 Mar 2020 17:35:21 +0000 (18:35 +0100)] 
sftp: fix segfault regression introduced by #4747

This fix adds a defensive check for the case where the char *name in
struct libssh2_knownhost is NULL

Fixes #5041
Closes #5062

5 years agoRELEASE-NOTES: synced
Daniel Stenberg [Sun, 8 Mar 2020 22:22:02 +0000 (23:22 +0100)] 
RELEASE-NOTES: synced

5 years agosocks4: fix host resolve regression
Daniel Stenberg [Sun, 8 Mar 2020 16:24:50 +0000 (17:24 +0100)] 
socks4: fix host resolve regression

1. The socks4 state machine was broken in the host resolving phase

2. The code now insists on IPv4-only when using SOCKS4 as the protocol
only supports that.

Regression from #4907 and 4a4b63d, shipped in 7.69.0

Reported-by: amishmm on github
Bug: https://github.com/curl/curl/issues/5053#issuecomment-596191594
Closes #5061

5 years agosilly web server: silent a compilation warning
Patrick Monnerat [Tue, 28 Jan 2020 10:56:41 +0000 (11:56 +0100)] 
silly web server: silent a compilation warning

Recent gcc warns when byte count of strncpy() equals the destination
buffer size. Since the destination buffer is previously cleared and
the source string is always shorter, reducing the byte count by one
silents the warning without affecting the result.

Closes #5059

5 years agocookie: get_top_domain() sets zero length for null domains
Patrick Monnerat [Tue, 28 Jan 2020 09:23:41 +0000 (10:23 +0100)] 
cookie: get_top_domain() sets zero length for null domains

This silents a compilation warning with gcc -O3.

5 years agotest 1560: avoid valgrind false positives
Patrick Monnerat [Tue, 28 Jan 2020 01:44:29 +0000 (02:44 +0100)] 
test 1560: avoid valgrind false positives

When using maximum code optimization level (-O3), valgrind wrongly
detects uses of uninitialized values in strcmp().

Preset buffers with all zeroes to avoid that.

5 years agosha256: Added WinCrypt implementation
Steve Holme [Thu, 20 Feb 2020 01:49:31 +0000 (01:49 +0000)] 
sha256: Added WinCrypt implementation

Closed #5030