]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
5 years agoftp: shut down the secondary connection properly when SSL is used
Daniel Stenberg [Wed, 13 May 2020 10:22:49 +0000 (12:22 +0200)] 
ftp: shut down the secondary connection properly when SSL is used

Reported-by: Neal Poole
Fixes #5340
Closes #5385

5 years agoKNOWN_BUGS: adapt 5.5 to recent changes
Marcel Raad [Thu, 2 Jan 2020 22:07:34 +0000 (23:07 +0100)] 
KNOWN_BUGS: adapt 5.5 to recent changes

It only applies to non-Unicode builds now.
Also merge 5.10 into it as it's effectively a duplicate.

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

5 years agocurl_setup: support Unicode functions to open files on Windows
Marcel Raad [Thu, 2 Jan 2020 21:47:33 +0000 (22:47 +0100)] 
curl_setup: support Unicode functions to open files on Windows

Use them only if `_UNICODE` is defined, in which case command-line
arguments have been converted to UTF-8.

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

5 years agotool: support UTF-16 command line on Windows
Marcel Raad [Fri, 12 Apr 2019 20:59:40 +0000 (22:59 +0200)] 
tool: support UTF-16 command line on Windows

- use `wmain` instead of `main` when `_UNICODE` is defined [0]
- define `argv_item_t` as `wchar_t *` in this case
- use the curl_multibyte gear to convert the command-line arguments to
  UTF-8

This makes it possible to pass parameters with characters outside of
the current locale on Windows, which is required for some tests, e.g.
the IDN tests. Out of the box, this currently only works with the
Visual Studio project files, which default to Unicode, and winbuild
with the `ENABLE_UNICODE` option.

[0] https://devblogs.microsoft.com/oldnewthing/?p=40643

Ref: https://github.com/curl/curl/issues/3747
Closes https://github.com/curl/curl/pull/3784

5 years agocurl_multibyte: add to curlx
Marcel Raad [Sat, 13 Apr 2019 20:55:51 +0000 (22:55 +0200)] 
curl_multibyte: add to curlx

This will also be needed in the tool and tests.

Ref: https://github.com/curl/curl/pull/3758#issuecomment-482197512
Closes https://github.com/curl/curl/pull/3784

5 years agourl: make the updated credentials URL-encoded in the URL
Daniel Stenberg [Thu, 14 May 2020 12:37:12 +0000 (14:37 +0200)] 
url: make the updated credentials URL-encoded in the URL

Found-by: Gregory Jefferis
Reported-by: Jeroen Ooms
Added test 1168 to verify. Bug spotted when doing a redirect.
Bug: https://github.com/jeroen/curl/issues/224
Closes #5400

5 years agotests: add https-proxy support to the test suite
Daniel Stenberg [Thu, 14 May 2020 07:44:17 +0000 (09:44 +0200)] 
tests: add https-proxy support to the test suite

Initial test 1630 added with basic HTTPS-proxy use. HTTPS-proxy is like
HTTP proxy but with a full TLS connection to the proxy.

Closes #5399

5 years agomailmap: James Fuller
Daniel Stenberg [Thu, 14 May 2020 06:55:00 +0000 (08:55 +0200)] 
mailmap: James Fuller

5 years agovauth/cleartext: fix theoretical integer overflow
Major_Tom [Wed, 13 May 2020 19:41:27 +0000 (21:41 +0200)] 
vauth/cleartext: fix theoretical integer overflow

Fix theoretical integer overflow in Curl_auth_create_plain_message.

The security impact of the overflow was discussed on hackerone. We
agreed this is more of a theoretical vulnerability, as the integer
overflow would only be triggerable on systems using 32-bits size_t with
over 4GB of available memory space for the process.

Closes #5391

5 years agocurl.1: Quote globbed URLs
Jay Satiro [Wed, 13 May 2020 18:02:44 +0000 (14:02 -0400)] 
curl.1: Quote globbed URLs

- Quote the globbing example URLs that contain characters [] {} since
  otherwise they may be interpreted as shell metacharacters.

Bug: https://github.com/curl/curl/issues/5388
Reported-by: John Simpson
Closes https://github.com/curl/curl/pull/5394

5 years agochecksrc: enhance the ASTERISKSPACE and update code accordingly
Daniel Stenberg [Wed, 13 May 2020 10:56:53 +0000 (12:56 +0200)] 
checksrc: enhance the ASTERISKSPACE and update code accordingly

Fine: "struct hello *world"

Not fine: "struct hello* world" (and variations)

Closes #5386

5 years agodocs/options-in-versions: which version added each cmdline option
Daniel Stenberg [Tue, 12 May 2020 11:29:53 +0000 (13:29 +0200)] 
docs/options-in-versions: which version added each cmdline option

