]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
4 years agocurl: use curlx_dynbuf for realloc when loading config files
Daniel Stenberg [Wed, 9 Sep 2020 13:41:25 +0000 (15:41 +0200)] 
curl: use curlx_dynbuf for realloc when loading config files

... fixes an integer overflow at the same time.

Reported-by: ihsinme on github
Assisted-by: Jay Satiro
Closes #5946

4 years agodynbuf: provide curlx_ names for reuse by the curl tool
Daniel Stenberg [Wed, 9 Sep 2020 13:41:05 +0000 (15:41 +0200)] 
dynbuf: provide curlx_ names for reuse by the curl tool

Closes #5946

4 years agodynbuf: make sure Curl_dyn_tail() zero terminates
Daniel Stenberg [Sun, 13 Sep 2020 21:08:45 +0000 (23:08 +0200)] 
dynbuf: make sure Curl_dyn_tail() zero terminates

Closes #5959

4 years agotests: add test1912 to the dist
Daniel Stenberg [Sat, 12 Sep 2020 16:09:49 +0000 (18:09 +0200)] 
tests: add test1912 to the dist

Follow-up to 70984ce1be4cab6c

4 years agodocs/LICENSE-MIXING: remove
Daniel Stenberg [Fri, 11 Sep 2020 15:17:54 +0000 (17:17 +0200)] 
docs/LICENSE-MIXING: remove

This document is not maintained and I feel that it doesn't provide much
value to users anymore (if it ever did).

Closes #5955

4 years agohttp: consolidate nghttp2_session_mem_recv() call paths
Laramie Leavitt [Fri, 3 Jul 2020 20:10:27 +0000 (13:10 -0700)] 
http: consolidate nghttp2_session_mem_recv() call paths

Previously there were several locations that called
nghttp2_session_mem_recv and handled responses slightly differently.
Those have been converted to call the existing
h2_process_pending_input() function.

Moved the end-of-session check to h2_process_pending_input() since the
only place the end-of-session state can change is after nghttp2
processes additional input frames.

This will likely fix the fuzzing error. While I don't have a root cause
the out-of-bounds read seems like a use after free, so moving the
nghttp2_session_check_request_allowed() call to a location with a
guaranteed nghttp2 session seems reasonable.

Also updated a few nghttp2 callsites to include error messages and added
a few additional error checks.

Closes #5648

4 years agoHISTORY: mention alt-svc added in 2019
Daniel Stenberg [Thu, 10 Sep 2020 15:39:15 +0000 (17:39 +0200)] 
HISTORY: mention alt-svc added in 2019

... and make 1996 the first year subtitle

4 years agobase64: also build for pop3 and imap
Daniel Stenberg [Wed, 9 Sep 2020 20:32:17 +0000 (22:32 +0200)] 
base64: also build for pop3 and imap

Follow-up to the fix in 20417a13fb8f83

Reported-by: Michael Olbrich
Fixes #5937
Closes #5948

4 years agobase64: enable in build with SMTP
Daniel Stenberg [Tue, 8 Sep 2020 07:23:09 +0000 (09:23 +0200)] 
base64: enable in build with SMTP

The oauth2 support is used with SMTP and it uses base64 functions.

Reported-by: Michael Olbrich
Fixes #5937
Closes #5938

4 years agocurl_mime_headers.3: fix the example's use of curl_slist_append
Daniel Stenberg [Tue, 8 Sep 2020 15:25:27 +0000 (17:25 +0200)] 
curl_mime_headers.3: fix the example's use of curl_slist_append

Reported-by: sofaboss on github
Fixes #5942
Closes #5943

4 years agolib583: fix enum mixup
Daniel Stenberg [Tue, 8 Sep 2020 20:47:17 +0000 (22:47 +0200)] 
lib583: fix enum mixup

grrr the previous follow-up to 17fcdf6a31 was wrong

4 years agolibtest: fix build errors
Daniel Stenberg [Tue, 8 Sep 2020 15:37:25 +0000 (17:37 +0200)] 
libtest: fix build errors

Follow-up from 17fcdf6a310d4c8076

4 years agolib: fix -Wassign-enum warnings
Daniel Stenberg [Mon, 7 Sep 2020 08:52:48 +0000 (10:52 +0200)] 
lib: fix -Wassign-enum warnings

configure --enable-debug now enables -Wassign-enum with clang,
identifying several enum "abuses" also fixed.

