]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
5 years agongtcp2: Support the latest update key callback type 4735/head
Jay Satiro [Wed, 18 Dec 2019 18:56:16 +0000 (13:56 -0500)] 
ngtcp2: Support the latest update key callback type

- Remove our cb_update_key in favor of ngtcp2's new
  ngtcp2_crypto_update_key_cb which does the same thing.

Several days ago the ngtcp2_update_key callback function prototype was
changed in ngtcp2/ngtcp2@42ce09c. Though it would be possible to
fix up our cb_update_key for that change they also added
ngtcp2_crypto_update_key_cb which does the same thing so we'll use that
instead.

Ref: https://github.com/ngtcp2/ngtcp2/commit/42ce09c

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

5 years agosws: search for "Testno:" header uncondtionally if no testno
Daniel Stenberg [Thu, 19 Dec 2019 15:45:53 +0000 (16:45 +0100)] 
sws: search for "Testno:" header uncondtionally if no testno

Even if the initial request line wasn't found. With the fix to 1455, the
test number is now detected correctly.

(Problem found when running tests in random order.)

Closes #4744

5 years agotests: set LC_ALL in more tests
Daniel Stenberg [Thu, 19 Dec 2019 15:44:07 +0000 (16:44 +0100)] 
tests: set LC_ALL in more tests

Follow-up to 23208e330ac0c21

Closes #4743

5 years agotest165: set LC_ALL=en_US.UTF-8 too
Daniel Stenberg [Thu, 19 Dec 2019 09:10:54 +0000 (10:10 +0100)] 
test165: set LC_ALL=en_US.UTF-8 too

On my current Debian Unstable with libidn2 2.2.0, I get an error if
LC_ALL is set to blank. Then curl errors out with:

curl: (3) Failed to convert www.åäö.se to ACE; could not convert string to UTF-8

Closes #4738

5 years agocurl.h: add two defines for the "pre ISO C" case
Daniel Stenberg [Thu, 19 Dec 2019 10:00:58 +0000 (11:00 +0100)] 
curl.h: add two defines for the "pre ISO C" case

Without this fix, this caused a compilation failure on AIX with IBM xlc
13.1.3 compiler.

Reported-by: Ram Krushna Mishra
Fixes #4739
Closes #4740

5 years agocreate_conn: prefer multiplexing to using new connections
Daniel Stenberg [Wed, 18 Dec 2019 13:03:36 +0000 (14:03 +0100)] 
create_conn: prefer multiplexing to using new connections

... as it would previously prefer new connections rather than
multiplexing in most conditions! The (now removed) code was a leftover
from the Pipelining code that was translated wrongly into a
multiplex-only world.

Reported-by: Kunal Ekawde
Bug: https://curl.haxx.se/mail/lib-2019-12/0060.html
Closes #4732

5 years agotest1456: remove the use of a fixed local port
Daniel Stenberg [Wed, 18 Dec 2019 13:38:35 +0000 (14:38 +0100)] 
test1456: remove the use of a fixed local port

Fixup the test to instead not compare the port number. It sometimes
caused problems like this:

"curl: (45) bind failed with errno 98: Address already in use"

Closes #4733

5 years agoCURLOPT_QUOTE.3: fix typos
Jay Satiro [Wed, 18 Dec 2019 20:21:36 +0000 (15:21 -0500)] 
CURLOPT_QUOTE.3: fix typos

Prior to this change the EXAMPLE in the QUOTE/PREQUOTE/POSTQUOTE man
pages would not compile because a variable name was incorrect.

Reported-by: Bylon2@users.noreply.github.com
Fixes https://github.com/curl/curl/issues/4736

5 years agostrerror: Fix compiler warning "empty expression"
Gisle Vanem [Wed, 18 Dec 2019 19:09:29 +0000 (14:09 -0500)] 
strerror: Fix compiler warning "empty expression"

- Remove the final semi-colon in the SEC2TXT() macro definition.

Before:  #define SEC2TXT(sec) case sec: txt = #sec; break;

After:   #define SEC2TXT(sec) case sec: txt = #sec; break

Prior to this change SEC2TXT(foo); would generate break;; which caused
the empty expression warning.

Ref: https://github.com/curl/curl/commit/5b22e1a#r36458547

5 years agocurl/parseconfig: use curl_free() to free memory allocated by libcurl
Daniel Stenberg [Wed, 18 Dec 2019 12:43:50 +0000 (13:43 +0100)] 
curl/parseconfig: use curl_free() to free memory allocated by libcurl

Reported-by: bxac on github
Fixes #4730
Closes #4731

5 years agocurl/parseconfig: fix mem-leak
Daniel Stenberg [Wed, 18 Dec 2019 12:30:39 +0000 (13:30 +0100)] 
curl/parseconfig: fix mem-leak