Added test 971 to verify that the list is in sync with the files in
cmdline-opts. The check also verifies that .d-files that uses Added:
specify the same version number as the options-in-versions file does.

Closes #5381

5 years agodocs: unify protocol lists
Daniel Stenberg [Wed, 13 May 2020 12:40:05 +0000 (14:40 +0200)] 
docs: unify protocol lists

We boast support for 25 transfer protocols. Make sure the lists are
consistent

Closes #5384

5 years agoOpenSSL: have CURLOPT_CRLFILE imply CURLSSLOPT_NO_PARTIALCHAIN
Daniel Stenberg [Mon, 11 May 2020 21:00:31 +0000 (23:00 +0200)] 
OpenSSL: have CURLOPT_CRLFILE imply CURLSSLOPT_NO_PARTIALCHAIN

... to avoid an OpenSSL bug that otherwise makes the CRL check to fail.

Reported-by: Michael Kaufmann
Fixes #5374
Closes #5376

5 years agotls13-ciphers.d: shorten the Arg
Daniel Stenberg [Tue, 12 May 2020 22:19:44 +0000 (00:19 +0200)] 
tls13-ciphers.d: shorten the Arg

5 years agosasl-authzid.d: add Arg: and shorten the desc
Daniel Stenberg [Tue, 12 May 2020 22:17:51 +0000 (00:17 +0200)] 
sasl-authzid.d: add Arg: and shorten the desc

5 years agocert-type.d: mention the available types in the desc
Daniel Stenberg [Tue, 12 May 2020 22:17:29 +0000 (00:17 +0200)] 
cert-type.d: mention the available types in the desc

5 years agotool: shorten 3 --help descriptions
Daniel Stenberg [Tue, 12 May 2020 07:13:43 +0000 (09:13 +0200)] 
tool: shorten 3 --help descriptions

--happy-eyeballs-timeout-ms, --resolve and --ssl-revoke-best-effort

gen.pl already warned about these lines but we didn't listen

Closes #5379

5 years agoconfigure: the wolfssh backend does not provide SCP
Daniel Stenberg [Wed, 13 May 2020 12:54:27 +0000 (14:54 +0200)] 
configure: the wolfssh backend does not provide SCP

Closes #5387

5 years agoRELEASE-NOTES: synced
Daniel Stenberg [Wed, 13 May 2020 08:05:49 +0000 (10:05 +0200)] 
RELEASE-NOTES: synced

5 years agourl: reject too long input when parsing credentials
Daniel Stenberg [Tue, 12 May 2020 22:52:34 +0000 (00:52 +0200)] 
url: reject too long input when parsing credentials

Since input passed to libcurl with CURLOPT_USERPWD and
CURLOPT_PROXYUSERPWD circumvents the regular string length check we have
in Curl_setstropt(), the input length limit is enforced in
Curl_parse_login_details too, separately.

Reported-by: Thomas Bouzerar
Closes #5383

5 years agolist-only.d: this option existed already in 4.0
Daniel Stenberg [Tue, 12 May 2020 11:25:47 +0000 (13:25 +0200)] 
list-only.d: this option existed already in 4.0

5 years agoretry-all-errors.d: Shorten the summary line
Jay Satiro [Tue, 12 May 2020 07:12:13 +0000 (03:12 -0400)] 
retry-all-errors.d: Shorten the summary line

Follow-up to b995bb5 from a few moments ago.

Reported-by: Daniel Stenberg
Ref: https://github.com/curl/curl/commit/b995bb5#r39108929

5 years agoeasy: fix dangling pointer on easy_perform fail
denzor [Sat, 9 May 2020 14:52:47 +0000 (17:52 +0300)] 
easy: fix dangling pointer on easy_perform fail

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

5 years agotool: Add option --retry-all-errors to retry on any error
Jay Satiro [Sat, 4 Apr 2020 20:16:18 +0000 (16:16 -0400)] 
tool: Add option --retry-all-errors to retry on any error

The "sledgehammer" of retrying.

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

5 years agolibcurl.pc: Merge Libs.private into Libs for static-only builds
James Le Cuirot [Mon, 11 May 2020 19:50:02 +0000 (20:50 +0100)] 
libcurl.pc: Merge Libs.private into Libs for static-only builds

A project being built entirely statically will call pkg-config with
--static, which utilises the Libs.private field. Conversely it will
not use --static when not being built entirely statically, even if
there is only a static build of libcurl available. This will most
likely cause the build to fail due to underlinking unless we merge the
Libs fields.

Consider that this is what the Meson build system does when it
generates pkg-config files.