Reported-by: Gisle Vanem
Bug: https://github.com/curl/curl/commit/879007f8118771f4896334731aaca5850a154675#commitcomment-42087553

Closes #5929

4 years agoRELEASE-NOTES: synced
Daniel Stenberg [Tue, 8 Sep 2020 06:16:12 +0000 (08:16 +0200)] 
RELEASE-NOTES: synced

4 years agourl: use blank credentials when using proxy w/o username and password
Diven Qi [Mon, 7 Sep 2020 09:30:04 +0000 (17:30 +0800)] 
url: use blank credentials when using proxy w/o username and password

Fixes proxy regression brought in commit ad829b21ae (7.71.0)

Fixed #5911
Closes #5914

4 years agotravis: add a build using libressl (from git master)
Daniel Stenberg [Mon, 7 Sep 2020 09:28:13 +0000 (11:28 +0200)] 
travis: add a build using libressl (from git master)

The v3.2.1 tag (latest release atm) results in a broken build.

Closes #5932

4 years agoconfigure: let --enable-debug set -Wenum-conversion with gcc >= 10
Daniel Stenberg [Mon, 7 Sep 2020 09:03:30 +0000 (11:03 +0200)] 
configure: let --enable-debug set -Wenum-conversion with gcc >= 10

Unfortunately, this option is not detecting the same issues as clang's
-Wassign-enum flag, but should still be useful to detect future
mistakes.

Closes #5930

4 years agoopenssl: consider ALERT_CERTIFICATE_EXPIRED a failed verification
Daniel Stenberg [Mon, 7 Sep 2020 14:20:16 +0000 (16:20 +0200)] 
openssl: consider ALERT_CERTIFICATE_EXPIRED a failed verification

If the error reason from the lib is
SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED, libcurl will return
CURLE_PEER_FAILED_VERIFICATION and not CURLE_SSL_CONNECT_ERROR.

This unifies the libcurl return code and makes libressl run test 313
(CRL testing) fine.

Closes #5934

4 years agoFAQ: refreshed some very old language
Daniel Stenberg [Mon, 7 Sep 2020 15:08:07 +0000 (17:08 +0200)] 
FAQ: refreshed some very old language

4 years agocmake: make HTTP_ONLY also disable MQTT
Daniel Stenberg [Mon, 7 Sep 2020 09:08:35 +0000 (11:08 +0200)] 
cmake: make HTTP_ONLY also disable MQTT

... and alphasort the order of disabling protocols to make it easier to
browse.

Closes #5931

4 years agolibtest: remove lib1541 leftovers
Daniel Stenberg [Mon, 7 Sep 2020 08:46:55 +0000 (10:46 +0200)] 
libtest: remove lib1541 leftovers

Caused automake errors.

Follow-up to 8ca54a03ea08a

4 years agotests/libtests: remove test 1900 and 2033
Daniel Stenberg [Mon, 7 Sep 2020 08:29:40 +0000 (10:29 +0200)] 
tests/libtests: remove test 1900 and 2033

We already remove the test files, now remove the libtest codes as well.

Follow-up to e50a877df74

4 years agoCI/azure: add test number to title for display in analytics
Marc Hoersken [Sun, 6 Sep 2020 19:27:41 +0000 (21:27 +0200)] 
CI/azure: add test number to title for display in analytics

To ease identification of tests the test number is added to
the test case title in order to have it on the Azure DevOps
Analytics pages and reports which currently do not show it.

Bump test case revision to make Azure DevOps update titles.

Closes #5927

4 years agoaltsvc: clone setting in curl_easy_duphandle 5923/head
Daniel Stenberg [Sat, 5 Sep 2020 19:21:26 +0000 (21:21 +0200)] 
altsvc: clone setting in curl_easy_duphandle

The cache content is not duplicated, like other caches, but the setting
and specified file name are.

Test 1908 is extended to verify this somewhat. Since the duplicated
handle gets the same file name, the test unfortunately overwrites the
same file twice (with different contents) which makes it hard to check
automatically.

Closes #5923

4 years agotest1541: remove since it is a known bug
Daniel Stenberg [Sat, 5 Sep 2020 18:30:26 +0000 (20:30 +0200)] 
test1541: remove since it is a known bug

A shared connection cache is not thread-safe is a known issue. Stop
testing this until we believe this issue is addressed. Reduces
occasional test failures we don't care about.

The test code in lib1541.c is left in git to allow us to restore it when
we get to fix this.

Closes #5922

