]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
5 years agotests: make it possible to set executable extensions 3899/head
Marc Hoersken [Sat, 18 May 2019 21:32:04 +0000 (23:32 +0200)] 
tests: make it possible to set executable extensions

This enables the use of Windows Subsystem for Linux (WSL) to run the
testsuite against Windows binaries while using Linux servers.

This commit introduces the following environment variables:
- CURL_TEST_EXE_EXT: set the executable extension for all components
- CURL_TEST_EXE_EXT_TOOL: set it for the curl tool only
- CURL_TEST_EXE_EXT_SSH: set it for the SSH tools only

Later testcurl.pl could be adjusted to make use of those variables.
- CURL_TEST_EXE_EXT_SRV: set it for the test servers only

(This is one of several commits to support use of WSL for the tests.)

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

5 years agotests: fix permissions of ssh keys in WSL
Marc Hoersken [Sat, 18 May 2019 21:28:09 +0000 (23:28 +0200)] 
tests: fix permissions of ssh keys in WSL

Keys created on Windows Subsystem for Linux (WSL) require it for some
reason.

(This is one of several commits to support use of WSL for the tests.)

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

5 years agotests: use \r\n for log messages in WSL
Marc Hoersken [Sat, 18 May 2019 21:26:48 +0000 (23:26 +0200)] 
tests: use \r\n for log messages in WSL

Bash in Windows Subsystem for Linux (WSL) requires it for some reason.

(This is one of several commits to support use of WSL for the tests.)

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

5 years agowinbuild: Define CARES_STATICLIB when WITH_CARES=static
andrew_ishchuk [Mon, 9 Dec 2019 11:00:20 +0000 (16:00 +0500)] 
winbuild: Define CARES_STATICLIB when WITH_CARES=static

When libcurl is built with MODE=static, c-ares is forced into static
linkage too. That doesn't happen when MODE=dll so linker would break
over undefined symbols.

closes https://github.com/curl/curl/pull/4688

5 years agoconn: always set bits.close with connclose()
Daniel Stenberg [Mon, 9 Dec 2019 11:03:05 +0000 (12:03 +0100)] 
conn: always set bits.close with connclose()

Closes #4690

5 years agocirrus: enable clang sanitizers on freebsd 13
Daniel Stenberg [Mon, 9 Dec 2019 10:53:54 +0000 (11:53 +0100)] 
cirrus: enable clang sanitizers on freebsd 13

5 years agoconncache: fix multi-thread use of shared connection cache
Daniel Stenberg [Mon, 9 Dec 2019 10:53:54 +0000 (11:53 +0100)] 
conncache: fix multi-thread use of shared connection cache

It could accidentally let the connection get used by more than one
thread, leading to double-free and more.

Reported-by: Christopher Reid
Fixes #4544
Closes #4557

5 years agoazure: add a vanilla macos build
Daniel Stenberg [Mon, 9 Dec 2019 09:08:46 +0000 (10:08 +0100)] 
azure: add a vanilla macos build

Closes #4685

5 years agocurl: make the etag load logic work without fseek
Daniel Stenberg [Fri, 6 Dec 2019 16:24:52 +0000 (17:24 +0100)] 
curl: make the etag load logic work without fseek

The fseek()s were unnecessary and caused Coverity warning CID 1456554

Closes #4681

5 years agomailmap: Mohammad Hasbini
Daniel Stenberg [Fri, 6 Dec 2019 12:22:12 +0000 (13:22 +0100)] 
mailmap: Mohammad Hasbini

5 years agodocs: fix some typos
mhasbini [Fri, 6 Dec 2019 11:56:14 +0000 (13:56 +0200)] 
docs: fix some typos

Closes #4680

5 years agoRELEASE-NOTES: synced
Daniel Stenberg [Fri, 6 Dec 2019 10:36:53 +0000 (11:36 +0100)] 
RELEASE-NOTES: synced

5 years agolib: fix some loose ends for recently added CURLSSLOPT_NO_PARTIALCHAIN
Jay Satiro [Fri, 6 Dec 2019 00:17:31 +0000 (19:17 -0500)] 
lib: fix some loose ends for recently added CURLSSLOPT_NO_PARTIALCHAIN

Add support for CURLSSLOPT_NO_PARTIALCHAIN in CURLOPT_PROXY_SSL_OPTIONS
and OS400 package spec.

Also I added the option to the NameValue list in the tool even though it
isn't exposed as a command-line option (...yet?). (NameValue stringizes
the option name for the curl cmd -> libcurl source generator)

Follow-up to 564d88a which added CURLSSLOPT_NO_PARTIALCHAIN.

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

5 years agosetopt: Fix ALPN / NPN user option when built without HTTP2
Jay Satiro [Wed, 4 Dec 2019 06:10:17 +0000 (01:10 -0500)] 
setopt: Fix ALPN / NPN user option when built without HTTP2