I have also reflected this in the --libs argument of curl-config even
though REQUIRE_LIB_DEPS always seems to be "yes" anyway.

Closes #5373

5 years agoCMake: fix runtests.pl with CMake, add new test targets
Peter Wu [Sun, 10 May 2020 00:12:12 +0000 (02:12 +0200)] 
CMake: fix runtests.pl with CMake, add new test targets

  * runtests.pl:
    - Fix out-of-tree build under CMake when srcdir is not set. Default
      srcdir to the location of runtests.pl.
    - Add a hack to allow CMake to use the TFLAGS option as documented
      in tests/README and used in scripts/travis/script.sh.
  * Bump CMake version to 3.2 for USES_TERMINAL, dropping Debian Jessie
    support (no one should care, it is already EOL.).
  * Remove CTest since it defines its own 'test' target with no tests
    since all unittests are already broken and not built by default.
  * Add new test targets based on the options from Makefile.am. Since
    new test targets are rarely added, I opted for duplicating the
    runtests.pl options as opposed to creating a new Makefile.inc file.
    Use top-level target names (test-x) instead of x-test since that is
    used by CI and others.

Closes #5358

5 years agoCMake: do not build test programs by default
Peter Wu [Sun, 10 May 2020 00:10:20 +0000 (02:10 +0200)] 
CMake: do not build test programs by default

The default target should only build libcurl and curl. Add a dedicated
'testdeps' target which will be used later when running tests. Note that
unittests are currently broken in CMake and already excluded.

Closes #5368

5 years agoFILEFORMAT: moved up the variables section and further polished
Daniel Stenberg [Mon, 11 May 2020 20:44:58 +0000 (22:44 +0200)] 
FILEFORMAT: moved up the variables section and further polished

5 years agoruntests: remove ftp2 support, not used
Daniel Stenberg [Mon, 11 May 2020 20:29:04 +0000 (22:29 +0200)] 
runtests: remove ftp2 support, not used

We once supported two separate ftp instances in the test suite. Has not
been used the last decade.

Closes #5375

5 years agourl: sort the protocol schemes in rough popularity order
Daniel Stenberg [Mon, 11 May 2020 21:18:01 +0000 (23:18 +0200)] 
url: sort the protocol schemes in rough popularity order

When looking for a protocol match among supported schemes, check the
most "popular" schemes first. It has zero functionality difference and
for all practical purposes a speed difference will not be measureable
but it still think it makes sense to put the least likely matches last.

"Popularity" based on the 2019 user survey.

Closes #5377

5 years agotest1238: avoid tftpd being busy for tests shortly following
Marc Hoersken [Sun, 10 May 2020 16:40:24 +0000 (18:40 +0200)] 
test1238: avoid tftpd being busy for tests shortly following

The tftpd server may still be busy if the total timeout of
25 seconds has not been reached or no sread error was received
during or after the execution of the timeout test 1238.

Once the next TFTP test comes around (eg. 1242 or 1243),
those will fail because the tftpd server is still waiting
on data from curl due to the UDP protocol being stateless
and having no connection close. On Linux this error may not
happen, because ICMP errors generated due to a swrite error
can also be returned async on the next sread call instead.

Therefore we will now just kill the tftpd server after test
1238 to make sure that the following tests are not affected.

This enables us to no longer ignore tests 1242, 1243, 2002
and 2003 on the CI platforms CirrusCI and AppVeyor.

Assisted-by: Peter Wu
Closes #5364

5 years agowrite-out.d: added "response_code"
Daniel Stenberg [Mon, 11 May 2020 15:47:01 +0000 (17:47 +0200)] 
write-out.d: added "response_code"

5 years agoKNOWN_BUGS: Build with staticly built dependency
Daniel Stenberg [Mon, 11 May 2020 09:24:33 +0000 (11:24 +0200)] 
KNOWN_BUGS: Build with staticly built dependency

I rewrote the item 5.4 to be more generic about static dependencies.

5 years agoROADMAP: remove old entries
Daniel Stenberg [Mon, 11 May 2020 08:12:04 +0000 (10:12 +0200)] 
ROADMAP: remove old entries

MQTT - the start has already landed

tiny-curl - also mostly landed and is a continuous work

make menuconfig - basically no interest from users, not pushing there

5 years agotravis: Add ngtcp2 and quiche tests for CMake
Peter Wu [Fri, 8 May 2020 22:18:29 +0000 (00:18 +0200)] 
travis: Add ngtcp2 and quiche tests for CMake

To avoid an explosion of jobs, extend the existing CMake tests with
ngtcp2 and quiche support. macOS was previously moved to GitHub actions,
so the non-Linux case can be dropped.