When looping, first trying '.curlrc' and then '_curlrc', the function
would not free the first string.

Closes #4731

5 years agoCURLOPT_URL.3: "curl supports SMB version 1 (only)"
Daniel Stenberg [Wed, 18 Dec 2019 09:14:18 +0000 (10:14 +0100)] 
CURLOPT_URL.3: "curl supports SMB version 1 (only)"

[skip ci]

5 years agotest1270: a basic -w redirect_url test
Daniel Stenberg [Tue, 17 Dec 2019 13:43:19 +0000 (14:43 +0100)] 
test1270: a basic -w redirect_url test

Closes #4728

5 years agoHISTORY: the SMB(S) support landed in 2014
Daniel Stenberg [Wed, 18 Dec 2019 07:24:51 +0000 (08:24 +0100)] 
HISTORY: the SMB(S) support landed in 2014

5 years agodefine: remove HAVE_ENGINE_LOAD_BUILTIN_ENGINES, not used anymore
Daniel Stenberg [Mon, 16 Dec 2019 21:53:10 +0000 (22:53 +0100)] 
define: remove HAVE_ENGINE_LOAD_BUILTIN_ENGINES, not used anymore

It is covered by USE_OPENSSL_ENGINE now.

Reported-by: Gisle Vanem
Bug: https://github.com/curl/curl/commit/87b9337c8f76c21c57b204e88b68c6ecf3bd1ac0#commitcomment-36447951

Closes #4725

5 years agolib: remove ASSIGNWITHINCONDITION exceptions, use our code style
Daniel Stenberg [Mon, 16 Dec 2019 07:50:46 +0000 (08:50 +0100)] 
lib: remove ASSIGNWITHINCONDITION exceptions, use our code style

... even for macros

Reviewed-by: Daniel Gustafsson
Reviewed-by: Jay Satiro
Reported-by: Jay Satiro
Fixes #4683
Closes #4722

5 years agotests: make sure checksrc runs on header files too
Daniel Stenberg [Mon, 16 Dec 2019 07:52:16 +0000 (08:52 +0100)] 
tests: make sure checksrc runs on header files too

5 years agoRevert "checksrc: fix regexp for ASSIGNWITHINCONDITION"
Daniel Stenberg [Mon, 16 Dec 2019 07:34:14 +0000 (08:34 +0100)] 
Revert "checksrc: fix regexp for ASSIGNWITHINCONDITION"

This reverts commit ba82673dac3e8d00a76aa5e3779a0cb80e7442af.

Bug: #4683

5 years agoKNOWN_BUGS: TLS session cache doesn't work with TFO
Daniel Stenberg [Mon, 16 Dec 2019 15:20:16 +0000 (16:20 +0100)] 
KNOWN_BUGS: TLS session cache doesn't work with TFO

[skip ci]
Closes #4301

5 years agoKNOWN_BUGS: Connection information when using TCP Fast Open
Daniel Stenberg [Mon, 16 Dec 2019 15:17:16 +0000 (16:17 +0100)] 
KNOWN_BUGS: Connection information when using TCP Fast Open

Also point to #4296 for more details
Closes #4296

5 years agoKNOWN_BUGS: LDAP on Windows doesn't work
Daniel Stenberg [Mon, 16 Dec 2019 15:15:39 +0000 (16:15 +0100)] 
KNOWN_BUGS: LDAP on Windows doesn't work

Closes #4261

5 years agodocs: TLS SRP doesn't work with TLS 1.3
Daniel Stenberg [Mon, 16 Dec 2019 15:03:22 +0000 (16:03 +0100)] 
docs: TLS SRP doesn't work with TLS 1.3

Reported-by: sayrer on github
Closes #4262
[skip ci]

5 years agocirrus: Switch to the FreeBSD 12.1 point release & enable more tests.
Dan Fandrich [Mon, 16 Dec 2019 10:25:53 +0000 (11:25 +0100)] 
cirrus: Switch to the FreeBSD 12.1 point release & enable more tests.

A few tests are now passing on FreeBSD, so no longer skip them.
[skip ci]

5 years agoazure: the macos cmake doesn't need to install cmake
Daniel Stenberg [Mon, 16 Dec 2019 08:59:53 +0000 (09:59 +0100)] 
azure: the macos cmake doesn't need to install cmake

 Error: cmake 3.15.5 is already installed
 To upgrade to 3.16.1, run `brew upgrade cmake`.

Closes #4723

5 years agowinbuild: Document CURL_STATICLIB requirement for static libcurl
Jay Satiro [Sun, 15 Dec 2019 22:31:23 +0000 (17:31 -0500)] 
winbuild: Document CURL_STATICLIB requirement for static libcurl