- Stop treating lack of HTTP2 as an unknown option error result for
  CURLOPT_SSL_ENABLE_ALPN and CURLOPT_SSL_ENABLE_NPN.

Prior to this change it was impossible to disable ALPN / NPN if libcurl
was built without HTTP2. Setting either option would result in
CURLE_UNKNOWN_OPTION and the respective internal option would not be
set. That was incorrect since ALPN and NPN are used independent of
HTTP2.

Reported-by: Shailesh Kapse
Fixes https://github.com/curl/curl/issues/4668
Closes https://github.com/curl/curl/pull/4672

5 years agoetag: allow both --etag-compare and --etag-save in same cmdline
Daniel Stenberg [Thu, 5 Dec 2019 15:57:40 +0000 (16:57 +0100)] 
etag: allow both --etag-compare and --etag-save in same cmdline

Fixes #4669
Closes #4678

5 years agocurl_setup: fix `CURLRES_IPV6` condition
Marcel Raad [Thu, 5 Dec 2019 13:13:46 +0000 (14:13 +0100)] 
curl_setup: fix `CURLRES_IPV6` condition

Move the definition of `CURLRES_IPV6` to before undefining
`HAVE_GETADDRINFO`. Regression from commit 67a08dca27a which caused
some tests to fail and others to be skipped with c-ares.

Fixes https://github.com/curl/curl/issues/4673
Closes https://github.com/curl/curl/pull/4677

5 years agotest342: make it return a 304 as the tag matches
Daniel Stenberg [Thu, 5 Dec 2019 15:52:07 +0000 (16:52 +0100)] 
test342: make it return a 304 as the tag matches

5 years agoCMake: add support for building with the NSS vtls backend
Peter Wu [Tue, 26 Nov 2019 22:05:21 +0000 (22:05 +0000)] 
CMake: add support for building with the NSS vtls backend

Options are cross-checked with configure.ac and acinclude.m4.
Tested on Arch Linux, untested on other platforms like Windows or macOS.

Closes #4663
Reviewed-by: Kamil Dudka
5 years agoazure: add more builds
Daniel Stenberg [Tue, 3 Dec 2019 22:21:09 +0000 (23:21 +0100)] 
azure: add more builds

... removed two from travis (that now runs on azure instead)

Closes #4671

5 years agoCURLOPT_VERBOSE.3: see also ERRORBUFFER
Daniel Stenberg [Wed, 4 Dec 2019 08:30:57 +0000 (09:30 +0100)] 
CURLOPT_VERBOSE.3: see also ERRORBUFFER

5 years agohostip4.c: bump copyright year range
Daniel Stenberg [Tue, 3 Dec 2019 22:13:25 +0000 (23:13 +0100)] 
hostip4.c: bump copyright year range

5 years agoconfigure: enable IPv6 support without `getaddrinfo`
Marcel Raad [Sat, 30 Nov 2019 14:49:32 +0000 (15:49 +0100)] 
configure: enable IPv6 support without `getaddrinfo`

This makes it possible to recognize and connect to literal IPv6
addresses when `getaddrinfo` is not available, which is already the
case for the CMake build. This affects e.g. classic MinGW because it
still targets Windows 2000 by default, where `getaddrinfo` is not
available, but general IPv6 support is.

Instead of checking for `getaddrinfo`, check for `sockaddr_in6` as the
CMake build does.

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

5 years agocurl_setup: disable IPv6 resolver without `getaddrinfo`
Marcel Raad [Tue, 26 Nov 2019 14:06:31 +0000 (15:06 +0100)] 
curl_setup: disable IPv6 resolver without `getaddrinfo`

Also, use `CURLRES_IPV6` only for actual DNS resolution, not for IPv6
address support. This makes it possible to connect to IPv6 literals by
setting `ENABLE_IPV6` even without `getaddrinfo` support. It also fixes
the CMake build when using the synchronous resolver without
`getaddrinfo` support.

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

5 years agogithub action/azure pipeline: run 'make test-nonflaky' for tests
Daniel Stenberg [Tue, 3 Dec 2019 18:30:08 +0000 (19:30 +0100)] 
github action/azure pipeline: run 'make test-nonflaky' for tests

To match travis and give more info on failures.

5 years agoopenssl: CURLSSLOPT_NO_PARTIALCHAIN can disable partial cert chains
Daniel Stenberg [Mon, 2 Dec 2019 09:55:33 +0000 (10:55 +0100)] 
openssl: CURLSSLOPT_NO_PARTIALCHAIN can disable partial cert chains

Closes #4655

5 years agoopenssl: set X509_V_FLAG_PARTIAL_CHAIN
Daniel Stenberg [Mon, 2 Dec 2019 09:45:55 +0000 (10:45 +0100)] 
openssl: set X509_V_FLAG_PARTIAL_CHAIN

Have intermediate certificates in the trust store be treated as
trust-anchors, in the same way as self-signed root CA certificates
are. This allows users to verify servers using the intermediate cert
only, instead of needing the whole chain.