5 years agoCMake: add ENABLE_ALT_SVC option
Peter Wu [Fri, 8 May 2020 22:16:39 +0000 (00:16 +0200)] 
CMake: add ENABLE_ALT_SVC option

Tested alt-svc with quiche. While at it, add missing MultiSSL reporting
(not tested).

5 years agoCMake: add HTTP/3 support (ngtcp2+nghttp3, quiche)
Peter Wu [Fri, 8 May 2020 21:13:46 +0000 (23:13 +0200)] 
CMake: add HTTP/3 support (ngtcp2+nghttp3, quiche)

Add three new CMake Find modules (using the curl license, but I grant
others the right to apply the CMake BSD license instead).

This CMake config is simpler than the autotools one because it assumes
ngtcp2 and nghttp3 to be used together. Another difference is that this
CMake config checks whether QUIC is actually supported by the TLS
library (patched OpenSSL or boringssl) since this can be a common
configuration mistake that could result in build errors later.

Unlike autotools, CMake does not warn you that the features are
experimental. The user is supposed to already know that and read the
documentation. It requires a very special build environment anyway.

Tested with ngtcp2+OpenSSL+nghttp3 and quiche+boringssl, both built from
current git master. Use `LD_DEBUG=files src/curl |& grep need` to figure
out which features (libldap-2.4, libssh2) to disable due to conflicts
with boringssl.

Closes #5359

5 years agotests/server/tftpd.c: fix include and enhance debug logging
Marc Hoersken [Sun, 10 May 2020 15:58:29 +0000 (17:58 +0200)] 
tests/server/tftpd.c: fix include and enhance debug logging

setjmp.h should only be included if HAVE_SETJMP_H is defined.

Add additional log statements to see wether reads and writes
are blocking or finishing before an alarm signal is received.

Assisted-by: Peter Wu
Part of #5364

5 years agotool_operate: only set CURLOPT_SSL_OPTIONS if SSL support is present
Daniel Stenberg [Sun, 10 May 2020 09:51:42 +0000 (11:51 +0200)] 
tool_operate: only set CURLOPT_SSL_OPTIONS if SSL support is present

Reported-by: Marcel Raad
Follow-up to 148534db5
Fixes #5367
Closes #5369

5 years agoappveyor: update comments to be clear about toolchain
Marc Hoersken [Sat, 9 May 2020 16:04:38 +0000 (18:04 +0200)] 
appveyor: update comments to be clear about toolchain

- CMake-based MSYS builds use mingw-w64 to cross-compile.
- autotools-based builds are compiled using msys2-devel.

The difference is that the later ones are not cross-compiled
to Windows and instead require the msys2 runtime to be present.

At the moment only the Azure Pipelines CI builds actually
run autotools-based cross-compilation builds for Windows.

5 years agoTODO: update regarding missing Schannel features
Marc Hoersken [Fri, 8 May 2020 18:49:22 +0000 (20:49 +0200)] 
TODO: update regarding missing Schannel features

Some aspects have already been implemented over the years.

15.1 Client certificates are now supported:

- System stores via e35b0256eb34f1fe562e3e2a2615beb50a391c52
- PKCS#12 files via 0fdf96512613574591f501d63fe49495ba40e1d5

15.2 Ciphers can now be specified through:

- Algorithms via 9aefbff30d280c60fc9d8cc3e0b2f19fc70a2f28

Reviewed-by: Daniel Stenberg and Marcel Raad
Closes #5358

5 years agochecksrc: close the .checksrc file handle when done reading
Daniel Stenberg [Fri, 8 May 2020 08:25:38 +0000 (10:25 +0200)] 
checksrc: close the .checksrc file handle when done reading

5 years agoRELEASE-NOTES: synced
Daniel Stenberg [Fri, 8 May 2020 14:01:39 +0000 (16:01 +0200)] 
RELEASE-NOTES: synced

And bumped next version to 7.71.0

5 years agoCURLOPT_SSL_OPTIONS: add *_NATIVE_CA to use Windows CA store (with openssl)
Gilles Vollant [Fri, 13 Sep 2019 09:24:00 +0000 (11:24 +0200)] 
CURLOPT_SSL_OPTIONS: add *_NATIVE_CA to use Windows CA store (with openssl)

Closes #4346

5 years agoTODO: native IDN support on macOS
Daniel Stenberg [Fri, 8 May 2020 09:46:05 +0000 (11:46 +0200)] 
TODO: native IDN support on macOS

5 years agourlapi: accept :: as a valid IPv6 address
Daniel Stenberg [Thu, 7 May 2020 10:24:27 +0000 (12:24 +0200)] 
urlapi: accept :: as a valid IPv6 address

Text 1560 is extended to verify.