4 years agotests: remove pipelining tests
Daniel Stenberg [Sat, 5 Sep 2020 16:42:29 +0000 (18:42 +0200)] 
tests: remove pipelining tests

Remove the tests 530, 584, 1900, 1901, 1902, 1903 and 2033. They were
previously disabled.

The Pipelining code was removed from curl in commit 2f44e94efb3df8e,
April 2019.

Closes #5921

4 years agocurl: retry delays in parallel mode no longer sleeps blocking
Daniel Stenberg [Sat, 5 Sep 2020 15:44:24 +0000 (17:44 +0200)] 
curl: retry delays in parallel mode no longer sleeps blocking

The previous sleep for retries would block all other concurrent
transfers. Starting now, the retry will instead be properly marked to
not get restarted until after the delay time but other transfers can
still continue in the mean time.

Closes #5917

4 years agocurl:parallel_transfers: make sure retry readds the transfer
Daniel Stenberg [Sat, 5 Sep 2020 15:04:03 +0000 (17:04 +0200)] 
curl:parallel_transfers: make sure retry readds the transfer

Reported-by: htasta on github
Fixes #5905
Closes #5917

4 years agobuild: drop support for building with Watcom
Daniel Stenberg [Sat, 5 Sep 2020 15:51:26 +0000 (17:51 +0200)] 
build: drop support for building with Watcom

These files are not maintained, they seem to have no users, Watcom
compilers look like not having users nor releases anymore.

Closes #5918

4 years agowinbuild/rundebug.cmd: remove
Daniel Stenberg [Sat, 5 Sep 2020 15:58:28 +0000 (17:58 +0200)] 
winbuild/rundebug.cmd: remove

Seems to have been added by mistake? Not included in dists.

Closes #5919

4 years agocurl: in retry output don't call all problems "transient"
Daniel Stenberg [Sat, 5 Sep 2020 13:46:55 +0000 (15:46 +0200)] 
curl: in retry output don't call all problems "transient"

... because when --retry-all-errors is used, the error isn't necessarily
transient at all.

Closes #5916

4 years agoeasygetopt: pass a valid enum to avoid compiler warning
Daniel Stenberg [Sat, 5 Sep 2020 10:52:03 +0000 (12:52 +0200)] 
easygetopt: pass a valid enum to avoid compiler warning

"integer constant not in range of enumerated type 'CURLoption'"

Reported-by: Gisle Vanem
Bug: https://github.com/curl/curl/commit/6ebe63fac23f38df911edc348e8ccc72280f9434#commitcomment-42042843

Closes #5915

4 years agotests: Add tests for new --help
Emil Engler [Tue, 14 Jul 2020 08:32:22 +0000 (10:32 +0200)] 
tests: Add tests for new --help

This commit is a part of "--help me if you can"

Closes #5680

4 years agotool: update --help with categories
Emil Engler [Wed, 2 Sep 2020 18:11:20 +0000 (20:11 +0200)] 
tool: update --help with categories

This commit is a part of "--help me if you can"

Closes #5680

4 years agodocs: add categories to all cmdline opts
Emil Engler [Mon, 13 Jul 2020 12:15:04 +0000 (14:15 +0200)] 
docs: add categories to all cmdline opts

Adapted gen.pl with 'listcats'

This commit is a part of "--help me if you can"

Closes #5680

4 years agoRELEASE-NOTES: synced
Daniel Stenberg [Fri, 4 Sep 2020 12:34:40 +0000 (14:34 +0200)] 
RELEASE-NOTES: synced

4 years agoconnect.c: remove superfluous 'else' in Curl_getconnectinfo
ihsinme [Fri, 4 Sep 2020 11:23:14 +0000 (14:23 +0300)] 
connect.c: remove superfluous 'else' in Curl_getconnectinfo

Closes #5912

4 years agoCMake: remove explicit `CMAKE_ANSI_CFLAGS`
Samuel Marks [Thu, 21 May 2020 10:21:50 +0000 (20:21 +1000)] 
CMake: remove explicit `CMAKE_ANSI_CFLAGS`

This variable was removed from cmake in commit
https://gitlab.kitware.com/cmake/cmake/commit/5a834b0bb0bc288. A later
CMake commit removes the variable from the tests, claiming that it was
removed in CMake 2.6

Reviewed-By: Peter Wu
Closes #5439

4 years agolibssh2: pass on the error from ssh_force_knownhost_key_type
cbe [Thu, 3 Sep 2020 13:52:54 +0000 (15:52 +0200)] 
libssh2: pass on the error from ssh_force_knownhost_key_type

