1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00
Commit Graph

25057 Commits

Author SHA1 Message Date
Daniel Stenberg
68ffe6c17d
ntlm_wb: fix double-free in OOM
Detected by torture testing test 1310

Closes #4710
2019-12-13 13:01:01 +01:00
Dan Fandrich
86f9c67629 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]
2019-12-13 09:23:37 +01:00
Daniel Stenberg
d00aa703f4
unit1620: fix bad free in OOM
Closes #4709
2019-12-13 08:16:35 +01:00
Daniel Stenberg
5ada900458
unit1609: fix mem-leak in OOM
Closes #4709
2019-12-13 08:16:32 +01:00
Daniel Stenberg
f389953da0
unit1607: fix mem-leak in OOM
Closes #4709
2019-12-13 08:16:29 +01:00
Daniel Stenberg
197d8aaf6d
lib1559: fix mem-leak in OOM
Closes #4709
2019-12-13 08:16:24 +01:00
Daniel Stenberg
6a15d1d4e5
lib1557: fix mem-leak in OOM
Closes #4709
2019-12-13 08:16:06 +01:00
Daniel Stenberg
5dc56eb95d
altsvc: make the save function ignore NULL filenames
It might happen in OOM situations. Detected bv torture tests.

Closes #4707
2019-12-12 14:10:09 +01:00
Daniel Stenberg
70a6541515
curl: fix memory leak in OOM in etags logic
Detected by torture tests

Closes #4706
2019-12-12 11:03:55 +01:00
Daniel Stenberg
4940bb8568
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
2019-12-12 09:26:08 +01:00
Daniel Stenberg
dc4900eea7
curl: improved cleanup in upload error path
Memory leak found by torture test 58

Closes #4705
2019-12-12 09:23:45 +01:00
Daniel Stenberg
5a1b0f4c5b
mailmap: fix Andrew Ishchuk 2019-12-11 09:59:32 +01:00
Daniel Stenberg
e66d5fa785
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.
2019-12-11 09:55:22 +01:00
Daniel Stenberg
7c1bd03576
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
2019-12-11 09:55:15 +01:00
Daniel Stenberg
1d5c427d7f
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
2019-12-11 09:25:56 +01:00
Gisle Vanem
2c0362ee04
vtls: make BearSSL possible to set with CURL_SSL_BACKEND
Ref: 9b879160df (commitcomment-36355622)

Closes #4698
2019-12-10 15:35:23 +01:00
Daniel Stenberg
de68a70166
RELEASE-NOTES: synced 2019-12-10 14:56:55 +01:00
Daniel Stenberg
83c0e96057
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
2019-12-10 13:39:29 +01:00
Daniel Stenberg
275e02bdea
azure: add libssh2 and cmake macos builds
Removed the macos libssh2 build from travis

Closes #4686
2019-12-10 12:34:46 +01:00
Daniel Stenberg
c6deecd7e9
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
2019-12-10 10:03:33 +01:00
Marc Hoersken
9819984fbb 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
2019-12-09 19:32:41 -05:00
Marc Hoersken
213c5aca7b 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
2019-12-09 19:32:35 -05:00
Marc Hoersken
0783f2e585 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
2019-12-09 19:32:28 -05:00
andrew_ishchuk
476a832094 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
2019-12-09 19:11:10 -05:00
Daniel Stenberg
c7bc689fc3
conn: always set bits.close with connclose()
Closes #4690
2019-12-09 17:17:42 +01:00
Daniel Stenberg
35c7aac3c6
cirrus: enable clang sanitizers on freebsd 13 2019-12-09 15:30:17 +01:00
Daniel Stenberg
ee263de7a3
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
2019-12-09 15:30:09 +01:00
Daniel Stenberg
9e891ff54d
azure: add a vanilla macos build
Closes #4685
2019-12-09 11:19:08 +01:00
Daniel Stenberg
147fa06891
curl: make the etag load logic work without fseek
The fseek()s were unnecessary and caused Coverity warning CID 1456554

Closes #4681
2019-12-06 23:02:24 +01:00
Daniel Stenberg
b62038bfa6
mailmap: Mohammad Hasbini 2019-12-06 13:22:12 +01:00
mhasbini
1a46d7c976
docs: fix some typos
Closes #4680
2019-12-06 13:20:30 +01:00
Daniel Stenberg
5dc1618fd6
RELEASE-NOTES: synced 2019-12-06 11:36:53 +01:00
Jay Satiro
689443bf42 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
2019-12-05 19:17:31 -05:00
Jay Satiro
0edf75865a 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
2019-12-05 18:38:40 -05:00
Daniel Stenberg
9ea769e15f
etag: allow both --etag-compare and --etag-save in same cmdline
Fixes #4669
Closes #4678
2019-12-05 22:57:24 +01:00
Marcel Raad
bf24e0f928
curl_setup: fix CURLRES_IPV6 condition
Move the definition of `CURLRES_IPV6` to before undefining
`HAVE_GETADDRINFO`. Regression from commit 67a08dca27 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
2019-12-05 20:17:47 +01:00
Daniel Stenberg
914975fe6e
test342: make it return a 304 as the tag matches 2019-12-05 16:58:50 +01:00
Peter Wu
87b9337c8f 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
2019-12-04 21:34:02 +00:00
Daniel Stenberg
3b8bbbbd16
azure: add more builds
... removed two from travis (that now runs on azure instead)

Closes #4671
2019-12-04 09:32:54 +01:00
Daniel Stenberg
2ebce6b060
CURLOPT_VERBOSE.3: see also ERRORBUFFER 2019-12-04 09:30:57 +01:00
Daniel Stenberg
854343fc4e
hostip4.c: bump copyright year range 2019-12-03 23:13:25 +01:00
Marcel Raad
226bf21702
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
2019-12-03 21:37:41 +01:00
Marcel Raad
67a08dca27
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
2019-12-03 21:37:33 +01:00
Daniel Stenberg
ab712afa8f
github action/azure pipeline: run 'make test-nonflaky' for tests
To match travis and give more info on failures.
2019-12-03 19:30:34 +01:00
Daniel Stenberg
564d88a8bd
openssl: CURLSSLOPT_NO_PARTIALCHAIN can disable partial cert chains
Closes #4655
2019-12-03 16:28:50 +01:00
Daniel Stenberg
94f1f77158
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
2019-12-03 16:28:50 +01:00
Daniel Stenberg
7dffc2b46f
curl: show better error message when no homedir is found
Reported-by: Vlastimil Ovčáčík
Fixes #4644
Closes #4665
2019-12-03 16:26:02 +01:00
Daniel Stenberg
0092b6bf8a
OPENSOCKETFUNCTION.3: correct the purpose description
Reported-by: Jeff Mears
Bug: https://curl.haxx.se/mail/lib-2019-12/0007.html

Closes #4667
2019-12-03 16:24:40 +01:00
Peter Wu
48da3ac67b
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
2019-12-03 11:48:45 +01:00
Daniel Stenberg
5d576afc5e
azure-pipelines: fix the test script 2019-12-02 15:40:19 +01:00