Reported-by: Pavel Volgarev
Fixes #5344
Closes #5351

5 years agoTHANKS-filter: Peter Wang
Daniel Stenberg [Fri, 8 May 2020 06:39:17 +0000 (08:39 +0200)] 
THANKS-filter: Peter Wang

5 years ago*_sspi: fix bad uses of CURLE_NOT_BUILT_IN
Peter Wang [Fri, 8 May 2020 00:43:45 +0000 (10:43 +1000)] 
*_sspi: fix bad uses of CURLE_NOT_BUILT_IN

Return CURLE_AUTH_ERROR instead of CURLE_NOT_BUILT_IN for other
instances of QuerySecurityPackageInfo failing, as in
commit 2a81439553286f12cd04a4bdcdf66d8e026d8201.

Closes #5355

5 years agodocs/HTTP3: add qlog to the quiche build instruction
Daniel Stenberg [Thu, 7 May 2020 15:40:01 +0000 (17:40 +0200)] 
docs/HTTP3: add qlog to the quiche build instruction

5 years agongtcp2: introduce qlog support
Daniel Stenberg [Thu, 7 May 2020 12:17:42 +0000 (14:17 +0200)] 
ngtcp2: introduce qlog support

If the QLOGDIR environment variable is set, enable qlogging.

... and create Curl_qlogdir() in the new generic vquic/vquic.c file for
QUIC functions that are backend independent.

Closes #5353

5 years agontlm_sspi: fix bad use of CURLE_NOT_BUILT_IN
Daniel Stenberg [Thu, 7 May 2020 07:44:00 +0000 (09:44 +0200)] 
ntlm_sspi: fix bad use of CURLE_NOT_BUILT_IN

That return code is reserved for build-time conditional code not being
present while this was a regular run-time error from a Windows API.

Reported-by: wangp on github
Fixes #5349
Closes #5350

5 years agoruntests: show elapsed test time with higher precision (ms)
Daniel Stenberg [Thu, 7 May 2020 10:23:40 +0000 (12:23 +0200)] 
runtests: show elapsed test time with higher precision (ms)

5 years agoRELEASE-NOTES: synced
Daniel Stenberg [Thu, 7 May 2020 08:12:33 +0000 (10:12 +0200)] 
RELEASE-NOTES: synced

5 years agohttp2: simplify and clean up trailer handling
Daniel Stenberg [Wed, 6 May 2020 21:31:43 +0000 (23:31 +0200)] 
http2: simplify and clean up trailer handling

Triggered by a crash detected by OSS-Fuzz after the dynbuf introduction in
ed35d6590e72. This should make the trailer handling more straight forward and
hopefully less error-prone.

Deliver the trailer header to the callback already at receive-time. No
longer caches the trailers to get delivered at end of stream.

Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=22030
Closes #5348

5 years agoappveyor: disable test 1139 instead of ignoring it
Marc Hoersken [Thu, 7 May 2020 04:51:22 +0000 (06:51 +0200)] 
appveyor: disable test 1139 instead of ignoring it

Spending time on manpage checking makes no sense
for these builds due to lacking manpage support.

5 years agoappveyor: disable flaky test 1501 and ignore broken 1056
Marc Hoersken [Thu, 7 May 2020 04:45:26 +0000 (06:45 +0200)] 
appveyor: disable flaky test 1501 and ignore broken 1056

Test 1501 is flaky on Windows CI due to being time sensitive
and the testsuite relying on taskkill.exe to check for the
existance of processes which can take to much time itself.

Test 1056 is broken in autotools-based Windows builds due
to scope ID support missing in these builds at the moment.

5 years agotest613.pl: make tests 613 and 614 work with OpenSSH for Windows
Marc Hoersken [Tue, 5 May 2020 20:05:49 +0000 (22:05 +0200)] 
test613.pl: make tests 613 and 614 work with OpenSSH for Windows

OpenSSH for Windows shows group and other/world permissions as *,
because those concepts do not exist on Windows. It also does not
show the current or parent directory, so we just ignore those.

Reviewed-by: Daniel Stenberg
Closes #5328

5 years agoruntests: set +x mode again
Daniel Stenberg [Wed, 6 May 2020 06:14:47 +0000 (08:14 +0200)] 
runtests: set +x mode again

5 years agolibssh2: convert over to use dynbuf
Daniel Stenberg [Mon, 4 May 2020 12:44:07 +0000 (14:44 +0200)] 
libssh2: convert over to use dynbuf

In my very basic test that lists sftp://127.0.0.1/tmp/, this patched
code makes 161 allocations compared to 194 in git master. A 17%
reduction.

Closes #5336