Closes #5909

4 years agoscripts/delta: add diffstat summary
Daniel Stenberg [Thu, 3 Sep 2020 06:18:32 +0000 (08:18 +0200)] 
scripts/delta: add diffstat summary

... and make output more table-like

4 years agohttp_proxy: do not crash with HTTPS_PROXY and NO_PROXY set
Martin Bašti [Thu, 27 Aug 2020 21:09:56 +0000 (23:09 +0200)] 
http_proxy: do not crash with HTTPS_PROXY and NO_PROXY set

... in case NO_PROXY takes an effect

Without this patch, the following command crashes:

    $ GIT_CURL_VERBOSE=1 NO_PROXY=github.com HTTPS_PROXY=https://example.com \
        git clone https://github.com/curl/curl.git

Minimal libcurl-based reproducer:

    #include <curl/curl.h>

    int main() {
      CURL *curl = curl_easy_init();
      if(curl) {
        CURLcode ret;
        curl_easy_setopt(curl, CURLOPT_URL, "https://github.com/");
        curl_easy_setopt(curl, CURLOPT_PROXY, "example.com");
        /* set the proxy type */
        curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_HTTPS);
        curl_easy_setopt(curl, CURLOPT_NOPROXY, "github.com");
        curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
        ret = curl_easy_perform(curl);
        curl_easy_cleanup(curl);
        return ret;
      }
      return -1;
    }

Assisted-by: Kamil Dudka
Bug: https://bugzilla.redhat.com/1873327
Closes #5902

4 years agotravis: add a CI job with openssl3 (from git master)
Daniel Stenberg [Wed, 2 Sep 2020 13:48:18 +0000 (15:48 +0200)] 
travis: add a CI job with openssl3 (from git master)

Closes #5908

4 years agoopenssl: avoid error conditions when importing native CA
Daniel Stenberg [Wed, 2 Sep 2020 13:26:09 +0000 (15:26 +0200)] 
openssl: avoid error conditions when importing native CA

The code section that is OpenSSL 3+ specific now uses the same logic as
is used in the version < 3 section. It caused a compiler error without
it.

Closes #5907

4 years agosetopt: avoid curl_ on local variable
Daniel Stenberg [Wed, 2 Sep 2020 10:47:01 +0000 (12:47 +0200)] 
setopt: avoid curl_ on local variable

Closes #5906

4 years agomqtt.c: avoid curl_ prefix on local variable
Daniel Stenberg [Wed, 2 Sep 2020 10:46:48 +0000 (12:46 +0200)] 
mqtt.c: avoid curl_ prefix on local variable

Closes #5906

4 years agowildcard: strip "curl_" prefix from private symbols
Daniel Stenberg [Wed, 2 Sep 2020 10:39:42 +0000 (12:39 +0200)] 
wildcard: strip "curl_" prefix from private symbols

Closes #5906

4 years agovtls: make it 'struct Curl_ssl_session'
Daniel Stenberg [Wed, 2 Sep 2020 10:17:49 +0000 (12:17 +0200)] 
vtls: make it 'struct Curl_ssl_session'

Use uppercase C for internal symbols.

Closes #5906

4 years agocurl_threads: make it 'struct Curl_actual_call'
Daniel Stenberg [Wed, 2 Sep 2020 10:12:40 +0000 (12:12 +0200)] 
curl_threads: make it 'struct Curl_actual_call'

Internal names should not be prefixed "curl_"

Closes #5906

4 years agoschannel: make it 'struct Curl_schannel*'
Daniel Stenberg [Wed, 2 Sep 2020 10:11:01 +0000 (12:11 +0200)] 
schannel: make it 'struct Curl_schannel*'

As internal global names should use captical C.

Closes #5906

4 years agohash: make it 'struct Curl_hash'
Daniel Stenberg [Wed, 2 Sep 2020 10:07:44 +0000 (12:07 +0200)] 
hash: make it 'struct Curl_hash'

As internal global names should use captical C.

Closes #5906

4 years agollist: make it "struct Curl_llist"
Daniel Stenberg [Wed, 2 Sep 2020 10:06:20 +0000 (12:06 +0200)] 
llist: make it "struct Curl_llist"

As internal global names should use captical C.

Closes #5906