Other TLS backends already accept partial chains.

Reported-by: Jeffrey Walton
Bug: https://curl.haxx.se/mail/lib-2019-11/0094.html

5 years agocurl: show better error message when no homedir is found
Daniel Stenberg [Mon, 2 Dec 2019 11:00:41 +0000 (12:00 +0100)] 
curl: show better error message when no homedir is found

Reported-by: Vlastimil Ovčáčík
Fixes #4644
Closes #4665

5 years agoOPENSOCKETFUNCTION.3: correct the purpose description
Daniel Stenberg [Tue, 3 Dec 2019 08:29:43 +0000 (09:29 +0100)] 
OPENSOCKETFUNCTION.3: correct the purpose description

Reported-by: Jeff Mears
Bug: https://curl.haxx.se/mail/lib-2019-12/0007.html

Closes #4667

5 years agotravis: do not use OVERRIDE_CC or OVERRIDE_CXX if empty
Peter Wu [Sat, 30 Nov 2019 18:42:20 +0000 (18:42 +0000)] 
travis: do not use OVERRIDE_CC or OVERRIDE_CXX if empty

Fixes the macOS builds where OVERRIDE_CC and OVERRIDE_CXX are not set.

Reported-by: Jay Satiro
Fixes #4659
Closes #4661
Closes #4664

5 years agoazure-pipelines: fix the test script
Daniel Stenberg [Mon, 2 Dec 2019 14:40:19 +0000 (15:40 +0100)] 
azure-pipelines: fix the test script

5 years agoAzure Pipelines: initial CI setup
Daniel Stenberg [Mon, 2 Dec 2019 14:37:09 +0000 (15:37 +0100)] 
Azure Pipelines: initial CI setup

[skip ci]

5 years agodocs: add "added: 7.68.0" to the --etag-* docs
Daniel Stenberg [Mon, 2 Dec 2019 10:22:32 +0000 (11:22 +0100)] 
docs: add "added: 7.68.0" to the --etag-* docs

5 years agocopyright: fix the year ranges for two files
Daniel Stenberg [Mon, 2 Dec 2019 07:02:05 +0000 (08:02 +0100)] 
copyright: fix the year ranges for two files

Follow-up to 9c1806ae

5 years agobuild: Disable Visual Studio warning "conditional expression is constant"
Jay Satiro [Sat, 30 Nov 2019 08:29:36 +0000 (03:29 -0500)] 
build: Disable Visual Studio warning "conditional expression is constant"

- Disable warning C4127 "conditional expression is constant" globally
  in curl_setup.h for when building with Microsoft's compiler.

This mainly affects building with the Visual Studio project files found
in the projects dir.

Prior to this change the cmake and winbuild build systems already
disabled 4127 globally for when building with Microsoft's compiler.
Also, 4127 was already disabled for all build systems in the limited
circumstance of the WHILE_FALSE macro which disabled the warning
specifically for while(0). This commit removes the WHILE_FALSE macro and
all other cruft in favor of disabling globally in curl_setup.

Background:

We have various macros that cause 0 or 1 to be evaluated, which would
cause warning C4127 in Visual Studio. For example this causes it:

    #define Curl_resolver_asynch() 1

Full behavior is not clearly defined and inconsistent across versions.
However it is documented that since VS 2015 Update 3 Microsoft has
addressed this somewhat but not entirely, not warning on while(true) for
example.

Prior to this change some C4127 warnings occurred when I built with
Visual Studio using the generated projects in the projects dir.

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

5 years agoopenssl: retrieve reported LibreSSL version at runtime
Jay Satiro [Sat, 24 Mar 2018 04:57:42 +0000 (00:57 -0400)] 
openssl: retrieve reported LibreSSL version at runtime

- Retrieve LibreSSL runtime version when supported (>= 2.7.1).

For earlier versions we continue to use the compile-time version.

Ref: https://man.openbsd.org/OPENSSL_VERSION_NUMBER.3

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

5 years agostrerror: Add Curl_winapi_strerror for Win API specific errors
Jay Satiro [Sun, 10 Nov 2019 08:37:38 +0000 (03:37 -0500)] 
strerror: Add Curl_winapi_strerror for Win API specific errors

- In all code call Curl_winapi_strerror instead of Curl_strerror when
  the error code is known to be from Windows GetLastError.

Curl_strerror prefers CRT error codes (errno) over Windows API error
codes (GetLastError) when the two overlap. When we know the error code
is from GetLastError it is more accurate to prefer the Windows API error
messages.

Reported-by: Richard Alcock
Fixes https://github.com/curl/curl/issues/4550
Closes https://github.com/curl/curl/pull/4581

5 years agoglobal_init: undo the "intialized" bump in case of failure
Daniel Stenberg [Thu, 28 Nov 2019 15:21:58 +0000 (16:21 +0100)] 
global_init: undo the "intialized" bump in case of failure