5 years agotravis: add "qlog" as feature in the quiche build
Daniel Stenberg [Tue, 5 May 2020 11:10:23 +0000 (13:10 +0200)] 
travis: add "qlog" as feature in the quiche build

5 years agoquiche: enable qlog output
Daniel Stenberg [Mon, 4 May 2020 16:57:34 +0000 (17:57 +0100)] 
quiche: enable qlog output

quiche has the potential to log qlog files. To enable this, you must
build quiche with the qlog feature enabled `cargo build --features
qlog`. curl then passes a file descriptor to quiche, which takes
ownership of the file. The FD transfer only works on UNIX.

The convention is to enable logging when the QLOGDIR environment is
set. This should be a path to a folder where files are written with the
naming template <SCID>.qlog.

Co-authored-by: Lucas Pardue
Replaces #5337
Closes #5341

5 years agourldata.h: remove #define HEADERSIZE, not used anymore
Daniel Stenberg [Mon, 4 May 2020 14:52:24 +0000 (16:52 +0200)] 
urldata.h: remove #define HEADERSIZE, not used anymore

Follow-up to ed35d6590e72c

5 years agongtcp2: convert to dynbuf
Daniel Stenberg [Mon, 4 May 2020 09:37:12 +0000 (11:37 +0200)] 
ngtcp2: convert to dynbuf

Closes #5335

5 years agoconnect: make happy eyeballs work for QUIC (again)
Daniel Stenberg [Mon, 4 May 2020 10:35:18 +0000 (12:35 +0200)] 
connect: make happy eyeballs work for QUIC (again)

Follow-up from dbd16c3e256c6c (regression in 7.70.0)

Closes #5334

5 years agoconnect: add two asserts to clue code analyzers in a little
Daniel Stenberg [Mon, 4 May 2020 09:03:29 +0000 (11:03 +0200)] 
connect: add two asserts to clue code analyzers in a little

5 years agohttp_proxy: ported to use dynbuf instead of a static size buffer
Daniel Stenberg [Sat, 2 May 2020 15:04:08 +0000 (17:04 +0200)] 
http_proxy: ported to use dynbuf instead of a static size buffer

Removes a 16K static buffer from the easy handle. Simplifies the code.

5 years agodynbuf: introduce internal generic dynamic buffer functions
Daniel Stenberg [Sat, 2 May 2020 15:04:08 +0000 (17:04 +0200)] 
dynbuf: introduce internal generic dynamic buffer functions

A common set of functions instead of many separate implementations for
creating buffers that can grow when appending data to them. Existing
functionality has been ported over.

In my early basic testing, the total number of allocations seem at
roughly the same amount as before, possibly a few less.

See docs/DYNBUF.md for a description of the API.

Closes #5300

5 years agoruntests: remove sleep calls
Daniel Stenberg [Sat, 2 May 2020 14:31:52 +0000 (16:31 +0200)] 
runtests: remove sleep calls

Remove many one second sleeps that were done *after* each newly started
test server already has been verified. They should not have any purpose
there.

Closes #5323

5 years agoasyn-*: remove support for never-used NULL entry pointers
Daniel Stenberg [Sat, 2 May 2020 14:59:38 +0000 (16:59 +0200)] 
asyn-*: remove support for never-used NULL entry pointers

... and instead convert those to asserts to make sure they are truly
never NULL.

Closes #5324

5 years agodoc: Rename VERSIONS to VERSIONS.md as it already has Markdown syntax
Emil Engler [Sat, 2 May 2020 15:30:33 +0000 (17:30 +0200)] 
doc: Rename VERSIONS to VERSIONS.md as it already has Markdown syntax

Closes #5325

5 years agoasyn-thread: fix cppcheck warning
Jay Satiro [Sat, 2 May 2020 18:53:09 +0000 (14:53 -0400)] 
asyn-thread: fix cppcheck warning

- Check for NULL entry parameter before attempting to deref entry in
  Curl_resolver_is_resolved, like is already done in asyn-ares.

This is to silence cppcheck which does not seem to understand that
asyn-ares and asyn-thread have separate Curl_resolver_is_resolved
and those units are mutually exclusive. Prior to this change it warned
of a scenario where asyn-thread's Curl_resolver_is_resolved is called
with a NULL entry from asyn-ares, but that couldn't happen.

Reported-by: rl1987@users.noreply.github.com
Fixes https://github.com/curl/curl/issues/5326

5 years agoselect: fix overflow protection in Curl_socket_check
Jay Satiro [Thu, 23 Apr 2020 19:08:56 +0000 (15:08 -0400)] 
select: fix overflow protection in Curl_socket_check

Follow-up to a96c752 which changed the timeout_ms type from time_t to
timediff_t.

