]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
3 years agolib: don't use strerror()
Daniel Stenberg [Wed, 8 Sep 2021 09:27:49 +0000 (11:27 +0200)] 
lib: don't use strerror()

We have and provide Curl_strerror() internally for a reason: strerror()
is not necessarily thread-safe so we should always try to avoid it.

Extended checksrc to warn for this, but feature the check disabled by
default and only enable it in lib/

Closes #7685

3 years agocirrus: Add FreeBSD 13.0 job and disable sanitizer build
Daniel Gustafsson [Wed, 8 Sep 2021 08:14:45 +0000 (10:14 +0200)] 
cirrus: Add FreeBSD 13.0 job and disable sanitizer build

As alluded to the in the now removed comment, a 13.0 image became
available and is now ready to be used.

The sanitizer builds were running on the 12.1 image which since has
been removed from the config, leaving the builds not running at all.
When enabled it turns out that they don't actually work due to very
long timeouts in executing the tests, so keep the disabled for now
but a bit more controlled.

Closes #7592

3 years agocopyrights: update copyright year ranges
Daniel Stenberg [Wed, 8 Sep 2021 07:36:49 +0000 (09:36 +0200)] 
copyrights: update copyright year ranges

3 years agoRELEASE-NOTES: synced
Daniel Stenberg [Wed, 8 Sep 2021 06:54:29 +0000 (08:54 +0200)] 
RELEASE-NOTES: synced

3 years agoINTERNALS: c-ares has a new home: c-ares.org
Daniel Stenberg [Tue, 7 Sep 2021 12:56:09 +0000 (14:56 +0200)] 
INTERNALS: c-ares has a new home: c-ares.org

3 years agodocs: remove experimental mentions from HSTS and MQTT
Daniel Stenberg [Mon, 6 Sep 2021 21:04:13 +0000 (23:04 +0200)] 
docs: remove experimental mentions from HSTS and MQTT

Reported-by: Jonathan Cardoso
Bug: https://github.com/curl/curl/pull/6700#issuecomment-913792863
Closes #7681

3 years agocurl: add warning for incompatible parameters usage
Cao ZhenXiang [Sun, 5 Sep 2021 05:04:38 +0000 (13:04 +0800)] 
curl: add warning for incompatible parameters usage

--continue-at - and --remote-header-name are known incompatible parameters

Closes #7674