4 years agotelnet.c: depend on static requirement of WinSock version 2
Marc Hoersken [Fri, 28 Aug 2020 19:54:03 +0000 (21:54 +0200)] 
telnet.c: depend on static requirement of WinSock version 2

Drop dynamic loading of ws2_32.dll and instead rely on the
imported version which is now required to be at least 2.2.

Reviewed-by: Marcel Raad
Reviewed-by: Jay Satiro
Reviewed-by: Daniel Stenberg
Reviewed-by: Viktor Szakats
Closes #5854

4 years agowin32: drop support for WinSock version 1, require version 2
Marc Hoersken [Sun, 30 Aug 2020 10:21:53 +0000 (12:21 +0200)] 
win32: drop support for WinSock version 1, require version 2

IPv6, telnet and now also the multi API require WinSock
version 2 which is available starting with Windows 95.

Therefore we think it is time to drop support for version 1.

Reviewed-by: Marcel Raad
Reviewed-by: Jay Satiro
Reviewed-by: Daniel Stenberg
Reviewed-by: Viktor Szakats
Follow up to #5634
Closes #5854

4 years agoselect: align poll emulation to return all relevant events
Marc Hoersken [Mon, 31 Aug 2020 08:49:20 +0000 (10:49 +0200)] 
select: align poll emulation to return all relevant events

The poll emulation via select already consumes POLLRDNORM,
POLLWRNORM and POLLRDBAND as input events. Therefore it
should also return them as output events if signaled.

Also fix indentation in input event handling block.

Assisted-by: Jay Satiro
Reviewed-by: Daniel Stenberg
Replaces #5852
Closes #5883

4 years agoCI/azure: MQTT is now enabled by default
Marc Hoersken [Tue, 1 Sep 2020 17:58:21 +0000 (19:58 +0200)] 
CI/azure: MQTT is now enabled by default

Reviewed-by: Daniel Stenberg
Follow up to #5858
Closes #5903

4 years agocopyright.pl: ignore buildconf
Daniel Stenberg [Wed, 2 Sep 2020 10:27:10 +0000 (12:27 +0200)] 
copyright.pl: ignore buildconf

4 years agotest971: show test mismatches "inline"
Daniel Stenberg [Wed, 2 Sep 2020 07:25:50 +0000 (09:25 +0200)] 
test971: show test mismatches "inline"

4 years agolib/Makefile.am: bump VERSIONINFO due to new functions
Daniel Stenberg [Tue, 1 Sep 2020 09:10:58 +0000 (11:10 +0200)] 
lib/Makefile.am: bump VERSIONINFO due to new functions

... we're generally bad at this, but we are adding new functions for
this release.

Closes #5899

4 years agooptiontable: use DEBUGBUILD
Daniel Stenberg [Tue, 1 Sep 2020 14:01:00 +0000 (16:01 +0200)] 
optiontable: use DEBUGBUILD