Ref: https://github.com/curl/curl/pull/5240

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

5 years agosockfilt: make select_ws stop waiting on exit signal event
Marc Hoersken [Sat, 18 Apr 2020 19:54:40 +0000 (21:54 +0200)] 
sockfilt: make select_ws stop waiting on exit signal event

This makes sure that select_ws behaves similar to real select
which stops waiting on a signal handler being triggered.

This makes it possible to gracefully stop sockfilt.exe on
Windows with taskkill /IM sockfilt.exe (without /F force flag).

Reviewed-by: Jay Satiro
Part of #5260

5 years agotests/server/util.[ch]: add exit event to stop waiting on Windows
Marc Hoersken [Sat, 18 Apr 2020 19:51:19 +0000 (21:51 +0200)] 
tests/server/util.[ch]: add exit event to stop waiting on Windows

This commit adds a global exit event to the test servers that
Windows-specific wait routines can use to get triggered if the
program was signaled to be terminated, eg. select_ws in sockfilt.c

The exit event will be managed by the signal handling code and is
set to not reset automatically to support multiple wait routines.

Reviewed-by: Jay Satiro
Closes #5260

5 years agotests/server/util.c: fix thread handle not being closed
Marc Hoersken [Sat, 18 Apr 2020 19:46:14 +0000 (21:46 +0200)] 
tests/server/util.c: fix thread handle not being closed

Reviewed-by: Jay Satiro
Part of #5260

5 years agotests/server/util.c: use raise instead of calling signal handler
Marc Hoersken [Sat, 18 Apr 2020 19:42:05 +0000 (21:42 +0200)] 
tests/server/util.c: use raise instead of calling signal handler

Use raise to trigger signal handler instead of calling it
directly and causing potential unexpected control flow.

Reviewed-by: Jay Satiro
Part of #5260

5 years agotests: add support for SSH server variant specific transfer paths
Marc Hoersken [Sun, 26 Apr 2020 16:31:00 +0000 (18:31 +0200)] 
tests: add support for SSH server variant specific transfer paths

OpenSSH for Windows requires paths in the format of /C:/
instead of the pseudo-POSIX paths /cygdrive/c/ or just /c/

Reviewed-by: Daniel Stenberg
Closes #5298

5 years agoRELEASE-NOTES: synced
Daniel Stenberg [Sat, 2 May 2020 14:42:34 +0000 (16:42 +0200)] 
RELEASE-NOTES: synced

5 years agolibssh2: set the expected total size in SCP upload init
Daniel Stenberg [Fri, 1 May 2020 15:42:19 +0000 (17:42 +0200)] 
libssh2: set the expected total size in SCP upload init

... as otherwise the progress callback gets called without that
information, making the progress meter have less info.

Reported-by: Murugan Balraj
Bug: https://curl.haxx.se/mail/archive-2020-05/0000.html
Closes #5317

5 years agoruntests: make the logmsg from the ssh server only show in verbose
Daniel Stenberg [Sat, 2 May 2020 13:51:05 +0000 (15:51 +0200)] 
runtests: make the logmsg from the ssh server only show in verbose

5 years agotests: make test 1248 + 1249 use %NOLISTENPORT
Daniel Stenberg [Fri, 1 May 2020 21:06:46 +0000 (23:06 +0200)] 
tests: make test 1248 + 1249 use %NOLISTENPORT

... instead of a port of a non-running server so that it works
stand-alone.

Closes #5318

5 years agoexamples: remove asiohiper.cpp
Daniel Stenberg [Sat, 2 May 2020 09:55:24 +0000 (11:55 +0200)] 
examples: remove asiohiper.cpp

This example has repeatedly been reported to contain bugs, and as users
copy and paste code from this into production, I now deem it better to
not provide the example at all.

Closes #5090
Closes #5322

5 years agodoc: add missing closing parenthesis in CURLINFO_SSL_VERIFYRESULT.3
Emil Engler [Sat, 2 May 2020 06:49:33 +0000 (08:49 +0200)] 
doc: add missing closing parenthesis in CURLINFO_SSL_VERIFYRESULT.3

Closes #5320

5 years agoKNOWN_BUGS: Remove "curl --upload-file . hang if delay in STDIN"
Emil Engler [Sat, 2 May 2020 06:38:17 +0000 (08:38 +0200)] 
KNOWN_BUGS: Remove "curl --upload-file . hang if delay in STDIN"

It was fixed in 9a2cbf3

Closes #5319

5 years agocirrus: disable SFTP and SCP tests
Daniel Stenberg [Thu, 30 Apr 2020 15:42:18 +0000 (17:42 +0200)] 
cirrus: disable SFTP and SCP tests