... so that failures in the global init function don't count as a
working init and it can then be called again.

Reported-by: Paul Groke
Fixes #4636
Closes #4653

5 years agoparsedate: offer a getdate_capped() alternative
Daniel Stenberg [Thu, 28 Nov 2019 14:27:58 +0000 (15:27 +0100)] 
parsedate: offer a getdate_capped() alternative

... and use internally. This function will return TIME_T_MAX instead of
failure if the parsed data is found to be larger than what can be
represented. TIME_T_MAX being the largest value curl can represent.

Reviewed-by: Daniel Gustafsson
Reported-by: JanB on github
Fixes #4152
Closes #4651

5 years agodocs: add more references to curl_multi_poll
Daniel Stenberg [Thu, 28 Nov 2019 14:56:12 +0000 (15:56 +0100)] 
docs: add more references to curl_multi_poll

Fixes #4643
Closes #4652

5 years agosha256: bump the copyright year range
Daniel Stenberg [Thu, 28 Nov 2019 21:27:45 +0000 (22:27 +0100)] 
sha256: bump the copyright year range

Follow-up from 66e21520f

5 years agocurl_setup_once: consistently use WHILE_FALSE in macros
Daniel Gustafsson [Thu, 28 Nov 2019 15:02:13 +0000 (16:02 +0100)] 
curl_setup_once: consistently use WHILE_FALSE in macros

The WHILE_FALSE construction is used to avoid compiler warnings in
macro constructions. This fixes a few instances where it was not
used in order to keep the code consistent.

Closes #4649
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
5 years agohttp_ntlm: Remove duplicate NSS initialisation
Steve Holme [Wed, 8 May 2019 13:40:16 +0000 (14:40 +0100)] 
http_ntlm: Remove duplicate NSS initialisation

Given that this is performed by the NTLM code there is no need to
perform the initialisation in the HTTP layer. This also keeps the
initialisation the same as the SASL based protocols and also fixes a
possible compilation issue if both NSS and SSPI were to be used as
multiple SSL backends.

Reviewed-by: Kamil Dudka
Closes #3935

5 years agochecksrc: fix regexp for ASSIGNWITHINCONDITION
Daniel Gustafsson [Thu, 28 Nov 2019 13:16:02 +0000 (14:16 +0100)] 
checksrc: fix regexp for ASSIGNWITHINCONDITION

The regexp looking for assignments within conditions was too greedy
and matched a too long string in the case of multiple conditionals
on the same line. This is basically only a problem in single line
macros, and the code which exemplified this was essentially:

  do { if((x) != NULL) { x = NULL; } } while(0)

..where the final parenthesis of while(0) matched the regexp, and
the legal assignment in the block triggered the warning. Fix by
making the regexp less greedy by matching for the tell-tale signs
of the if statement ending.

Also remove the one occurrence where the warning was disabled due
to a construction like the above, where the warning didn't apply
when fixed.

Closes #4647
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
5 years agoRELEASE-NOTES: synced
Daniel Stenberg [Thu, 28 Nov 2019 12:28:14 +0000 (13:28 +0100)] 
RELEASE-NOTES: synced

5 years agocurl: two new command line options for etags
Maros Priputen [Wed, 30 Oct 2019 08:43:14 +0000 (09:43 +0100)] 
curl: two new command line options for etags

--etag-compare and --etag-save

Suggested-by: Paul Hoffman
Fixes #4277
Closes #4543

5 years agodocs: fix typos
Daniel Gustafsson [Thu, 28 Nov 2019 11:57:58 +0000 (12:57 +0100)] 
docs: fix typos

5 years agomailmap: Niall O'Reilly's name
Daniel Stenberg [Thu, 28 Nov 2019 11:52:00 +0000 (12:52 +0100)] 
mailmap: Niall O'Reilly's name

5 years agodoh: use dedicated probe slots
Niall [Thu, 21 Nov 2019 12:15:44 +0000 (12:15 +0000)] 
doh: use dedicated probe slots

... to easier allow additional DNS transactions.

Closes #4629

5 years agotravis: build ngtcp2 with --enable-lib-only
Daniel Stenberg [Wed, 27 Nov 2019 23:40:31 +0000 (00:40 +0100)] 
travis: build ngtcp2 with --enable-lib-only

... makes it skip the examples and other stuff we don't neeed.

Closes #4646

5 years agongtcp2: fix thread-safety bug in error-handling
David Benjamin [Wed, 27 Nov 2019 21:53:51 +0000 (16:53 -0500)] 
ngtcp2: fix thread-safety bug in error-handling

ERR_error_string(NULL) should never be called. It places the error in a
global buffer, which is not thread-safe. Use ERR_error_string_n with a
local buffer instead.

Closes #4645

5 years agotravis: export the CC/CXX variables when set
Daniel Stenberg [Tue, 26 Nov 2019 22:16:49 +0000 (23:16 +0100)] 
travis: export the CC/CXX variables when set