A static libcurl (ie winbuild mode=static) requires that the user define
CURL_STATICLIB when using it in their application. This is already
covered in the FAQ and INSTALL.md, but is a pretty important point so
now it's noted in the BUILD.WINDOWS.txt as well.

Assisted-by: Michael Vittiglio
Closes https://github.com/curl/curl/pull/4721

5 years agolibssh2: add support for ECDSA and ed25519 knownhost keys
Santino Keupp [Fri, 13 Dec 2019 21:55:18 +0000 (22:55 +0100)] 
libssh2: add support for ECDSA and ed25519 knownhost keys

... if a new enough libssh2 version is present.

Source: https://curl.haxx.se/mail/archive-2019-12/0023.html
Co-Authored-by: Daniel Stenberg
Closes #4714

5 years agolib1591: free memory properly on OOM, in the trailers callback
Daniel Stenberg [Sun, 15 Dec 2019 11:33:24 +0000 (12:33 +0100)] 
lib1591: free memory properly on OOM, in the trailers callback

Detected by torture tests.

Closes #4720

5 years agoruntests: --repeat=[num] to repeat tests
Daniel Stenberg [Fri, 13 Dec 2019 16:27:12 +0000 (17:27 +0100)] 
runtests: --repeat=[num] to repeat tests

Closes #4715

5 years agoRELEASE-NOTES: synced
Daniel Stenberg [Sat, 14 Dec 2019 23:37:52 +0000 (00:37 +0100)] 
RELEASE-NOTES: synced

5 years agoazure: add a torture test on mac
Daniel Stenberg [Fri, 13 Dec 2019 14:15:56 +0000 (15:15 +0100)] 
azure: add a torture test on mac

Uses --shallow=25 to keep it small enough to get through in time.

Closes #4712

5 years agomulti: free sockhash on OOM
Daniel Stenberg [Fri, 13 Dec 2019 16:45:21 +0000 (17:45 +0100)] 
multi: free sockhash on OOM

This would otherwise leak memory in the error path.

Detected by torture test 1540.

Closes #4713

5 years agotests: use DoH feature for DoH tests
Marcel Raad [Mon, 9 Dec 2019 15:31:28 +0000 (16:31 +0100)] 
tests: use DoH feature for DoH tests

Previously, http/2 was used instead.

Assisted-by: Jay Satiro
Closes https://github.com/curl/curl/pull/4692

5 years agohostip: suppress compiler warning
Marcel Raad [Mon, 9 Dec 2019 12:48:24 +0000 (13:48 +0100)] 
hostip: suppress compiler warning

With `--disable-doh --disable-threaded-resolver`, the `dns` parameter
is not used.

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

5 years agotests: fix build with `CURL_DISABLE_DOH`
Marcel Raad [Mon, 9 Dec 2019 10:42:26 +0000 (11:42 +0100)] 
tests: fix build with `CURL_DISABLE_DOH`

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

5 years agoazure: add a torture test
Daniel Stenberg [Tue, 10 Dec 2019 11:47:46 +0000 (12:47 +0100)] 
azure: add a torture test

Skipping all FTP tests for speed reasons.

Closes #4697

5 years agoazure: make the default build use --enable-debug --enable-werror
Daniel Stenberg [Tue, 10 Dec 2019 11:47:30 +0000 (12:47 +0100)] 
azure: make the default build use --enable-debug --enable-werror

5 years agontlm_wb: fix double-free in OOM
Daniel Stenberg [Fri, 13 Dec 2019 11:27:49 +0000 (12:27 +0100)] 
ntlm_wb: fix double-free in OOM

Detected by torture testing test 1310

Closes #4710

5 years agocirrus: Drop the FreeBSD 10.4 build
Dan Fandrich [Fri, 13 Dec 2019 07:39:54 +0000 (08:39 +0100)] 
cirrus: Drop the FreeBSD 10.4 build

Upstream support for 10.4 ended a year ago, and it looks like the image
is now gone, too.
[skip ci]

5 years agounit1620: fix bad free in OOM
Daniel Stenberg [Thu, 12 Dec 2019 22:49:00 +0000 (23:49 +0100)] 
unit1620: fix bad free in OOM

Closes #4709

5 years agounit1609: fix mem-leak in OOM
Daniel Stenberg [Thu, 12 Dec 2019 22:43:29 +0000 (23:43 +0100)] 
unit1609: fix mem-leak in OOM

Closes #4709

5 years agounit1607: fix mem-leak in OOM
Daniel Stenberg [Thu, 12 Dec 2019 22:30:42 +0000 (23:30 +0100)] 
unit1607: fix mem-leak in OOM

Closes #4709

5 years agolib1559: fix mem-leak in OOM
Daniel Stenberg [Thu, 12 Dec 2019 14:10:47 +0000 (15:10 +0100)] 
lib1559: fix mem-leak in OOM