3 years agoexamples/*hiperfifo.c: fix calloc arguments to match function proto
git-bruh [Mon, 6 Sep 2021 13:51:30 +0000 (19:21 +0530)] 
examples/*hiperfifo.c: fix calloc arguments to match function proto

Closes #7678

3 years agoINTERNALS: bump c-ares requirement to 1.16.0
Daniel Stenberg [Mon, 6 Sep 2021 14:00:52 +0000 (16:00 +0200)] 
INTERNALS: bump c-ares requirement to 1.16.0

Since ba904db0705c93 we use ares_getaddrinfo, added in c-ares 1.16.0

3 years agocurl: stop retry if Retry-After: is longer than allowed
Daniel Stenberg [Mon, 6 Sep 2021 07:08:01 +0000 (09:08 +0200)] 
curl: stop retry if Retry-After: is longer than allowed

If Retry-After: specifies a period that is longer than what fits within
--retry-max-time, then stop retrying immediately.

Added test 366 to verify.

Reported-by: Kari Pahula
Fixes #7675
Closes #7676

3 years agombedtls: avoid using a large buffer on the stack
MAntoniak [Tue, 17 Aug 2021 16:40:25 +0000 (18:40 +0200)] 
mbedtls: avoid using a large buffer on the stack

Use dynamic memory allocation for the buffer used in checking "pinned
public key". The PUB_DER_MAX_BYTES parameter with default settings is
set to a value greater than 2kB.

Co-authored-by: Daniel Stenberg
Closes #7586

3 years agoconfigure: make --disable-hsts work
Daniel Stenberg [Sat, 4 Sep 2021 21:41:07 +0000 (23:41 +0200)] 
configure: make --disable-hsts work

The AC_ARG_ENABLE() macro itself uses a variable called
'enable_[option]', so when our script also used a variable with that
name for the purpose of storing what the user wants, it also
accidentally made it impossible to switch off the feature with
--disable-hsts. Fix this by renaming our variable.

Reported-by: Michał Antoniak
Fixes #7669
Closes #7672

3 years agoconfig.d: note that curlrc is used even when --config
Jay Satiro [Fri, 3 Sep 2021 06:19:33 +0000 (02:19 -0400)] 
config.d: note that curlrc is used even when --config

Bug: https://github.com/curl/curl/pull/7666#issuecomment-912214751
Reported-by: Viktor Szakats
Closes https://github.com/curl/curl/pull/7667

3 years agoRELEASE-NOTES: synced
Daniel Stenberg [Sat, 4 Sep 2021 09:42:05 +0000 (11:42 +0200)] 
RELEASE-NOTES: synced

3 years agotest1173: check references to libcurl options
Daniel Stenberg [Wed, 1 Sep 2021 10:57:06 +0000 (12:57 +0200)] 
test1173: check references to libcurl options

... that they refer to actual existing libcurl options.

Reviewed-by: Daniel Gustafsson
Closes #7656

3 years agoCURLOPT_UNIX_SOCKET_PATH.3: remove nginx reference, add see also
Daniel Stenberg [Thu, 2 Sep 2021 07:21:27 +0000 (09:21 +0200)] 
CURLOPT_UNIX_SOCKET_PATH.3: remove nginx reference, add see also

Closes #7656

3 years agoopt-docs: verify man page sections + order
Daniel Stenberg [Wed, 1 Sep 2021 08:26:36 +0000 (10:26 +0200)] 
opt-docs: verify man page sections + order

In every libcurl option man page there are now 8 mandatory sections that
must use the right name in the correct order and test 1173 verifies
this. Only 14 man pages needed adjustments.

The sections and the order is as follows:

 - NAME
 - SYNOPSIS
 - DESCRIPTION
 - PROTOCOLS
 - EXAMPLE
 - AVAILABILITY
 - RETURN VALUE
 - SEE ALSO

Reviewed-by: Daniel Gustafsson
Closes #7656

3 years agoopt-docs: make sure all man pages have examples
Daniel Stenberg [Wed, 1 Sep 2021 07:23:37 +0000 (09:23 +0200)] 
opt-docs: make sure all man pages have examples

Extended manpage-syntax.pl (run by test 1173) to check that every man
page for a libcurl option has an EXAMPLE section that is more than two
lines. Then fixed all errors it found and added examples.

Reviewed-by: Daniel Gustafsson
Closes #7656

3 years agoget.d: provide more useful examples
Daniel Stenberg [Fri, 3 Sep 2021 08:14:06 +0000 (10:14 +0200)] 
get.d: provide more useful examples

Closes #7668

3 years agopage-header: add GOPHERS, simplify wording in the 1st para
Daniel Stenberg [Thu, 2 Sep 2021 21:19:48 +0000 (23:19 +0200)] 
page-header: add GOPHERS, simplify wording in the 1st para

Closes #7665

3 years agoconnect: get local port + ip also when reusing connections
Daniel Stenberg [Thu, 2 Sep 2021 13:57:25 +0000 (15:57 +0200)] 
connect: get local port + ip also when reusing connections

Regression. In d6a37c23a3c (7.75.0) we removed the duplicated storage
(connection + easy handle), so this info needs be extracted again even
for re-used connections.

Add test 435 to verify

Reported-by: Max Dymond
Fixes #7660
Closes #7662

3 years agomulti: fix compiler warning with `CURL_DISABLE_WAKEUP` 7661/head
Marcel Raad [Thu, 2 Sep 2021 13:47:42 +0000 (15:47 +0200)] 
multi: fix compiler warning with `CURL_DISABLE_WAKEUP`

`use_wakeup` is unused in this case.

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

3 years agotests: adjust the tftpd output to work with hyper mode
Daniel Stenberg [Wed, 1 Sep 2021 13:51:06 +0000 (15:51 +0200)] 
tests: adjust the tftpd output to work with hyper mode

By making them look less like http headers, the hyper mode "tweak"
doesn't interfere.

Enable test 2002 and 2003 in hyper builds (and 1280 which is unrelated
but should be enabled).

Closes #7658

3 years agoopenssl: annotate SSL3_MT_SUPPLEMENTAL_DATA
Gisle Vanem [Tue, 31 Aug 2021 12:08:34 +0000 (14:08 +0200)] 
openssl: annotate SSL3_MT_SUPPLEMENTAL_DATA

This adds support for the previously unhandled supplemental data which
in -v output was printed like:

    TLSv1.2 (IN), TLS header, Unknown (23):

These will now be printed with proper annotation:

    TLSv1.2 (OUT), TLS header, Supplemental data (23):

Closes #7652
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
3 years agocurl.1: provide examples for each option
Daniel Stenberg [Tue, 31 Aug 2021 14:37:14 +0000 (16:37 +0200)] 
curl.1: provide examples for each option

The file format for each option now features a "Example:" header that
can provide one or more examples that get rendered appropriately in the
output. All options MUST have at least one example or gen.pl complains
at build-time.

This fix also does a few other minor format and consistency cleanups.

Closes #7654

3 years agoprogress: make trspeed avoid floats
Daniel Stenberg [Tue, 31 Aug 2021 12:09:28 +0000 (14:09 +0200)] 
progress: make trspeed avoid floats

and compiler warnings for data conversions.

Reported-by: Michał Antoniak
Fixes #7645
Closes #7653

3 years agotest365: verify response with chunked AND Content-Length headers
Daniel Stenberg [Mon, 30 Aug 2021 20:45:15 +0000 (22:45 +0200)] 
test365: verify response with chunked AND Content-Length headers

3 years agohttp: ignore content-length if any transfer-encoding is used
Daniel Stenberg [Mon, 30 Aug 2021 15:49:25 +0000 (17:49 +0200)] 
http: ignore content-length if any transfer-encoding is used

Fixes #7643
Closes #7649

3 years agoRELEASE-NOTES: synced
Daniel Stenberg [Tue, 31 Aug 2021 06:55:45 +0000 (08:55 +0200)] 
RELEASE-NOTES: synced

3 years agoRevert "http2: skip immediate parsing of payload following protocol switch"
Daniel Stenberg [Mon, 30 Aug 2021 10:54:24 +0000 (12:54 +0200)] 
Revert "http2: skip immediate parsing of payload following protocol switch"

This reverts commit 455a63c66f188598275e87d32de2c4e8e26b80cb.

Reported-by: Tk Xiong
Fixes #7633
Closes #7648

3 years agoKNOWN_BUGS: HTTP/3 doesn't support client certs
Daniel Stenberg [Mon, 30 Aug 2021 11:23:24 +0000 (13:23 +0200)] 
KNOWN_BUGS: HTTP/3 doesn't support client certs

Closes #7625

3 years agomailing lists: move from cool.haxx.se to lists.haxx.se
Daniel Stenberg [Mon, 30 Aug 2021 07:51:07 +0000 (09:51 +0200)] 
mailing lists: move from cool.haxx.se to lists.haxx.se

3 years agohttp_proxy: only wait for writable socket while sending request
Daniel Stenberg [Fri, 27 Aug 2021 15:42:40 +0000 (17:42 +0200)] 
http_proxy: only wait for writable socket while sending request

Otherwise it would wait socket writability even after the entire CONNECT
request has sent and make curl basically busy-loop while waiting for a
response to come back.

The previous fix attempt in #7484 (c27a70a591a4) was inadequate.

Reported-by: zloi-user on github
Reported-by: Oleguer Llopart
Fixes #7589
Closes #7647

3 years agohttp: disallow >3-digit response codes
Daniel Stenberg [Thu, 26 Aug 2021 14:04:50 +0000 (16:04 +0200)] 
http: disallow >3-digit response codes

Make the built-in HTTP parser behave similar to hyper and reject any
HTTP response using more than 3 digits for the response code.

Updated test 1432 accordingly.
Enabled test 1432 in the hyper builds.

Closes #7641

3 years agongtcp2: stop buffering crypto data
Tatsuhiro Tsujikawa [Thu, 26 Aug 2021 12:20:52 +0000 (21:20 +0900)] 
ngtcp2: stop buffering crypto data

Stop buffering crypto data because libngtcp2 now buffers submitted
crypto data.

Closes #7637

3 years agotest1280: CRLFify the response to please hyper
Daniel Stenberg [Thu, 26 Aug 2021 12:49:41 +0000 (14:49 +0200)] 
test1280: CRLFify the response to please hyper

Closes #7639

3 years agotests: enable test 1129 for hyper builds
Daniel Stenberg [Thu, 26 Aug 2021 12:46:23 +0000 (14:46 +0200)] 
tests: enable test 1129 for hyper builds

Closes #7638

3 years agocurl: better error message when -O fails to get a good name
Daniel Stenberg [Thu, 26 Aug 2021 05:43:34 +0000 (07:43 +0200)] 
curl: better error message when -O fails to get a good name

Due to how this currently works internally, it needs a working initial
file name to store contents in, so it may still fail even with -J is
used (and thus accepting a name from content-disposition:) if the file
name part of the URL isn't "good enough".

Fixes #7628
Closes #7635

3 years agocurl_easy_setopt: tweak the string copy wording
Daniel Stenberg [Thu, 26 Aug 2021 05:51:19 +0000 (07:51 +0200)] 
curl_easy_setopt: tweak the string copy wording

Reported-by: Yaobin Wen
Fixes #7632
Closes #7634

3 years agoRELEASE-NOTES: synced
Daniel Stenberg [Wed, 25 Aug 2021 11:10:52 +0000 (13:10 +0200)] 
RELEASE-NOTES: synced

3 years agocmake: sync CURL_DISABLE options
Don [Tue, 24 Aug 2021 18:27:39 +0000 (11:27 -0700)] 
cmake: sync CURL_DISABLE options

Adds the full listing of CURL_DISABLE options to the CMake build. Moves
all option code, except for CURL_DISABLE_OPENSSL_AUTO_LOA_CONFIG which
resides near OpenSSL configuration, to the same block of code. Also
sorts the options here and in the cmake config header.

Additionally sorted the CURL-DISABLE listing and fixed the
CURL_DISABLE_POP3 option.

Closes #7624

3 years agoKNOWN_BUGS: FTPS upload data loss with TLS 1.3
Jay Satiro [Tue, 24 Aug 2021 16:54:03 +0000 (12:54 -0400)] 
KNOWN_BUGS: FTPS upload data loss with TLS 1.3

Bug: https://github.com/curl/curl/issues/6149
Reported-by: Bylon2@users.noreply.github.com
Closes https://github.com/curl/curl/pull/7623

3 years agocmake: avoid poll() on macOS
Daniel Stenberg [Mon, 23 Aug 2021 14:39:33 +0000 (16:39 +0200)] 
cmake: avoid poll() on macOS

... like we do in configure builds. Since poll() on macOS is not
reliable enough.

Reported-by: marc-groundctl
Fixes #7595
Closes #7619

3 years agoc-hyper: handle HTTP/1.1 => HTTP/1.0 downgrade on reused connection
Daniel Stenberg [Mon, 23 Aug 2021 12:20:08 +0000 (14:20 +0200)] 
c-hyper: handle HTTP/1.1 => HTTP/1.0 downgrade on reused connection

Enable test 1074

Closes #7617

3 years agoc-hyper: deal with Expect: 100-continue combined with POSTFIELDS
Daniel Stenberg [Mon, 23 Aug 2021 11:04:59 +0000 (13:04 +0200)] 
c-hyper: deal with Expect: 100-continue combined with POSTFIELDS

Enable test 1130 and 1131

Closes #7616

3 years agotests: be explicit about using 'python3' instead of 'python'
a1346054 [Sat, 21 Aug 2021 12:07:34 +0000 (12:07 +0000)] 
tests: be explicit about using 'python3' instead of 'python'

This fixes running tests in virtualenvs (or on distros) that no longer
have a symlink from python to python2 or python3.

Closes #7602

3 years agoscripts: invoke interpreters through /usr/bin/env
a1346054 [Sat, 21 Aug 2021 10:57:11 +0000 (10:57 +0000)] 
scripts: invoke interpreters through /usr/bin/env

Closes #7602

3 years agoDISABLED: enable 11 more tests for hyper builds
Daniel Stenberg [Mon, 23 Aug 2021 07:27:43 +0000 (09:27 +0200)] 
DISABLED: enable 11 more tests for hyper builds

Closes #7612

3 years agosetopt: enable CURLOPT_IGNORE_CONTENT_LENGTH for hyper
Daniel Stenberg [Mon, 23 Aug 2021 07:58:54 +0000 (09:58 +0200)] 
setopt: enable CURLOPT_IGNORE_CONTENT_LENGTH for hyper

Since this option is also used for FTP, it needs to work to set for
applications even if hyper doesn't support it for HTTP. Verified by test
1137.

Updated docs to specify that the option doesn't work for HTTP when using
the hyper backend.

Closes #7614

3 years agotest1138: remove trailing space to make work with hyper
Daniel Stenberg [Mon, 23 Aug 2021 07:50:46 +0000 (09:50 +0200)] 
test1138: remove trailing space to make work with hyper

Closes #7613

3 years agolibcurl-errors.3: clarify two CURLUcode errors
Daniel Stenberg [Mon, 23 Aug 2021 06:38:32 +0000 (08:38 +0200)] 
libcurl-errors.3: clarify two CURLUcode errors

CURLUE_BAD_HANDLE and CURLUE_BAD_PARTPOINTER should be for "bad" or
wrong pointers in a generic sense, not just for NULL pointers.

Reviewed-by: Jay Satiro
Ref: #7605
Closes #7611

3 years agosymbols-in-versions: fix CURLSSLBACKEND_QSOSSL last used version
Jay Satiro [Sun, 22 Aug 2021 05:24:46 +0000 (01:24 -0400)] 
symbols-in-versions: fix CURLSSLBACKEND_QSOSSL last used version

... and also change the 'Removed' column name to 'Last' since that
column is for the last version to contain the symbol.

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

3 years agourlapi.c:seturl: assert URL instead of using if-check
Daniel Stenberg [Sun, 22 Aug 2021 22:34:16 +0000 (00:34 +0200)] 
urlapi.c:seturl: assert URL instead of using if-check

There's no code flow possible where this can happen. The assert makes
sure it also won't be introduced undetected in the future.

Closes #7610

3 years agocurl-openssl.m4: show correct output for OpenSSL v3
Daniel Stenberg [Sat, 21 Aug 2021 21:27:50 +0000 (23:27 +0200)] 
curl-openssl.m4: show correct output for OpenSSL v3

Using 3.0.0 versions configure should now show this:

checking for OpenSSL headers version... 3.0.0 - 0x300
checking for OpenSSL library version... 3.0.0
checking for OpenSSL headers and library versions matching... yes

This output doesn't actually change what configure generates but is only
"cosmetic".

Reported-by: Randall S. Becker
Fixes #7606
Closes #7608

3 years agomksymbolsmanpage.pl: Fix showing symbol's last used version
Jay Satiro [Sun, 22 Aug 2021 05:12:26 +0000 (01:12 -0400)] 
mksymbolsmanpage.pl: Fix showing symbol's last used version

Prior to this change the symbol's deprecated version was erroneously
shown as its last used version.

Bug: https://github.com/curl/curl/commit/4e53b94#commitcomment-55239509
Reported-by: i-ky@users.noreply.github.com
3 years agomksymbolsmanpage.pl: match symbols case insenitively
Daniel Stenberg [Sat, 21 Aug 2021 20:56:48 +0000 (22:56 +0200)] 
mksymbolsmanpage.pl: match symbols case insenitively

Follow-up to 4e53b9430c750 which made this bug show.

Reported-by: i-ky
Bug: https://github.com/curl/curl/commit/4e53b9430c7504de8984796e2a2091ec16f27136#commitcomment-55239253
Closes #7607

3 years agoasyn-ares: call ares_freeaddrinfo() to clean up addrinfo results
Daniel Stenberg [Fri, 20 Aug 2021 12:39:14 +0000 (14:39 +0200)] 
asyn-ares: call ares_freeaddrinfo() to clean up addrinfo results

As this leaks memory otherwise

Follow-up to ba904db0705c931

Closes #7599

3 years agowolfssl: clean up wolfcrypt error queue
Ehren Bendler [Thu, 19 Aug 2021 17:45:55 +0000 (13:45 -0400)] 
wolfssl: clean up wolfcrypt error queue

If wolfSSL is built in certain ways (OPENSSL_EXTRA or Debug), the error
queue gets added on to for each session and never freed. Fix it by
calling ERR_clear_error() like in vtls/openssl when needed. This func is
a no-op in wolfcrypt if the error queue is not enabled.

Closes #7594

3 years agoman pages: remove trailing whitespaces
Daniel Stenberg [Sat, 21 Aug 2021 13:31:31 +0000 (15:31 +0200)] 
man pages: remove trailing whitespaces

Extended test 1173 (via the manpage-syntax.pl script) to detect and warn
for them.

Ref: #7602
Reported-by: a1346054 on github
Closes #7604

3 years agomailmap: add Gleb Ivanovsky
Daniel Stenberg [Sat, 21 Aug 2021 14:38:06 +0000 (16:38 +0200)] 
mailmap: add Gleb Ivanovsky

3 years agoconfig.d: escape the backslash properly
Daniel Stenberg [Sat, 21 Aug 2021 13:02:04 +0000 (15:02 +0200)] 
config.d: escape the backslash properly

Closes #7603

3 years agocurl_setup.h: sync values for HTTP_ONLY
Don [Fri, 20 Aug 2021 16:29:10 +0000 (09:29 -0700)] 
curl_setup.h: sync values for HTTP_ONLY

The values for HTTP_ONLY differed between CMakeLists.txt and
curl_setup.h. Sync them and sort the values in curl_setup.h to make it
easier to spot differences.

Closes #7601

3 years agoconfigure: set classic mingw minimum OS version to XP
Jay Satiro [Tue, 17 Aug 2021 06:24:48 +0000 (02:24 -0400)] 
configure: set classic mingw minimum OS version to XP

- If the user has not specified a minimum OS version (via WINVER or
  _WIN32_WINNT macros) then set it to Windows XP.

Prior to this change classic MinGW defaulted the minimum OS version
to Windows NT 4.0 which is way too old. At least Windows XP is needed
for getaddrinfo (which resolves hostnames to IPv6 addresses).

Ref: https://github.com/curl/curl/issues/7483#issuecomment-891597034

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

3 years agoschannel: Work around typo in classic mingw macro
Jay Satiro [Tue, 17 Aug 2021 06:17:21 +0000 (02:17 -0400)] 
schannel: Work around typo in classic mingw macro

- Define ALG_CLASS_DHASH (the typo from the include) to ALG_CLASS_HASH.

Prior to this change there was an incomplete fix to ignore the
CALG_TLS1PRF macro on those versions of MinGW where it uses the
ALG_CLASS_DHASH typoed macro.

Ref: 48cf45c
Ref: https://osdn.net/projects/mingw/ticket/38391
Ref: https://github.com/curl/curl/issues/2924

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

3 years agoRELEASE-NOTES: synced
Daniel Stenberg [Fri, 20 Aug 2021 11:57:20 +0000 (13:57 +0200)] 
RELEASE-NOTES: synced

3 years agohttp_proxy: fix user-agent and custom headers for CONNECT with hyper
Daniel Stenberg [Fri, 20 Aug 2021 11:34:51 +0000 (13:34 +0200)] 
http_proxy: fix user-agent and custom headers for CONNECT with hyper

Enable test 287

Closes #7598

3 years agoc-hyper: initial support for "dumping" 1xx HTTP responses
Daniel Stenberg [Sat, 14 Aug 2021 16:04:22 +0000 (18:04 +0200)] 
c-hyper: initial support for "dumping" 1xx HTTP responses

With the use hyper_request_on_informational()

Enable test 155 and 158

Closes #7597

3 years agotests/*server.pl: flush output before executing subprocess
Marc Hoersken [Tue, 17 Aug 2021 19:16:41 +0000 (21:16 +0200)] 
tests/*server.pl: flush output before executing subprocess

Also avoid shell processes staying around by using exec.
This is necessary to avoid output data being buffering
inside the process chain of Perl, Bash/Shell and our
test server binaries. On non-Windows systems the exec
will also make the subprocess replace the intermediate
shell, but on Windows it will at least bind the processes
together since there is no real fork or exec available.

See: https://cygwin.com/cygwin-ug-net/highlights.html
and: https://docs.microsoft.com/cpp/c-runtime-library/exec-wexec-functions
Ref: https://github.com/curl/curl/pull/7530#issuecomment-900949010

Reviewed-by: Daniel Stenberg
Reviewed-by: Jay Satiro
Closes #7530

3 years agoCI: use GitHub Container Registry instead of Docker Hub
Marc Hoersken [Tue, 17 Aug 2021 19:39:17 +0000 (21:39 +0200)] 
CI: use GitHub Container Registry instead of Docker Hub

Avoid limits on Docker Hub and improve image pull/download speed.

Closes #7587

3 years agoopenssl: when creating a new context, there cannot be an old one
Daniel Stenberg [Tue, 17 Aug 2021 14:52:55 +0000 (16:52 +0200)] 
openssl: when creating a new context, there cannot be an old one

Remove the previous handling that would call SSL_CTX_free(), and instead
add an assert that halts a debug build if there ever is a context
already set at this point.

Closes #7585

3 years agoKNOWN_BUGS: Renegotiate from server may cause hang for OpenSSL backend
Jay Satiro [Wed, 18 Aug 2021 07:41:41 +0000 (03:41 -0400)] 
KNOWN_BUGS: Renegotiate from server may cause hang for OpenSSL backend

Closes https://github.com/curl/curl/issues/6785

3 years agodocs/BINDINGS: URL update
Viktor Szakats [Tue, 17 Aug 2021 23:16:46 +0000 (23:16 +0000)] 
docs/BINDINGS: URL update

3 years agotests/server/*.c: align handling of portfile argument and file
Marc Hoersken [Sun, 15 Aug 2021 10:40:54 +0000 (12:40 +0200)] 
tests/server/*.c: align handling of portfile argument and file

1. Call the internal variable portname (like pidname) everywhere.
2. Have a variable wroteportfile (like wrotepidfile) everywhere.
3. Make sure the file is cleaned up on exit (like pidfile).
4. Add parameter --portfile to usage outputs everywhere.

Reviewed-by: Daniel Stenberg
Replaces #7523
Closes #7574

3 years agoKNOWN_BUGS: Fix a number of typos in KNOWN_BUGS
Daniel Gustafsson [Tue, 17 Aug 2021 11:49:04 +0000 (13:49 +0200)] 
KNOWN_BUGS: Fix a number of typos in KNOWN_BUGS

Fixes a set of typos found in section 11.3.

3 years agogetparameter: fix the --local-port number parser
Daniel Stenberg [Tue, 17 Aug 2021 07:50:02 +0000 (09:50 +0200)] 
getparameter: fix the --local-port number parser

It could previously get tricked into parsing the uninitialized stack
based buffer.

Reported-by: Brian Carpenter
Closes #7582

3 years agoKNOWN_BUGS: Can't use Secure Transport with Crypto Token Kit
Daniel Stenberg [Tue, 17 Aug 2021 08:29:00 +0000 (10:29 +0200)] 
KNOWN_BUGS: Can't use Secure Transport with Crypto Token Kit

Closes #7048

3 years agocurl: add warning for ignored data after quoted form parameter
Jan Verbeek [Wed, 14 Jul 2021 21:45:45 +0000 (23:45 +0200)] 
curl: add warning for ignored data after quoted form parameter

In an argument like `-F 'x=@/etc/hostname;filename="foo"abc'` the `abc`
is ignored. This adds a warning if the ignored data isn't all
whitespace.

Closes #7394

3 years agocodeql: fix error "Resource not accessible by integration"
Jay Satiro [Mon, 16 Aug 2021 04:56:48 +0000 (00:56 -0400)] 
codeql: fix error "Resource not accessible by integration"

- Enable codeql writing security-events.

GitHub set the default permissions to read, apparently since earlier
this year.

Ref: https://github.com/github/codeql-action/issues/464
Ref: https://github.blog/changelog/2021-04-20-github-actions-control-permissions-for-github_token/

Fixes https://github.com/curl/curl/issues/7575
Closes https://github.com/curl/curl/pull/7576

3 years agotool_operate: Fix --fail-early with parallel transfers
Jay Satiro [Thu, 29 Apr 2021 21:06:49 +0000 (17:06 -0400)] 
tool_operate: Fix --fail-early with parallel transfers

- Abort via progress callback to fail early during parallel transfers.

When a critical error occurs during a transfer (eg --fail-early
constraint) then other running transfers will be aborted via progress
callback and finish with error CURLE_ABORTED_BY_CALLBACK (42). In this
case, the callback error does not become the most recent error and a
custom error message is used for those transfers:

curld --fail --fail-early --parallel
https://httpbin.org/status/404 https://httpbin.org/delay/10

curl: (22) The requested URL returned error: 404
curl: (42) Transfer aborted due to critical error in another transfer

> echo %ERRORLEVEL%
22

Fixes https://github.com/curl/curl/issues/6939
Closes https://github.com/curl/curl/pull/6984

3 years agosectransp: support CURLINFO_CERTINFO
Sergey Markelov [Sat, 10 Jul 2021 00:30:38 +0000 (17:30 -0700)] 
sectransp: support CURLINFO_CERTINFO

Fixes #4130
Closes #7372

3 years agongtcp2: remove the acked_crypto_offset struct field init
Daniel Stenberg [Mon, 16 Aug 2021 15:04:45 +0000 (17:04 +0200)] 
ngtcp2: remove the acked_crypto_offset struct field init

... as it is gone from the API upstream.

Closes #7578

3 years agomisc: update incorrect copyright year ranges
Daniel Stenberg [Mon, 16 Aug 2021 07:26:27 +0000 (09:26 +0200)] 
misc: update incorrect copyright year ranges

Closes #7577

3 years agoKNOWN_BUGS: HTTP/3 quiche upload large file fails
Daniel Stenberg [Mon, 16 Aug 2021 08:39:15 +0000 (10:39 +0200)] 
KNOWN_BUGS: HTTP/3 quiche upload large file fails

Closes #7532

3 years agoKNOWN_BUGS: CMake build with MIT Kerberos does not work
Daniel Stenberg [Mon, 16 Aug 2021 07:40:32 +0000 (09:40 +0200)] 
KNOWN_BUGS: CMake build with MIT Kerberos does not work

Closes #6904

3 years agoTODO: add asynch getaddrinfo support
Daniel Stenberg [Mon, 16 Aug 2021 07:37:16 +0000 (09:37 +0200)] 
TODO: add asynch getaddrinfo support

Closes #6746

3 years agoRELEASE-NOTES: synced
Daniel Stenberg [Mon, 16 Aug 2021 07:18:38 +0000 (09:18 +0200)] 
RELEASE-NOTES: synced

3 years agohttp2: revert call the handle-closed function correctly on closed stream
Artur Sinila [Sun, 1 Aug 2021 22:34:14 +0000 (01:34 +0300)] 
http2: revert call the handle-closed function correctly on closed stream

Reverts 252790c5335a221

Assisted-by: Gergely Nagy
Fixes #7400
Closes #7525

3 years agoauth: do not append zero-terminator to authorisation id in kerberos
Patrick Monnerat [Mon, 16 Aug 2021 06:35:22 +0000 (08:35 +0200)] 
auth: do not append zero-terminator to authorisation id in kerberos

RFC4752 Section 3.1 states "The authorization identity is not terminated
with a zero-valued (%x00) octet". Although a comment in code said it may
be needed anyway, nothing confirms it. In addition, servers may consider
it as part of the identity, causing a failure.

Closes #7008

3 years agoauth: use sasl authzid option in kerberos
Patrick Monnerat [Mon, 16 Aug 2021 06:35:22 +0000 (08:35 +0200)] 
auth: use sasl authzid option in kerberos

... instead of deriving it from active ticket.
Closes #7008

3 years agoauth: we do not support a security layer after kerberos authentication
Patrick Monnerat [Mon, 16 Aug 2021 06:35:22 +0000 (08:35 +0200)] 
auth: we do not support a security layer after kerberos authentication

Closes #7008

3 years agoauth: properly handle byte order in kerberos security message
Patrick Monnerat [Mon, 16 Aug 2021 06:35:22 +0000 (08:35 +0200)] 
auth: properly handle byte order in kerberos security message

Closes #7008

3 years agox509asn1: fix heap over-read when parsing x509 certificates
z2_ [Thu, 5 Aug 2021 19:08:37 +0000 (21:08 +0200)] 
x509asn1: fix heap over-read when parsing x509 certificates

Assisted-by: Patrick Monnerat
Closes #7536

3 years agoKNOWN_BUGS: Disconnects don't do verbose
Daniel Stenberg [Sat, 14 Aug 2021 21:32:46 +0000 (23:32 +0200)] 
KNOWN_BUGS: Disconnects don't do verbose

Closes #6995

3 years agomailmap: fixup Michał Antoniak
Daniel Stenberg [Sat, 14 Aug 2021 21:23:09 +0000 (23:23 +0200)] 
mailmap: fixup Michał Antoniak

3 years agobuild: fix compiler warnings
MAntoniak [Sat, 17 Jul 2021 20:43:52 +0000 (22:43 +0200)] 
build: fix compiler warnings

For when CURL_DISABLE_VERBOSE_STRINGS and DEBUGBUILD flags are both
active.

- socks.c : warning C4100: 'lineno': unreferenced formal parameter
  (co-authored by Daniel Stenberg)

- mbedtls.c: warning C4189: 'port': local variable is initialized but
  not referenced

- schannel.c: warning C4189: 'hostname': local variable is initialized
  but not referenced

Cloes #7528

3 years agoCODE_STYLE-md: fix bold font style
i-ky [Fri, 13 Aug 2021 21:07:54 +0000 (00:07 +0300)] 
CODE_STYLE-md: fix bold font style

Markdown gets confused with abundance of asterisks, so use underscores
instead.

Reviewed-by: Daniel Gustafsson
Closes #7569

3 years agoCODE_STYLE-md: add missing comma
i-ky [Fri, 13 Aug 2021 22:02:38 +0000 (01:02 +0300)] 
CODE_STYLE-md: add missing comma

Reviewed-by: Daniel Gustafsson
Closes #7570

3 years agoexamples/ephiperfifo.c: simplify signal handler
Daniel Gustafsson [Mon, 28 Jun 2021 22:57:34 +0000 (00:57 +0200)] 
examples/ephiperfifo.c: simplify signal handler

The signal handler registered for SIGINT is only handling SIGINT
so there isn't much need for inspecting the signo.  While there,
rename the handler to be more specific.

g_should_exit should really be of sig_atomic_t type, but relying
on autoconf in the examples seems like a bad idea so keep that
for now.

Reviewed-by: Daniel Stenberg
Closes #7310

3 years agoc-hyper: initial step for 100-continue support
Daniel Stenberg [Fri, 13 Aug 2021 15:29:33 +0000 (17:29 +0200)] 
c-hyper: initial step for 100-continue support

Enabled test 154

Closes #7568

3 years agovtls: fix typo in schannel_verify.c
Ikko Ashimine [Fri, 13 Aug 2021 13:49:41 +0000 (22:49 +0900)] 
vtls: fix typo in schannel_verify.c

occurence -> occurrence

Closes #7566