Suggested-by: Peter Wu
Fixes #4637
Closes #4640

5 years agodist: add error-codes.pl
Marcel Raad [Tue, 26 Nov 2019 10:31:57 +0000 (11:31 +0100)] 
dist: add error-codes.pl

Follow-up to commit 74f441c6d31.
This should fix test 1175 when run via the daily source tarballs.

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

5 years agocurl: fix --upload-file . hangs if delay in STDIN
John Schroeder [Tue, 26 Nov 2019 08:16:19 +0000 (09:16 +0100)] 
curl: fix --upload-file . hangs if delay in STDIN

Attempt to unpause a busy read in the CURLOPT_XFERINFOFUNCTION.

When uploading from stdin in non-blocking mode, a delay in reading
the stream (EAGAIN) causes curl to pause sending data
(CURL_READFUNC_PAUSE).  Prior to this change, a busy read was
detected and unpaused only in the CURLOPT_WRITEFUNCTION handler.
This change performs the same busy read handling in a
CURLOPT_XFERINFOFUNCTION handler.

Fixes #2051
Closes #4599
Reported-by: bdry on github
5 years agoXFERINFOFUNCTION: support CURL_PROGRESSFUNC_CONTINUE
John Schroeder [Tue, 26 Nov 2019 08:13:11 +0000 (09:13 +0100)] 
XFERINFOFUNCTION: support CURL_PROGRESSFUNC_CONTINUE

(also for PROGRESSFUNCTION)

By returning this value from the callback, the internal progress
function call is still called afterward.

Closes #4599

5 years agoTLS: add BearSSL vtls implementation
Michael Forney [Fri, 8 Nov 2019 04:17:18 +0000 (20:17 -0800)] 
TLS: add BearSSL vtls implementation

Closes #4597

5 years agocurl_multi_wakeup.3: add example and AVAILABILITY
Daniel Stenberg [Mon, 25 Nov 2019 15:09:34 +0000 (16:09 +0100)] 
curl_multi_wakeup.3: add example and AVAILABILITY

Reviewed-by: Gergely Nagy
Closes #4635

5 years agomulti: add curl_multi_wakeup()
Gergely Nagy [Sun, 17 Nov 2019 14:12:15 +0000 (15:12 +0100)] 
multi: add curl_multi_wakeup()

This commit adds curl_multi_wakeup() which was previously in the TODO
list under the curl_multi_unblock name.

On some platforms and with some configurations this feature might not be
available or can fail, in these cases a new error code
(CURLM_WAKEUP_FAILURE) is returned from curl_multi_wakeup().

Fixes #4418
Closes #4608

5 years agoschannel: fix --tls-max for when min is --tlsv1 or default
Xiaoyin Liu [Sat, 23 Nov 2019 17:29:46 +0000 (01:29 +0800)] 
schannel: fix --tls-max for when min is --tlsv1 or default

Prior to this change schannel ignored --tls-max (CURL_SSLVERSION_MAX_
macros) when --tlsv1 (CURL_SSLVERSION_TLSv1) or default TLS
(CURL_SSLVERSION_DEFAULT), using a max of TLS 1.2 always.

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

5 years agochecksrc.bat: Add a check for vquic and vssh directories
Jay Satiro [Sun, 24 Nov 2019 07:53:05 +0000 (02:53 -0500)] 
checksrc.bat: Add a check for vquic and vssh directories

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

5 years agoprojects: Fix Visual Studio projects SSH builds
Jay Satiro [Sun, 17 Nov 2019 08:08:40 +0000 (03:08 -0500)] 
projects: Fix Visual Studio projects SSH builds

- Generate VQUIC and VSSH filenames in Visual Studio project files.

Prior to this change generated Visual Studio project configurations that
enabled SSH did not build properly. Broken since SSH files were moved to
lib/vssh 3 months ago in 5b2d703.

Fixes https://github.com/curl/curl/issues/4492
Fixes https://github.com/curl/curl/issues/4630
Closes https://github.com/curl/curl/pull/4607

5 years agoRELEASE-NOTES: synced
Daniel Stenberg [Sat, 23 Nov 2019 19:45:52 +0000 (20:45 +0100)] 
RELEASE-NOTES: synced

5 years agoopenssl: Revert to less sensitivity for SYSCALL errors
Jay Satiro [Wed, 20 Nov 2019 23:44:18 +0000 (18:44 -0500)] 
openssl: Revert to less sensitivity for SYSCALL errors

- Disable the extra sensitivity except in debug builds (--enable-debug).

- Improve SYSCALL error message logic in ossl_send and ossl_recv so that
  "No error" / "Success" socket error text isn't shown on SYSCALL error.