... as we can't seem to start the sshd server on it. Those problems
existed before d1239b50bececd (running the SSH server on a random port),
but they're more noticable now since there are more failed attempts in
the logs.

Closes #5315

5 years agoruntests: fix typo in the existence of disabled tests checker
Emil Engler [Thu, 30 Apr 2020 18:04:50 +0000 (20:04 +0200)] 
runtests: fix typo in the existence of disabled tests checker

Closes #5316

5 years agotest75: Remove precheck test
Dan Fandrich [Thu, 30 Apr 2020 14:56:59 +0000 (16:56 +0200)] 
test75: Remove precheck test

This has not been needed since commit 9fa42bed and often prevents it
from running at all with dynamic test ports.

5 years agotests: Stop referring to server ports when they're not used 5314/head
Dan Fandrich [Thu, 30 Apr 2020 14:00:31 +0000 (16:00 +0200)] 
tests: Stop referring to server ports when they're not used

Several tests referred to specific server ports even when the test
didn't actually use that server or specify that it's needed. In such
cases, the test harness substitutes the text "[not running]" as the port
number which causes many such tests to fail due to the inability to
parse the URL.  These tests are changed to use %NOLISTENPORT which will
always be substituted correctly.

5 years agoGnuTLS: Backend support for CURLINFO_SSL_VERIFYRESULT
Emil Engler [Thu, 23 Apr 2020 19:36:35 +0000 (21:36 +0200)] 
GnuTLS: Backend support for CURLINFO_SSL_VERIFYRESULT

Closes #5287

5 years agoconncache: various concept cleanups
Daniel Stenberg [Sun, 26 Apr 2020 22:33:21 +0000 (00:33 +0200)] 
conncache: various concept cleanups

More connection cache accesses are protected by locks.

CONNCACHE_* is a beter prefix for the connection cache lock macros.

Curl_attach_connnection: now called as soon as there's a connection
struct available and before the connection is added to the connection
cache.

Curl_disconnect: now assumes that the connection is already removed from
the connection cache.

Ref: #4915
Closes #5009

5 years agotests: tests: run stunnel for HTTPS and FTPS on dynamic ports
Daniel Stenberg [Tue, 21 Apr 2020 07:57:22 +0000 (09:57 +0200)] 
tests: tests: run stunnel for HTTPS and FTPS on dynamic ports

As stunnel is an external tool and it has no specific option to export
the actually used port number when asked to listen to 0, runtests
instead iterates over ten randomly picked high number ports and sticks
to the first one stunnel can listen to.

Closes #5267

5 years agotests: pick a random port number for SSH
Daniel Stenberg [Mon, 20 Apr 2020 13:10:24 +0000 (15:10 +0200)] 
tests: pick a random port number for SSH

Since sshd doesn't have such an option by itself, we iterate over a
series of random ports until one works.

Closes #5273

5 years agolibtest/cmake: Remove commented code
Rikard Falkeborn [Tue, 28 Apr 2020 21:43:49 +0000 (23:43 +0200)] 
libtest/cmake: Remove commented code

These were commented out in e9dd0998706a when Makefile.inc was included
instead. 11 years have passed since then and the commented code is of
course very outdated. Remove it to avoid confusion.

Closes #5311

5 years agoschannel: source code reindent
Daniel Stenberg [Mon, 27 Apr 2020 15:09:27 +0000 (17:09 +0200)] 
schannel: source code reindent

White space edits only. Conform better to standard curl source code
indenting style.

Closes #5305

5 years agotest1177: look for curl.h in source directory
Kamil Dudka [Wed, 29 Apr 2020 11:27:20 +0000 (13:27 +0200)] 
test1177: look for curl.h in source directory

If we use a separate build directory, there is no copy of the header.

Closes #5310

5 years agotests: look for preprocessed tests in build directory
Kamil Dudka [Wed, 29 Apr 2020 11:26:14 +0000 (13:26 +0200)] 
tests: look for preprocessed tests in build directory

... which is not always the same directory as source directory

Closes #5310

5 years agoRELEASE-NOTES: synced
Daniel Stenberg [Wed, 29 Apr 2020 10:21:09 +0000 (12:21 +0200)] 
RELEASE-NOTES: synced

... and bumped curlver.h to 7.70.1

5 years agoRELEASE-NOTES: 7.70.0 curl-7_70_0
Daniel Stenberg [Wed, 29 Apr 2020 06:01:49 +0000 (08:01 +0200)] 
RELEASE-NOTES: 7.70.0

5 years agoTHANKS: synced with the 7.70.0 release
Daniel Stenberg [Wed, 29 Apr 2020 06:01:48 +0000 (08:01 +0200)] 
THANKS: synced with the 7.70.0 release