Follow-up to commit 6e18568ba38 (#5877)

4 years agocmdline-opts/gen.pl: generate nicer "See Also" in curl.1
Daniel Stenberg [Tue, 1 Sep 2020 08:16:45 +0000 (10:16 +0200)] 
cmdline-opts/gen.pl: generate nicer "See Also" in curl.1

If there are more than two items in the list, use commas for all but the
last separator which is set to 'and'. Reads better.

Closes #5898

4 years agocurl.1: add see also no-progress-meter on two spots
Daniel Stenberg [Tue, 1 Sep 2020 06:16:37 +0000 (08:16 +0200)] 
curl.1: add see also no-progress-meter on two spots

Ref: #5894

Closes #5897

4 years agoRELEASE-NOTES: synced
Daniel Stenberg [Mon, 31 Aug 2020 07:54:52 +0000 (09:54 +0200)] 
RELEASE-NOTES: synced

4 years agomqtt: enable by default
Daniel Stenberg [Mon, 31 Aug 2020 07:45:09 +0000 (09:45 +0200)] 
mqtt: enable by default

No longer considered experimental.

Closes #5858

4 years agotls: add CURLOPT_SSL_EC_CURVES and --curves
Michael Baentsch [Sat, 29 Aug 2020 12:09:24 +0000 (14:09 +0200)] 
tls: add CURLOPT_SSL_EC_CURVES and --curves

Closes #5892

4 years agourl: remove funny embedded comments in Curl_disonnect calls
Daniel Stenberg [Sun, 30 Aug 2020 15:02:44 +0000 (17:02 +0200)] 
url: remove funny embedded comments in Curl_disonnect calls

4 years agoconn: check for connection being dead before reuse
Chris Paulson-Ellis [Sat, 29 Aug 2020 17:26:50 +0000 (18:26 +0100)] 
conn: check for connection being dead before reuse

Prevents incorrect reuse of an HTTP connection that has been prematurely
shutdown() by the server.

Partial revert of 755083d00deb16

Fixes #5884
Closes #5893

4 years agobuildconf: exec autoreconf to avoid additional process
Marc Hoersken [Sat, 29 Aug 2020 09:12:08 +0000 (11:12 +0200)] 
buildconf: exec autoreconf to avoid additional process

Also make buildconf exit with the return code of autoreconf.

Reviewed-by: Daniel Stenberg
Follow up to #5853
Closes #5890

4 years agoCI/azure: no longer ignore results of test 1013
Marc Hoersken [Sat, 29 Aug 2020 09:09:32 +0000 (11:09 +0200)] 
CI/azure: no longer ignore results of test 1013

Follow up to #5771
Closes #5889

4 years agodocs: add description about CI platforms to CONTRIBUTE.md
Marc Hoersken [Sat, 29 Aug 2020 07:56:22 +0000 (09:56 +0200)] 
docs: add description about CI platforms to CONTRIBUTE.md

Reviewed-by: Daniel Stenberg
Reviewed-by: Marcel Raad
Reviewed-by: Jay Satiro
Closes #5882

4 years agotests/getpart: use MIME::Base64 instead of home-cooked
Daniel Stenberg [Fri, 28 Aug 2020 20:31:57 +0000 (22:31 +0200)] 
tests/getpart: use MIME::Base64 instead of home-cooked

Since we already use the base64 package since a while back, we can just
as well switch to that here too.

It also happens to use the exact same function name, which otherwise
causes a run-time warning.

Reported-by: Marc Hörsken
Fixes #5885
Closes #5887

4 years agontlm: fix condition for curl_ntlm_core usage
Marcel Raad [Mon, 3 Aug 2020 08:33:17 +0000 (10:33 +0200)] 
ntlm: fix condition for curl_ntlm_core usage

`USE_WINDOWS_SSPI` without `USE_WIN32_CRYPTO` but with any other DES
backend is fine, but was excluded before.

This also fixes test 1013 as the condition for SMB support in
configure.ac didn't match the condition in the source code. Now it
does.

Fixes https://github.com/curl/curl/issues/1262
Closes https://github.com/curl/curl/pull/5771

4 years agoAppVeyor: switch 64-bit Schannel Debug CMake builds to Unicode
Marcel Raad [Sat, 22 Aug 2020 08:16:13 +0000 (10:16 +0200)] 
AppVeyor: switch 64-bit Schannel Debug CMake builds to Unicode

The Schannel builds are the most useful to verify as they make the most
use of the Windows API. Classic MinGW doesn't support Unicode at all,
only MinGW-w64 and MSVC do.

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

4 years agoCMake: add option to enable Unicode on Windows
Marcel Raad [Sat, 22 Aug 2020 08:04:29 +0000 (10:04 +0200)] 
CMake: add option to enable Unicode on Windows

As already existing for winbuild.

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

4 years agoselect: simplify return code handling for poll and select
Marc Hoersken [Fri, 28 Aug 2020 16:21:47 +0000 (18:21 +0200)] 
select: simplify return code handling for poll and select

poll and select already return -1 on error according to POSIX,
so there is no need to perform a <0 to -1 conversion in code.

Also we can just use one check with <= 0 on the return code.

Assisted-by: Daniel Stenberg
Reviewed-by: Jay Satiro
Replaces #5852
Closes #5880

4 years agoRELEASE-NOTES: synced
Daniel Stenberg [Fri, 28 Aug 2020 21:48:25 +0000 (23:48 +0200)] 
RELEASE-NOTES: synced

4 years agotests: add test1912 with typechecks
Jeroen Ooms [Thu, 27 Aug 2020 22:20:47 +0000 (00:20 +0200)] 
tests: add test1912 with typechecks

Validates that gcc-typecheck macros match the new option type API.

Closes #5873

4 years agoeasyoptions: provide debug function when DEBUGBUILD
Daniel Stenberg [Fri, 28 Aug 2020 13:35:23 +0000 (15:35 +0200)] 
easyoptions: provide debug function when DEBUGBUILD

... not CURLDEBUG as they're not always set in conjunction.

Follow-up to 6ebe63fac23f38df

Fixes #5877
Closes #5878

4 years agosockfilt: handle FD_CLOSE winsock event on write socket
Marc Hoersken [Fri, 28 Aug 2020 20:30:39 +0000 (22:30 +0200)] 
sockfilt: handle FD_CLOSE winsock event on write socket

Learn from the way Cygwin handles and maps the WinSock events
to simulate correct and complete poll and select behaviour
according to Richard W. Stevens Network Programming book.

Follow up to #5867
Closes #5879

4 years agomulti: handle connection state winsock events
Marc Hoersken [Wed, 26 Aug 2020 20:13:21 +0000 (22:13 +0200)] 
multi: handle connection state winsock events

Learn from the way Cygwin handles and maps the WinSock events
to simulate correct and complete poll and select behaviour
according to Richard W. Stevens Network Programming book.

Reviewed-by: Jay Satiro
Reviewed-by: Marcel Raad
Follow up to #5634
Closes #5867

4 years agoCurl_pgrsTime - return new time to avoid timeout integer overflow
Daniel Stenberg [Mon, 24 Aug 2020 09:07:59 +0000 (11:07 +0200)] 
Curl_pgrsTime - return new time to avoid timeout integer overflow

Setting a timeout to INT_MAX could cause an immediate error to get
returned as timeout because of an overflow when different values of
'now' were used.

This is primarily fixed by having Curl_pgrsTime() return the "now" when
TIMER_STARTSINGLE is set so that the parent function will continue using
that time.

Reported-by: Ionuț-Francisc Oancea
Fixes #5583
Closes #5847

4 years agoTLS: fix SRP detection by using the proper #ifdefs
Daniel Stenberg [Thu, 27 Aug 2020 10:46:43 +0000 (12:46 +0200)] 
TLS: fix SRP detection by using the proper #ifdefs

USE_TLS_SRP will be true if *any* selected TLS backend can use SRP

HAVE_OPENSSL_SRP is defined when OpenSSL can use it

HAVE_GNUTLS_SRP is defined when GnuTLS can use it

Clarify in the curl_verison_info docs that CURL_VERSION_TLSAUTH_SRP is
set if at least one of the supported backends offers SRP.

Reported-by: Stefan Strogin
Fixes #5865
Closes #5870

4 years agodocs: SSLCERTS: fix English syntax
Dan Kenigsberg [Fri, 28 Aug 2020 11:26:30 +0000 (14:26 +0300)] 
docs: SSLCERTS: fix English syntax

Signed-off-by: Dan Kenigsberg <danken@redhat.com>
Closes #5876

4 years agodocs: non-existing macros in man pages
Alessandro Ghedini [Mon, 24 Aug 2020 08:00:13 +0000 (10:00 +0200)] 
docs: non-existing macros in man pages

As reported by man(1) when invoked as:

  man --warnings -E UTF-8 -l -Tutf8 -Z <file> >/dev/null

Closes #5846

4 years agocurl.1: fix typo invokved -> invoked
Alessandro Ghedini [Mon, 24 Aug 2020 07:59:14 +0000 (09:59 +0200)] 
curl.1: fix typo invokved -> invoked

Closes #5846

4 years agobuildconf: invoke 'autoreconf -fi' instead
Daniel Stenberg [Tue, 25 Aug 2020 14:14:18 +0000 (16:14 +0200)] 
buildconf: invoke 'autoreconf -fi' instead

The custom script isn't necessary anymore - but remains for simplicity
and just invokes autoreconf.

Closes #5853

4 years agolib: make Curl_gethostname accept a const pointer
Emil Engler [Wed, 26 Aug 2020 19:39:21 +0000 (21:39 +0200)] 
lib: make Curl_gethostname accept a const pointer

The address of that variable never gets changed, only the data in it so
why not make it a "char * const"?

Closes #5866

4 years agodocs/libcurl: update "Added in" version for curl_easy_option*
Daniel Stenberg [Thu, 27 Aug 2020 14:13:41 +0000 (16:13 +0200)] 
docs/libcurl: update "Added in" version for curl_easy_option*

Follow-up to 6ebe63fac23f38

4 years agoscripts: improve the "get latest curl release tag" logic
Daniel Stenberg [Thu, 27 Aug 2020 12:25:24 +0000 (14:25 +0200)] 
scripts: improve the "get latest curl release tag" logic

... by insiting on it matching "^curl-".

4 years agoconfigure: added --disable-get-easy-options
Daniel Stenberg [Wed, 26 Aug 2020 06:30:38 +0000 (08:30 +0200)] 
configure: added --disable-get-easy-options

To allow disabling of the curl_easy_option APIs in a build.

Closes #5365

4 years agooptions: API for meta-data about easy options
Daniel Stenberg [Wed, 26 Aug 2020 06:30:38 +0000 (08:30 +0200)] 
options: API for meta-data about easy options

 const struct curl_easyoption *curl_easy_option_by_name(const char *name);

 const struct curl_easyoption *curl_easy_option_by_id (CURLoption id);

 const struct curl_easyoption *
 curl_easy_option_next(const struct curl_easyoption *prev);

The purpose is to provide detailed enough information to allow for
example libcurl bindings to get option information at run-time about
what easy options that exist and what arguments they expect.

Assisted-by: Jeroen Ooms
Closes #5365

4 years agoHTTP/3: update to OpenSSL_1_1_1g-quic-draft-29
Eric Curtin [Thu, 27 Aug 2020 11:14:19 +0000 (12:14 +0100)] 
HTTP/3: update to OpenSSL_1_1_1g-quic-draft-29

Closes #5871

4 years agoRELEASE-NOTES: synced
Daniel Stenberg [Thu, 27 Aug 2020 09:31:27 +0000 (11:31 +0200)] 
RELEASE-NOTES: synced

4 years agoopenssl: Fix wincrypt symbols conflict with BoringSSL
Jay Satiro [Wed, 26 Aug 2020 05:49:47 +0000 (01:49 -0400)] 
openssl: Fix wincrypt symbols conflict with BoringSSL

OpenSSL undefines the conflicting symbols but BoringSSL does not so we
must do it ourselves.

Reported-by: Samuel Tranchet
Assisted-by: Javier Blazquez
Ref: https://bugs.chromium.org/p/boringssl/issues/detail?id=371
Ref: https://github.com/openssl/openssl/blob/OpenSSL_1_1_1g/include/openssl/ossl_typ.h#L66-L73

Fixes https://github.com/curl/curl/issues/5669
Closes https://github.com/curl/curl/pull/5857

4 years agosocketpair: allow CURL_DISABLE_SOCKETPAIR
Daniel Stenberg [Fri, 14 Aug 2020 13:45:08 +0000 (15:45 +0200)] 
socketpair: allow CURL_DISABLE_SOCKETPAIR

... to completely disable the use of socketpair

Closes #5850

4 years agocurl_get_line: build only if cookies or alt-svc are enabled
Daniel Stenberg [Fri, 14 Aug 2020 13:43:41 +0000 (15:43 +0200)] 
curl_get_line: build only if cookies or alt-svc are enabled

Closes #5851

4 years agoschannel: fix memory leak when using get_cert_location
fullincome [Wed, 26 Aug 2020 10:15:15 +0000 (13:15 +0300)] 
schannel: fix memory leak when using get_cert_location

The get_cert_location function allocates memory only on success.
Previously get_cert_location was able to allocate memory and return
error. It wasn't obvious and in this case the memory wasn't
released.

Fixes #5855
Closes #5860

4 years agogit: ignore libtests in 3XXX area
Emil Engler [Wed, 26 Aug 2020 10:00:30 +0000 (12:00 +0200)] 
git: ignore libtests in 3XXX area

Currently the file tests/libtest/lib3010 is not getting
ignored by git. This fixes it by adding the 3XXX area to
the according .gitignore file.

Closes #5859

4 years agodoh: add error message for DOH_DNS_NAME_TOO_LONG
Emil Engler [Wed, 26 Aug 2020 11:33:42 +0000 (13:33 +0200)] 
doh: add error message for DOH_DNS_NAME_TOO_LONG

When this error code was introduced in b6a53fff6c1d07e8a9, it was
forgotten to be added in the errors array and doh_strerror function.

Closes #5863

4 years agongtcp2: adapt to the new pkt_info arguments
Daniel Stenberg [Wed, 26 Aug 2020 13:25:53 +0000 (15:25 +0200)] 
ngtcp2: adapt to the new pkt_info arguments

Guidance-by: Tatsuhiro Tsujikawa
Closes #5864

4 years agowinbuild/README.md: make <options> visible
Daniel Stenberg [Wed, 26 Aug 2020 13:55:40 +0000 (15:55 +0200)] 
winbuild/README.md: make <options> visible

Follow-up to be753add31c2d8c