Prior to this change 0ab38f5 (precedes 7.67.0) increased the sensitivity
of OpenSSL's SSL_ERROR_SYSCALL error so that abrupt server closures were
also considered errors. For example, a server that does not send a known
protocol termination point (eg HTTP content length or chunked encoding)
_and_ does not send a TLS termination point (close_notify alert) would
cause an error if it closed the connection.

To be clear that behavior made it into release build 7.67.0
unintentionally. Several users have reported it as an issue.

Ultimately the idea is a good one, since it can help prevent against a
truncation attack. Other SSL backends may already behave similarly (such
as Windows native OS SSL Schannel). However much more of our user base
is using OpenSSL and there is a mass of legacy users in that space, so I
think that behavior should be partially reverted and then rolled out
slowly.

This commit changes the behavior so that the increased sensitivity is
disabled in all curl builds except curl debug builds (DEBUGBUILD). If
after a period of time there are no major issues then it can be enabled
in dev and release builds with the newest OpenSSL (1.1.1+), since users
using the newest OpenSSL are the least likely to have legacy problems.

Bug: https://github.com/curl/curl/issues/4409#issuecomment-555955794
Reported-by: Bjoern Franke
Fixes https://github.com/curl/curl/issues/4624
Closes https://github.com/curl/curl/pull/4623

5 years agoopenssl: improve error message for SYSCALL during connect
Daniel Stenberg [Thu, 14 Nov 2019 13:19:04 +0000 (14:19 +0100)] 
openssl: improve error message for SYSCALL during connect

Reported-by: Paulo Roberto Tomasi
Bug: https://curl.haxx.se/mail/archive-2019-11/0005.html

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

5 years agotest1175: verify symbols-in-versions and libcurl-errors.3 in sync
Daniel Stenberg [Thu, 21 Nov 2019 13:54:37 +0000 (14:54 +0100)] 
test1175: verify symbols-in-versions and libcurl-errors.3 in sync

Closes #4628

5 years agoinclude: make CURLE_HTTP3 use a new error code
Daniel Stenberg [Thu, 21 Nov 2019 10:37:44 +0000 (11:37 +0100)] 
include: make CURLE_HTTP3 use a new error code

To avoid potential issues with error code reuse.

Reported-by: Christoph M. Becker
Assisted-by: Dan Fandrich
Fixes #4601
Closes #4627

5 years agobump: next release will be 7.68.0
Daniel Stenberg [Thu, 21 Nov 2019 15:35:47 +0000 (16:35 +0100)] 
bump: next release will be 7.68.0

5 years agocurl: add --parallel-immediate
Daniel Stenberg [Thu, 17 Oct 2019 08:05:53 +0000 (10:05 +0200)] 
curl: add --parallel-immediate

Starting with this change when doing parallel transfers, without this
option set, curl will prefer to create new transfers multiplexed on an
existing connection rather than creating a brand new one.

--parallel-immediate can be set to tell curl to prefer to use new
connections rather than to wait and try to multiplex.

libcurl-wise, this means that curl will set CURLOPT_PIPEWAIT by default
on parallel transfers.

Suggested-by: Tom van der Woerdt
Closes #4500

5 years agodocs: fix typos
Victor Magierski [Tue, 19 Nov 2019 23:56:45 +0000 (18:56 -0500)] 
docs: fix typos

Change 'experiemental' to 'experimental'.

Closes #4618
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
5 years agoprojects: Fix Visual Studio wolfSSL configurations
Jay Satiro [Mon, 18 Nov 2019 23:42:34 +0000 (18:42 -0500)] 
projects: Fix Visual Studio wolfSSL configurations

- s/USE_CYASSL/USE_WOLFSSL/

- Remove old compatibility macros.

Follow-up to 1c6c59a from several months ago when CyaSSL named symbols
were renamed to wolfSSL. The wolfSSL library was formerly named CyaSSL
and we kept using their old name for compatibility reasons, until
earlier this year.

5 years agoRELEASE-NOTES: synced
Daniel Stenberg [Mon, 18 Nov 2019 16:39:16 +0000 (17:39 +0100)] 
RELEASE-NOTES: synced

5 years agongtcp2: use overflow buffer for extra HTTP/3 data
Javier Blazquez [Sat, 16 Nov 2019 07:57:45 +0000 (23:57 -0800)] 
ngtcp2: use overflow buffer for extra HTTP/3 data

Fixes #4525
Closes #4603

5 years agoaltsvc: bump to h3-24
Daniel Stenberg [Sat, 16 Nov 2019 10:58:19 +0000 (11:58 +0100)] 
altsvc: bump to h3-24

... as both ngtcp2 and quiche now support that in their master branches

Closes #4604

5 years agongtcp2: free used resources on disconnect
Daniel Stenberg [Mon, 18 Nov 2019 10:27:30 +0000 (11:27 +0100)] 
ngtcp2: free used resources on disconnect

Fixes #4614
Closes #4615