Closes #4709

5 years agolib1557: fix mem-leak in OOM
Daniel Stenberg [Thu, 12 Dec 2019 14:08:19 +0000 (15:08 +0100)] 
lib1557: fix mem-leak in OOM

Closes #4709

5 years agoaltsvc: make the save function ignore NULL filenames
Daniel Stenberg [Thu, 12 Dec 2019 09:48:57 +0000 (10:48 +0100)] 
altsvc: make the save function ignore NULL filenames

It might happen in OOM situations. Detected bv torture tests.

Closes #4707

5 years agocurl: fix memory leak in OOM in etags logic
Daniel Stenberg [Thu, 12 Dec 2019 09:38:14 +0000 (10:38 +0100)] 
curl: fix memory leak in OOM in etags logic

Detected by torture tests

Closes #4706

5 years agodoh: make it behave when built without proxy support
Daniel Stenberg [Wed, 11 Dec 2019 09:47:06 +0000 (10:47 +0100)] 
doh: make it behave when built without proxy support

Reported-by: Marcel Raad
Bug: https://github.com/curl/curl/pull/4692#issuecomment-564115734

Closes #4704

5 years agocurl: improved cleanup in upload error path
Daniel Stenberg [Wed, 11 Dec 2019 10:16:12 +0000 (11:16 +0100)] 
curl: improved cleanup in upload error path

Memory leak found by torture test 58

Closes #4705

5 years agomailmap: fix Andrew Ishchuk
Daniel Stenberg [Wed, 11 Dec 2019 08:59:03 +0000 (09:59 +0100)] 
mailmap: fix Andrew Ishchuk

5 years agotravis: make torture use --shallow=40
Daniel Stenberg [Tue, 10 Dec 2019 13:41:35 +0000 (14:41 +0100)] 
travis: make torture use --shallow=40

As a first step to enable it to run over a more diverse set of tests in
a reasonable time.

5 years agoruntests: introduce --shallow to reduce huge torture tests
Daniel Stenberg [Tue, 10 Dec 2019 13:29:48 +0000 (14:29 +0100)] 
runtests: introduce --shallow to reduce huge torture tests

When set, shallow mode limits runtests -t to make no more than NUM fails
per test case. If more are found, it will randomly discard entries until
the number is right. The random seed can also be set.

This is particularly useful when running MANY tests as then most torture
failures will already fail the same functions over and over and make the
total operation painfully tedious.

Closes #4699

5 years agoconncache: CONNECT_ONLY connections assumed always in-use
Daniel Stenberg [Tue, 10 Dec 2019 09:39:16 +0000 (10:39 +0100)] 
conncache: CONNECT_ONLY connections assumed always in-use

This makes them never to be considered "the oldest" to be discarded when
reaching the connection cache limit. The reasoning here is that
CONNECT_ONLY is primarily used in combination with using the
connection's socket post connect and since that is used outside of
curl's knowledge we must assume that it is in use until explicitly
closed.

Reported-by: Pavel Pavlov
Reported-by: Pavel Löbl
Fixes #4426
Fixes #4369
Closes #4696

5 years agovtls: make BearSSL possible to set with CURL_SSL_BACKEND
Gisle Vanem [Tue, 10 Dec 2019 12:44:39 +0000 (13:44 +0100)] 
vtls: make BearSSL possible to set with CURL_SSL_BACKEND

Ref: https://github.com/curl/curl/commit/9b879160df01e7ddbb4770904391d3b74114302b#commitcomment-36355622

Closes #4698

5 years agoRELEASE-NOTES: synced
Daniel Stenberg [Tue, 10 Dec 2019 13:56:55 +0000 (14:56 +0100)] 
RELEASE-NOTES: synced

5 years agotravis: remove "coverage", make it "torture"
Daniel Stenberg [Tue, 10 Dec 2019 08:36:46 +0000 (09:36 +0100)] 
travis: remove "coverage", make it "torture"

The coveralls service and test coverage numbers are just too unreliable.
Removed badge from README.md as well.

Fixes #4694
Closes #4695

5 years agoazure: add libssh2 and cmake macos builds
Daniel Stenberg [Mon, 9 Dec 2019 10:43:29 +0000 (11:43 +0100)] 
azure: add libssh2 and cmake macos builds

Removed the macos libssh2 build from travis

Closes #4686

5 years agocurl: use errorf() better
Daniel Stenberg [Mon, 9 Dec 2019 15:15:37 +0000 (16:15 +0100)] 
curl: use errorf() better

Change series of error outputs to use errorf().

Only errors that are due to mistakes in command line option usage should
use helpf(), other types of errors in the tool should rather use
errorf().

Closes #4691

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