5 years agongtcp2: handle key updates as ngtcp2 master branch tells us
Daniel Stenberg [Mon, 18 Nov 2019 09:34:26 +0000 (10:34 +0100)] 
ngtcp2: handle key updates as ngtcp2 master branch tells us

Reviewed-by: Tatsuhiro Tsujikawa
Fixes #4612
Closes #4613

5 years agomulti: Fix curl_multi_poll wait when extra_fds && !extra_nfds
Gergely Nagy [Sun, 17 Nov 2019 20:33:54 +0000 (21:33 +0100)] 
multi: Fix curl_multi_poll wait when extra_fds && !extra_nfds

Prior to this change:

The check if an extra wait is necessary was based not on the
number of extra fds but on the pointer.

If a non-null pointer was given in extra_fds, but extra_nfds
was zero, then the wait was skipped even though poll was not
called.

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

5 years agolib: Move lib/ssh.h -> lib/vssh/ssh.h
Jay Satiro [Sun, 17 Nov 2019 20:04:37 +0000 (15:04 -0500)] 
lib: Move lib/ssh.h -> lib/vssh/ssh.h

Follow-up to 5b2d703 which moved ssh source files to vssh.

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

5 years agoINSTALL.md: provide Android build instructions
Andreas Falkenhahn [Sat, 16 Nov 2019 21:05:43 +0000 (22:05 +0100)] 
INSTALL.md: provide Android build instructions

Closes #4606

5 years agodoh: improced both encoding and decoding
Niall [Thu, 14 Nov 2019 19:21:09 +0000 (19:21 +0000)] 
doh: improced both encoding and decoding

Improved estimation of expected_len and updated related comments;
increased strictness of QNAME-encoding, adding error detection for empty
labels and names longer than the overall limit; avoided treating DNAME
as unexpected;

updated unit test 1655 with more thorough set of proofs and tests

Closes #4598

5 years agongtcp2: increase QUIC window size when data is consumed
Daniel Stenberg [Tue, 12 Nov 2019 10:39:41 +0000 (11:39 +0100)] 
ngtcp2: increase QUIC window size when data is consumed

Assisted-by: Javier Blazquez
Ref #4525 (partial fix)
Closes #4600

5 years agoconfig-win32: cpu-machine-OS for Windows on ARM
Melissa Mears [Wed, 13 Nov 2019 03:24:35 +0000 (19:24 -0800)] 
config-win32: cpu-machine-OS for Windows on ARM

Define the OS macro properly for Windows on ARM builds.  Also, we might
as well add the GCC-style IA-64 macro.

Closes #4590

5 years agoexamples: add multi-poll.c
Daniel Stenberg [Thu, 14 Nov 2019 17:43:49 +0000 (18:43 +0100)] 
examples: add multi-poll.c

Show how curl_multi_poll() makes it even easier to use the multi
interface.

Closes #4596

5 years agomulti_poll: avoid busy-loop when called without easy handles attached
Daniel Stenberg [Thu, 14 Nov 2019 14:11:23 +0000 (15:11 +0100)] 
multi_poll: avoid busy-loop when called without easy handles attached

Fixes #4594
Closes #4595
Reported-by: 3dyd on github
5 years agocurl: fix -T globbing
Daniel Stenberg [Wed, 13 Nov 2019 10:33:29 +0000 (11:33 +0100)] 
curl: fix -T globbing

Regression from e59371a4936f8 (7.67.0)

Added test 490, 491 and 492 to verify the functionality.

Reported-by: Kamil Dudka
Reported-by: Anderson Sasaki
Fixes #4588
Closes #4591

5 years agoHISTORY: added cmake, HTTP/3 and parallel downloads with curl
Daniel Stenberg [Wed, 13 Nov 2019 09:20:52 +0000 (10:20 +0100)] 
HISTORY: added cmake, HTTP/3 and parallel downloads with curl

5 years agoquiche: reject headers in the wrong order
Daniel Stenberg [Mon, 11 Nov 2019 08:56:23 +0000 (09:56 +0100)] 
quiche: reject headers in the wrong order

Pseudo header MUST come before regular headers or cause an error.

Reported-by: Cynthia Coan
Fixes #4571
Closes #4584

5 years agoopenssl: prevent recursive function calls from ctx callbacks
Daniel Stenberg [Mon, 11 Nov 2019 10:45:12 +0000 (11:45 +0100)] 
openssl: prevent recursive function calls from ctx callbacks

Follow the pattern of many other callbacks.

Ref: #4546
Closes #4585

5 years agoCURL-DISABLE: initial docs for the CURL_DISABLE_* defines
Daniel Stenberg [Mon, 11 Nov 2019 16:16:04 +0000 (17:16 +0100)] 
CURL-DISABLE: initial docs for the CURL_DISABLE_* defines

The disable-scan script used in test 1165 is extended to also verify
that the docs cover all used defines and all defines offered by
configure.

Reported-by: SLDiggie on github
Fixes #4545
Closes #4587

5 years agoremove_handle: clear expire timers after multi_done()
Daniel Stenberg [Sun, 10 Nov 2019 15:23:53 +0000 (16:23 +0100)] 
remove_handle: clear expire timers after multi_done()

Since 59041f0, a new timer might be set in multi_done() so the clearing
of the timers need to happen afterwards!

Reported-by: Max Kellermann
Fixes #4575
Closes #4583

5 years agotest1558: use double slash after file:
Marcel Raad [Sun, 3 Nov 2019 13:48:34 +0000 (14:48 +0100)] 
test1558: use double slash after file:

Classic MinGW / MSYS 1 doesn't support `MSYS2_ARG_CONV_EXCL`, so this
test unnecessarily failed when using `file:/` instead of `file:///`.

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

5 years agopause: avoid updating socket if done was already called
Daniel Stenberg [Fri, 8 Nov 2019 22:07:55 +0000 (23:07 +0100)] 
pause: avoid updating socket if done was already called

... avoids unnecesary recursive risk when the transfer is already done.

Reported-by: Richard Bowker
Fixes #4563
Closes #4574

5 years agostrerror: Fix an error looking up some Windows error strings
Jay Satiro [Sat, 9 Nov 2019 23:07:59 +0000 (18:07 -0500)] 
strerror: Fix an error looking up some Windows error strings

- Use FORMAT_MESSAGE_IGNORE_INSERTS to ignore format specifiers in
  Windows error strings.

Since we are not in control of the error code we don't know what
information may be needed by the error string's format specifiers.

Prior to this change Windows API error strings which contain specifiers
(think specifiers like similar to printf specifiers) would not be shown.
The FormatMessage Windows API call which turns a Windows error code into
a string could fail and set error ERROR_INVALID_PARAMETER if that error
string contained a format specifier. FormatMessage expects a va_list for
the specifiers, unless inserts are ignored in which case no substitution
is attempted.

Ref: https://devblogs.microsoft.com/oldnewthing/20071128-00/?p=24353

5 years agosystem.h: fix for MCST lcc compiler
r-a-sattarov [Sat, 9 Nov 2019 14:42:47 +0000 (17:42 +0300)] 
system.h: fix for MCST lcc compiler

Fixed build by MCST lcc compiler on MCST Elbrus 2000 architecture and do
some code cleanup.

e2k (Elbrus 2000) - this is VLIW/EPIC architecture, like Intel Itanium
architecture.

Ref: https://en.wikipedia.org/wiki/Elbrus_2000

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

5 years agoTODO: curl_multi_unblock
Daniel Stenberg [Fri, 8 Nov 2019 22:31:08 +0000 (23:31 +0100)] 
TODO: curl_multi_unblock

Closes #4418

5 years agoTODO: Run web-platform-tests url tests
Daniel Stenberg [Fri, 8 Nov 2019 22:27:37 +0000 (23:27 +0100)] 
TODO: Run web-platform-tests url tests

Closes #4477

5 years agoTODO: 1.4 alt-svc sharing
Daniel Stenberg [Fri, 8 Nov 2019 22:24:37 +0000 (23:24 +0100)] 
TODO: 1.4 alt-svc sharing

Closes #4476

5 years agotest1560: require IPv6 for IPv6 aware URL parsing
Daniel Stenberg [Fri, 8 Nov 2019 09:34:13 +0000 (10:34 +0100)] 
test1560: require IPv6 for IPv6 aware URL parsing

The URL parser function can't reject a bad IPv6 address properly when
curl was built without IPv6 support.

Reported-by: Marcel Raad
Fixes #4556
Closes #4572

5 years agochecksrc: repair the copyrightyear check
Daniel Stenberg [Fri, 1 Nov 2019 12:58:27 +0000 (13:58 +0100)] 
checksrc: repair the copyrightyear check

- Consider a modified file to be committed this year.

- Make the travis CHECKSRC also do COPYRIGHTYEAR scan in examples and
  includes

- Ignore 0 parents when getting latest commit date of file.

since in the CI we're dealing with a truncated repo of last 50 commits,
the file's most recent commit may not be available. when this happens
git log and rev-list show the initial commit (ie first commit not to be
truncated) but that's incorrect so ignore it.

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

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

Co-authored-by: Jay Satiro
5 years agocopyrights: fix copyright year range
Daniel Stenberg [Sat, 2 Nov 2019 22:41:43 +0000 (23:41 +0100)] 
copyrights: fix copyright year range

.. because checksrc's copyright year check stopped working.

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

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

5 years agoRELEASE-NOTES: synced
Daniel Stenberg [Fri, 8 Nov 2019 08:47:38 +0000 (09:47 +0100)] 
RELEASE-NOTES: synced

5 years agocurlver: bump to 7.67.1
Daniel Stenberg [Fri, 8 Nov 2019 08:47:29 +0000 (09:47 +0100)] 
curlver: bump to 7.67.1