]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
3 years agoopenssl: if verifypeer is not requested, skip the CA loading
Daniel Stenberg [Fri, 22 Oct 2021 10:34:34 +0000 (12:34 +0200)] 
openssl: if verifypeer is not requested, skip the CA loading

It was previously done mostly to show a match/non-match in the verbose
output even when verification was not asked for. This change skips the
loading of the CA certs unless verifypeer is set to save memory and CPU.

Closes #7892

3 years agocurl-confopts.m4: remove --enable/disable-hidden-symbols
Daniel Stenberg [Fri, 22 Oct 2021 07:13:30 +0000 (09:13 +0200)] 
curl-confopts.m4:  remove --enable/disable-hidden-symbols

These configure options have been saying "deprecated" since 9e24b9c7af
(April 2012). It was about time we remove them.

Closes #7891

3 years agoc-hyper: don't abort CONNECT responses early when auth-in-progress
Daniel Stenberg [Fri, 22 Oct 2021 08:57:54 +0000 (10:57 +0200)] 
c-hyper: don't abort CONNECT responses early when auth-in-progress

... and make sure to stop ignoring the body once the CONNECT is done.

This should make test 206 work proper again and not be flaky.

Closes #7889

3 years agohyper: does not support disabling CURLOPT_HTTP_TRANSFER_DECODING
Daniel Stenberg [Fri, 22 Oct 2021 06:44:14 +0000 (08:44 +0200)] 
hyper: does not support disabling CURLOPT_HTTP_TRANSFER_DECODING

Simply because hyper doesn't have this ability. Mentioned in docs now.

Skip test 326 then

Closes #7889

3 years agotest262: don't attempt with hyper
Daniel Stenberg [Thu, 21 Oct 2021 20:30:37 +0000 (22:30 +0200)] 
test262: don't attempt with hyper

This test verifies that curl works with binary zeroes in HTTP response
headers and hyper refuses such. They're not kosher http.

Closes #7889

3 years agoc-hyper: make test 217 run
Daniel Stenberg [Thu, 21 Oct 2021 17:44:29 +0000 (19:44 +0200)] 
c-hyper: make test 217 run

Closes #7889

3 years agoDISABLED: enable test 209+213 for hyper
Daniel Stenberg [Thu, 21 Oct 2021 15:37:56 +0000 (17:37 +0200)] 
DISABLED: enable test 209+213 for hyper

Follow-up to 823d3ab855c

Closes #7889

3 years agotest207: accept a different error code for hyper
Daniel Stenberg [Thu, 21 Oct 2021 15:36:19 +0000 (17:36 +0200)] 
test207: accept a different error code for hyper

It returns HYPERE_UNEXPECTED_EOF for this case which we convert to the
somewhat generic CURLE_RECV_ERROR.

Closes #7889

3 years agoINSTALL: update symbol hiding option
Érico Nogueira [Thu, 21 Oct 2021 19:57:33 +0000 (16:57 -0300)] 
INSTALL: update symbol hiding option

--enable-hidden-symbols was deprecated in
9e24b9c7afbcb81120af4cf3f6cdee49a06d8224.

Closes #7890

3 years agohttp_proxy: multiple CONNECT with hyper done better
Daniel Stenberg [Thu, 21 Oct 2021 14:42:42 +0000 (16:42 +0200)] 
http_proxy: multiple CONNECT with hyper done better

Enabled test 206

Closes #7888

3 years agohyper: pass the CONNECT line to the debug callback
Daniel Stenberg [Thu, 21 Oct 2021 14:03:11 +0000 (16:03 +0200)] 
hyper: pass the CONNECT line to the debug callback

Closes #7887

3 years agomailmap: Malik Idrees Hasan Khan
Daniel Stenberg [Thu, 21 Oct 2021 07:43:51 +0000 (09:43 +0200)] 
mailmap: Malik Idrees Hasan Khan

3 years agobuild: fix typos
MalikIdreesHasa [Thu, 21 Oct 2021 05:41:22 +0000 (05:41 +0000)] 
build: fix typos

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

3 years agoURL-SYNTAX: add IMAP UID SEARCH example
Jay Satiro [Tue, 19 Oct 2021 19:37:19 +0000 (15:37 -0400)] 
URL-SYNTAX: add IMAP UID SEARCH example

- Explain the difference between IMAP search via URL (which returns
  message sequence numbers) and IMAP search via custom request (which
  can return UID numbers if prefixed with UID, eg "UID SEARCH ...").

Bug: https://github.com/curl/curl/issues/7626
Reported-by: orycho@users.noreply.github.com
Ref: https://github.com/curl/curl/issues/2789

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

3 years agomanpage: adjust the asterisk in some SYNOPSIS sections
Daniel Stenberg [Wed, 20 Oct 2021 14:00:46 +0000 (16:00 +0200)] 
manpage: adjust the asterisk in some SYNOPSIS sections

Closes #7884

3 years agocurl_multi_perform.3: polish wording
Daniel Stenberg [Wed, 20 Oct 2021 06:49:17 +0000 (08:49 +0200)] 
curl_multi_perform.3: polish wording

 - simplify the example by using curl_multi_poll

 - mention curl_multi_add_handle in the text

 - cut out the description of pre-7.20.0 return code behavior - that version
   is now more than eleven years old and is basically no longer out there

 - adjust the "typical usage" to mention curl_multi_poll

Closes #7883

3 years agodocs/THANKS: removed on request
Daniel Stenberg [Wed, 20 Oct 2021 08:42:52 +0000 (10:42 +0200)] 
docs/THANKS: removed on request

3 years agoFAQ: polish the explanation of libcurl
Daniel Stenberg [Wed, 20 Oct 2021 07:24:18 +0000 (09:24 +0200)] 
FAQ: polish the explanation of libcurl

3 years agocurl_easy_perform.3: minor wording tweak
Daniel Stenberg [Wed, 20 Oct 2021 06:41:06 +0000 (08:41 +0200)] 
curl_easy_perform.3: minor wording tweak

3 years agomime: mention CURL_DISABLE_MIME in comment
Erik Stenlund [Tue, 19 Oct 2021 20:56:13 +0000 (22:56 +0200)] 
mime: mention CURL_DISABLE_MIME in comment

CURL_DISABLE_MIME is not mentioned in the comment describing the if else
preprocessor directive.

Closes #7882

3 years agotls: remove newline from three infof() calls
Daniel Stenberg [Tue, 19 Oct 2021 15:38:18 +0000 (17:38 +0200)] 
tls: remove newline from three infof() calls

Follow-up to e7416cf

Reported-by: billionai on github
Fixes #7879
Closes #7880

3 years agoRELEASE-NOTES: synced
Daniel Stenberg [Tue, 19 Oct 2021 08:39:40 +0000 (10:39 +0200)] 
RELEASE-NOTES: synced

3 years agocurl_gssapi: fix build warnings by removing const
Daniel Stenberg [Tue, 19 Oct 2021 07:37:41 +0000 (09:37 +0200)] 
curl_gssapi: fix build warnings by removing const

Follow-up to 20e980f85b0ea6

In #7875 these inits were modified but I get two warnings that these new
typecasts are necessary for.

Closes #7876

3 years agocurl_gssapi: fix link error on macOS Monterey
Bo Anderson [Mon, 18 Oct 2021 19:18:28 +0000 (20:18 +0100)] 
curl_gssapi: fix link error on macOS Monterey

Fixes #7657
Closes #7875

3 years agotest1185: verify checksrc
Daniel Stenberg [Sun, 17 Oct 2021 22:16:50 +0000 (00:16 +0200)] 
test1185: verify checksrc

Closes #7866

3 years agochecksrc: improve the SPACESEMICOLON error message
Daniel Stenberg [Mon, 18 Oct 2021 08:46:04 +0000 (10:46 +0200)] 
checksrc: improve the SPACESEMICOLON error message

and adjust the MULTISPACE one to use plural

Closes #7866

3 years agourl: set "k->size" -1 at start of request
Daniel Stenberg [Mon, 18 Oct 2021 12:36:34 +0000 (14:36 +0200)] 
url: set "k->size" -1 at start of request

The size of the transfer is unknown at that point.

Fixes #7871
Closes #7872

3 years agodoh: remove experimental code for DoH with GET
Daniel Gustafsson [Mon, 18 Oct 2021 11:25:57 +0000 (13:25 +0200)] 
doh: remove experimental code for DoH with GET

The code for sending DoH requests with GET was never enabled in a way
such that it could be used or tested. As there haven't been requests
for this feature, and since it at this is effectively dead, remove it
and favor reimplementing the feature in case anyone is interested.

Closes #7870
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
3 years agocirrus: remove FreeBSD 11.4 from the matrix
Daniel Stenberg [Mon, 18 Oct 2021 07:51:11 +0000 (09:51 +0200)] 
cirrus: remove FreeBSD 11.4 from the matrix

It has reached End-Of-Life and causes some LDAP CI issues.

Closes #7869

3 years agocirrus: switch to openldap24-client
Daniel Stenberg [Mon, 18 Oct 2021 07:22:33 +0000 (09:22 +0200)] 
cirrus: switch to openldap24-client

... as it seems openldap-client doesn't exist anymore.

Reported-by: Jay Satiro
Fixes #7868
Closes #7869

3 years agochecksrc: ignore preprocessor lines
Daniel Stenberg [Sat, 16 Oct 2021 11:50:25 +0000 (13:50 +0200)] 
checksrc: ignore preprocessor lines

In order to check the actual code better, checksrc now ignores
everything that look like preprocessor instructions. It also means
that code in macros are now longer checked.

Note that some rules then still don't need to be followed when code is
exactly below a cpp instruction.

Removes two checksrc exceptions we needed previously because of
preprocessor lines being checked.

Reported-by: Marcel Raad
Fixes #7863
Closes #7864

3 years agourlapi: skip a strlen(), pass in zero
Daniel Stenberg [Fri, 15 Oct 2021 14:29:52 +0000 (16:29 +0200)] 
urlapi: skip a strlen(), pass in zero

... to let curl_easy_escape() itself do the strlen. This avoids a (false
positive) Coverity warning and it avoids us having to store the strlen()
return value in an int variable.

Reviewed-by: Daniel Gustafsson
Closes #7862

3 years agomisc: update copyright years
Daniel Stenberg [Fri, 15 Oct 2021 15:07:19 +0000 (17:07 +0200)] 
misc: update copyright years

3 years agoexamples/htmltidy: correct wrong printf() use
Daniel Stenberg [Fri, 15 Oct 2021 06:02:48 +0000 (08:02 +0200)] 
examples/htmltidy: correct wrong printf() use

... and update the includes to match how current htmltidy wants them
used.

Reported-by: Stathis Kapnidis
Fixes #7860
Closes #7861

3 years agohttp: set content length earlier
Jay Satiro [Fri, 1 Oct 2021 17:57:23 +0000 (13:57 -0400)] 
http: set content length earlier

- Make content length (ie download size) accessible to the user in the
  header callback, but only after all headers have been processed (ie
  only in the final call to the header callback).

Background:

For a long time the content length could be retrieved in the header
callback via CURLINFO_CONTENT_LENGTH_DOWNLOAD_T as soon as it was parsed
by curl.

Changes were made in 8a16e54 (precedes 7.79.0) to ignore content length
if any transfer encoding is used. A side effect of that was that
content length was not set by libcurl until after the header callback
was called the final time, because until all headers are processed it
cannot be determined if content length is valid.

This change keeps the same intention --all headers must be processed--
but now the content length is available before the final call to the
header function that indicates all headers have been processed (ie
a blank header).

Bug: https://github.com/curl/curl/commit/8a16e54#r57374914
Reported-by: sergio-nsk@users.noreply.github.com
Co-authored-by: Daniel Stenberg
Fixes https://github.com/curl/curl/issues/7804
Closes https://github.com/curl/curl/pull/7803

3 years agoaws-sigv4: make signature work when post data is binary
Abhinav Singh [Tue, 12 Oct 2021 10:02:27 +0000 (15:32 +0530)] 
aws-sigv4: make signature work when post data is binary

User sets the post fields size for binary data.  Hence, we should not be
using strlen on it.

Added test 1937 and 1938 to verify.

Closes #7844

3 years agoMacOSX-Framework: remove redundant ';'
a1346054 [Sun, 19 Sep 2021 13:04:45 +0000 (13:04 +0000)] 
MacOSX-Framework: remove redundant ';'

Closes #7859

3 years agoRELEASE-NOTES: synced
Daniel Stenberg [Thu, 14 Oct 2021 21:04:27 +0000 (23:04 +0200)] 
RELEASE-NOTES: synced

3 years agoopenssl: with OpenSSL 1.1.0+ a failed RAND_status means goaway
Daniel Stenberg [Thu, 14 Oct 2021 11:57:53 +0000 (13:57 +0200)] 
openssl: with OpenSSL 1.1.0+ a failed RAND_status means goaway

One reason we know it can fail is if a provider is used that doesn't do
a proper job or is wrongly configured.

Reported-by: Michael Baentsch
Fixes #7840
Closes #7856

3 years agocmake: add CURL_ENABLE_SSL option and make CMAKE_USE_* SSL backend options depend...
Ryan Mast [Mon, 4 Oct 2021 00:58:28 +0000 (02:58 +0200)] 
cmake: add CURL_ENABLE_SSL option and make CMAKE_USE_* SSL backend options depend on it

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

3 years agohttp: remove assert that breaks hyper
Daniel Stenberg [Thu, 14 Oct 2021 08:38:22 +0000 (10:38 +0200)] 
http: remove assert that breaks hyper

Reported-by: Jay Satiro
Fixes #7852
Closes #7855

3 years agohttp_proxy: fix one more result assign for hyper
Daniel Stenberg [Thu, 14 Oct 2021 08:33:57 +0000 (10:33 +0200)] 
http_proxy: fix one more result assign for hyper

and remove the bad assert again, since it was run even with no error!

Closes #7854

3 years agosws: fix memory leak on exit
Jay Satiro [Wed, 13 Oct 2021 04:33:23 +0000 (00:33 -0400)] 
sws: fix memory leak on exit

- Free the allocated http request struct on cleanup.

Prior to this change if sws was built with leak sanitizer it would
report a memory leak error during testing.

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

3 years agoc-hyper: make Curl_http propagate errors better
Daniel Stenberg [Wed, 13 Oct 2021 07:15:48 +0000 (09:15 +0200)] 
c-hyper: make Curl_http propagate errors better

Pass on better return codes when errors occur within Curl_http instead
of insisting that CURLE_OUT_OF_MEMORY is the only possible one.

Pointed-out-by: Jay Satiro
Closes #7851

3 years agohttp_proxy: make hyper CONNECT() return the correct error code
Daniel Stenberg [Tue, 12 Oct 2021 15:11:20 +0000 (17:11 +0200)] 
http_proxy: make hyper CONNECT() return the correct error code

For every 'goto error', make sure the result variable holds the error
code for what went wrong.

Reported-by: Rafał Mikrut
Fixes #7825
Closes #7846

3 years agodocs/Makefile.am: repair 'make html'
Daniel Stenberg [Wed, 13 Oct 2021 22:20:28 +0000 (00:20 +0200)] 
docs/Makefile.am: repair 'make html'

by removing index.html which isn't around anymore

Closes #7853

3 years agocurl: correct grammar in generated libcurl code
Борис Верховский [Fri, 1 Oct 2021 14:57:00 +0000 (08:57 -0600)] 
curl: correct grammar in generated libcurl code

Closes #7802

3 years agotests: disable test 2043
Daniel Stenberg [Tue, 12 Oct 2021 14:05:13 +0000 (16:05 +0200)] 
tests: disable test 2043

It uses revoked.badssl.com which now is expired and therefor this now
permafails. We should not use external sites for tests, this test should
be converted to use our own infra.

Closes #7845

3 years agoruntests: split out ignored tests
Daniel Stenberg [Mon, 11 Oct 2021 21:02:13 +0000 (23:02 +0200)] 
runtests: split out ignored tests

Report ignore tests separately from the actual fails.

Don't exit non-zero if test servers couldn't get killed.

Assisted-by: Jay Satiro
Fixes #7818
Closes #7841

3 years agohttp2: make getsock not wait for write if there's no remote window
Daniel Stenberg [Mon, 11 Oct 2021 14:56:51 +0000 (16:56 +0200)] 
http2: make getsock not wait for write if there's no remote window

While uploading, check for remote window availability in the getsock
function so that we don't wait for a writable socket if no data can be
sent.

Reported-by: Steini2000 on github
Fixes #7821
Closes #7839

3 years agotest368: verify dash is appended for "-r [num]"
Daniel Stenberg [Mon, 11 Oct 2021 15:35:07 +0000 (17:35 +0200)] 
test368: verify dash is appended for "-r [num]"

Follow-up to 8758a26f8878

3 years agocurl: actually append "-" to --range without number only
Борис Верховский [Sun, 10 Oct 2021 11:29:51 +0000 (05:29 -0600)] 
curl: actually append "-" to --range without number only

Closes #7837

3 years agoRELEASE-NOTES: synced
Daniel Stenberg [Mon, 11 Oct 2021 15:14:16 +0000 (17:14 +0200)] 
RELEASE-NOTES: synced

3 years agourlapi: URL decode percent-encoded host names
Daniel Stenberg [Fri, 8 Oct 2021 18:12:26 +0000 (20:12 +0200)] 
urlapi: URL decode percent-encoded host names

The host name is stored decoded and can be encoded when used to extract
the full URL. By default when extracting the URL, the host name will not
be URL encoded to work as similar as possible as before. When not URL
encoding the host name, the '%' character will however still be encoded.

Getting the URL with the CURLU_URLENCODE flag set will percent encode
the host name part.

As a bonus, setting the host name part with curl_url_set() no longer
accepts a name that contains space, CR or LF.

Test 1560 has been extended to verify percent encodings.

Reported-by: Noam Moshe
Reported-by: Sharon Brizinov
Reported-by: Raul Onitza-Klugman
Reported-by: Kirill Efimov
Fixes #7830
Closes #7834

3 years agoCI/makefiles: introduce dedicated test target
Marc Hoersken [Mon, 27 Sep 2021 19:17:29 +0000 (21:17 +0200)] 
CI/makefiles: introduce dedicated test target

Make it easy to use the same set of test flags
throughout all current and future CI builds.

Reviewed-by: Jay Satiro
Follow up to #7690
Closes #7785

3 years agomaketgz: redirect updatemanpages.pl output to /dev/null
Daniel Stenberg [Fri, 8 Oct 2021 13:16:34 +0000 (15:16 +0200)] 
maketgz: redirect updatemanpages.pl output to /dev/null

3 years agoCURLOPT_HTTPHEADER.3: add descripion for specific headers
Daniel Stenberg [Fri, 8 Oct 2021 11:44:10 +0000 (13:44 +0200)] 
CURLOPT_HTTPHEADER.3: add descripion for specific headers

Settting Host: or Transfer-Encoding: chunked actually have special
meanings to libcurl. This change tries to document them

Closes #7829

3 years agoc-hyper: use hyper_request_set_uri_parts to make h2 better
Daniel Stenberg [Fri, 8 Oct 2021 09:33:50 +0000 (11:33 +0200)] 
c-hyper: use hyper_request_set_uri_parts to make h2 better

and make sure to not send Host: over h2.

Fixes #7679
Reported-by: David Cook
Closes #7827

3 years agocurl-openssl.m4: modify library order for openssl linking
Michael Afanasiev [Thu, 7 Oct 2021 18:23:21 +0000 (14:23 -0400)] 
curl-openssl.m4: modify library order for openssl linking

lcrypto may depend on lz, and configure corrently fails with when
statically linking as the order is "-lz -lcrypto". This commit switches
the order to "-lcrypto -lz".

Closes #7826

3 years agosha256: use high-level EVP interface for OpenSSL 7808/head
Marcel Raad [Sat, 2 Oct 2021 10:32:42 +0000 (12:32 +0200)] 
sha256: use high-level EVP interface for OpenSSL

Available since OpenSSL 0.9.7. The low-level SHA256 interface is
deprecated in OpenSSL v3, and its usage was discouraged even before.

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

3 years agocurl_ntlm_core: use OpenSSL only if DES is available
Marcel Raad [Sat, 2 Oct 2021 08:17:58 +0000 (10:17 +0200)] 
curl_ntlm_core: use OpenSSL only if DES is available

This selects another SSL backend then if available, or otherwise at
least gives a meaningful error message.

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

3 years agomd5: fix compilation with OpenSSL 3.0 API
Marcel Raad [Sun, 26 Sep 2021 07:19:51 +0000 (09:19 +0200)] 
md5: fix compilation with OpenSSL 3.0 API

Only use OpenSSL's MD5 code if it's available.

Also fix wolfSSL build with `NO_MD5`, in which case neither the
wolfSSL/OpenSSL implementation nor the fallback implementation was
used.

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

3 years agoprint_category: printf %*s needs an int argument
Daniel Stenberg [Thu, 7 Oct 2021 08:13:41 +0000 (10:13 +0200)] 
print_category: printf %*s needs an int argument

... not a size_t!

Detected by Coverity: CID 1492331.
Closes #7823

3 years agoversion_win32: use actual version instead of manifested version
Jay Satiro [Mon, 4 Oct 2021 19:52:01 +0000 (15:52 -0400)] 
version_win32: use actual version instead of manifested version

- Use RtlVerifyVersionInfo instead of VerifyVersionInfo, when possible.

Later versions of Windows have normal version functions that compare and
return versions based on the way the application is manifested, instead
of the actual version of Windows the application is running on. We
prefer the actual version of Windows so we'll now call the Rtl variant
of version functions (RtlVerifyVersionInfo) which does a proper
comparison of the actual version.

Reported-by: Wyatt O'Day
Ref: https://github.com/curl/curl/pull/7727

Fixes https://github.com/curl/curl/issues/7742
Closes https://github.com/curl/curl/pull/7810

3 years agoRELEASE-NOTES: synced
Daniel Stenberg [Wed, 6 Oct 2021 20:52:09 +0000 (22:52 +0200)] 
RELEASE-NOTES: synced

3 years agohttp: fix Basic auth with empty name field in URL
Daniel Stenberg [Wed, 6 Oct 2021 13:40:53 +0000 (15:40 +0200)] 
http: fix Basic auth with empty name field in URL

Add test 367 to verify.

Reported-by: Rick Lane
Fixes #7819
Closes #7820

3 years agoCURLOPT_MAXLIFETIME_CONN: maximum allowed lifetime for conn reuse
Jeffrey Tolar [Sat, 18 Sep 2021 16:29:44 +0000 (11:29 -0500)] 
CURLOPT_MAXLIFETIME_CONN: maximum allowed lifetime for conn reuse

... and close connections that are too old instead of reusing them.

By default, this behavior is disabled.

Bug: https://curl.se/mail/lib-2021-09/0058.html
Closes #7751

3 years agodocs/examples: add missing binaries to gitignore
Daniel Gustafsson [Wed, 6 Oct 2021 08:46:00 +0000 (10:46 +0200)] 
docs/examples: add missing binaries to gitignore

Commit f65d7889b added getreferrer, and commit ae8e11ed5 multi-legacy,
both of which missed adding .gitignore clauses for the built binaries.

Closes #7817
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
3 years agoHTTP3: fix the HTTP/3 Explained book link
Josip Medved [Tue, 5 Oct 2021 01:32:59 +0000 (18:32 -0700)] 
HTTP3: fix the HTTP/3 Explained book link

Closes #7813

3 years agomisc: fix a few issues on MidnightBSD
Lucas Holt [Mon, 4 Oct 2021 21:15:07 +0000 (17:15 -0400)] 
misc: fix a few issues on MidnightBSD

Closes #7812

3 years agotool_main: fix typo in comment
8U61ife [Mon, 4 Oct 2021 21:25:23 +0000 (05:25 +0800)] 
tool_main: fix typo in comment

Closes: #7811
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
3 years agoBINDINGS: URL updates
Ryan Mast [Mon, 4 Oct 2021 15:30:14 +0000 (08:30 -0700)] 
BINDINGS: URL updates

For cpr, BBHTTP, Eiffel, Harbour, Haskell, Mono, and Rust

Closes #7809

3 years agoscripts/delta: hide a git error message we don't care about
Daniel Stenberg [Sat, 2 Oct 2021 21:36:00 +0000 (23:36 +0200)] 
scripts/delta: hide a git error message we don't care about

fatal: path 'src/tool_listhelp.c' exists on disk, but not in [tag]

3 years agosasl: binary messages
Patrick Monnerat [Sat, 2 Oct 2021 16:05:26 +0000 (18:05 +0200)] 
sasl: binary messages

Capabilities of sasl module are extended to exchange messages in binary
as an alternative to base64.

If http authentication flags have been set, those are used as sasl
default preferred mechanisms.

Closes #6930

3 years agowolfssl: use for SHA256, MD4, MD5, and setting DES odd parity
Hayden Roche [Fri, 1 Oct 2021 23:06:55 +0000 (16:06 -0700)] 
wolfssl: use for SHA256, MD4, MD5, and setting DES odd parity

Prior to this commit, OpenSSL could be used for all these functions, but
not wolfSSL. This commit makes it so wolfSSL will be used if USE_WOLFSSL
is defined.

Closes #7806

3 years agoscripts/delta: count command line options in the new file
Daniel Stenberg [Fri, 1 Oct 2021 06:49:12 +0000 (08:49 +0200)] 
scripts/delta: count command line options in the new file

... which makes the shown delta number wrong until next release.

3 years agoRELEASE-NOTES: synced
Daniel Stenberg [Fri, 1 Oct 2021 06:46:30 +0000 (08:46 +0200)] 
RELEASE-NOTES: synced

3 years agoprint_category: print help descriptions aligned
Daniel Stenberg [Wed, 29 Sep 2021 10:43:09 +0000 (12:43 +0200)] 
print_category: print help descriptions aligned

Adjust the description position to make an aligned column when doing
help listings, which is more pleasing to the eye.

Suggested-by: Gisle Vanem
Closes #7792

3 years agolib/mk-ca-bundle.pl: skip certs passed Not Valid After date
Daniel Stenberg [Thu, 30 Sep 2021 21:10:35 +0000 (23:10 +0200)] 
lib/mk-ca-bundle.pl: skip certs passed Not Valid After date

With this change applied, the now expired 'DST Root CA X3' cert will no
longer be included in the output.

Details: https://letsencrypt.org/docs/dst-root-ca-x3-expiration-september-2021/

Closes #7801

3 years agotool_listhelp: easier to generate with gen.pl
Daniel Stenberg [Tue, 28 Sep 2021 15:36:09 +0000 (17:36 +0200)] 
tool_listhelp: easier to generate with gen.pl

tool_listhelp.c is now a separate file with only the command line --help
output, exactly as generated by gen.pl. This makes it easier to generate
updates according to what's in the docs/cmdline-opts docs.

  cd $srcroot/docs/cmdline-opts
  ./gen.pl listhelp *.d > $srcroot/src/tool_listhelp.c

With a configure build, this also works:

  make -C src listhelp

Closes #7787

3 years agowolfssl: allow setting of groups/curves
Anthony Hu [Wed, 15 Sep 2021 18:47:35 +0000 (14:47 -0400)] 
wolfssl: allow setting of groups/curves

In particular, the quantum safe KEM and hybrid curves if wolfSSL is
built to support them.

Closes #7728

3 years agoconnnect: use sysaddr_un fron sys/un.h or custom-defined for windows
Jan Mazur [Tue, 28 Sep 2021 23:13:59 +0000 (00:13 +0100)] 
connnect: use sysaddr_un fron sys/un.h or custom-defined for windows

Closes #7737

3 years agohostip: Move allocation to clarify there is no memleak
Rikard Falkeborn [Wed, 29 Sep 2021 19:15:05 +0000 (21:15 +0200)] 
hostip: Move allocation to clarify there is no memleak

By just glancing at the code, it looks like there is a memleak if the
call to Curl_inet_pton() fails. Looking closer, it is clear that the
call to Curl_inet_pton() can not fail, so the code will never leak
memory. However, we can make this obvious by moving the allocation
after the if-statement.

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

3 years agogen.pl: make the output date format work better
Daniel Stenberg [Wed, 29 Sep 2021 10:57:03 +0000 (12:57 +0200)] 
gen.pl: make the output date format work better

Follow-up to 15910dfd143dd

The previous strftime format used didn't work correctly on Windows, so
change to %B %d %Y which today looks like "September 29 2021".

Reported-by: Gisle Vanem
Bug: #7782
Closes #7793

3 years agotypecheck-gcc.h: add CURLOPT_PREREQDATA awareness
Daniel Stenberg [Thu, 30 Sep 2021 06:33:32 +0000 (08:33 +0200)] 
typecheck-gcc.h: add CURLOPT_PREREQDATA awareness

Follow-up to a517378de58358a

To make test 1912 happy again

Closes #7799

3 years agoconfigure: remove `HAVE_WINSOCK_H` definition 7795/head
Marcel Raad [Wed, 29 Sep 2021 12:53:04 +0000 (14:53 +0200)] 
configure: remove `HAVE_WINSOCK_H` definition

It's not used anymore.

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

3 years agoCMake: remove `HAVE_WINSOCK_H` definition
Marcel Raad [Wed, 29 Sep 2021 12:52:38 +0000 (14:52 +0200)] 
CMake: remove `HAVE_WINSOCK_H` definition

It's not used anymore.

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

3 years agoconfig: remove `HAVE_WINSOCK_H` definition
Marcel Raad [Wed, 29 Sep 2021 12:51:43 +0000 (14:51 +0200)] 
config: remove `HAVE_WINSOCK_H` definition

It's not used anymore.

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

3 years agolib: remove `HAVE_WINSOCK_H` usage
Marcel Raad [Fri, 17 Sep 2021 23:25:20 +0000 (01:25 +0200)] 
lib: remove `HAVE_WINSOCK_H` usage

WinSock v1 is not supported anymore. Exclusively use `HAVE_WINSOCK2_H`
instead.

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

3 years agoeasyoptions: add the two new PRE* options
Daniel Stenberg [Wed, 29 Sep 2021 08:06:42 +0000 (10:06 +0200)] 
easyoptions: add the two new PRE* options

Follow-up to a517378de58358a

Also fix optiontable.pl to do the correct remainder on the entry.

Reported-by: Gisle Vanem
Bug: https://github.com/curl/curl/commit/a517378de58358a85b7cfe9efecb56051268f629#commitcomment-57224830
Closes #7791

3 years agoRevert "build: remove checks for WinSock 1"
Daniel Stenberg [Wed, 29 Sep 2021 06:16:42 +0000 (08:16 +0200)] 
Revert "build: remove checks for WinSock 1"

Due to CI issues

This reverts commit c2ea04f92b00b6271627cb218647527b5a50f2fc.

Closes #7790

3 years agolib: avoid fallthrough cases in switch statements
Daniel Gustafsson [Wed, 29 Sep 2021 08:00:52 +0000 (10:00 +0200)] 
lib: avoid fallthrough cases in switch statements

Commit b5a434f7f0ee4d64857f8592eced5b9007d83620 inhibits the warning
on implicit fallthrough cases, since the current coding of indicating
fallthrough with comments is falling out of fashion with new compilers.
This attempts to make the issue smaller by rewriting fallthroughs to no
longer fallthrough, via either breaking the cases or turning switch
statements into if statements.

  lib/content_encoding.c: the fallthrough codepath is simply copied
    into the case as it's a single line.
  lib/http_ntlm.c: the fallthrough case skips a state in the state-
    machine and fast-forwards to NTLMSTATE_LAST. Do this before the
    switch statement instead to set up the states that we actually
    want.
  lib/http_proxy.c: the fallthrough is just falling into exiting the
    switch statement which can be done easily enough in the case.
  lib/mime.c: switch statement rewritten as if statement.
  lib/pop3.c: the fallthrough case skips to the next state in the
    statemachine, do this explicitly instead.
  lib/urlapi.c: switch statement rewritten as if statement.
  lib/vssh/wolfssh.c: the fallthrough cases fast-forwards the state
    machine, do this by running another iteration of the switch
    statement instead.
  lib/vtls/gtls.c: switch statement rewritten as if statement.
  lib/vtls/nss.c: the fallthrough codepath is simply copied into the
    case as it's a single line. Also twiddle a comment to not be
    inside a non-brace if statement.

Closes: #7322
See-also: #7295
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
3 years agoconfig-win32ce: enable WinSock 2
Marcel Raad [Mon, 27 Sep 2021 08:36:06 +0000 (10:36 +0200)] 
config-win32ce: enable WinSock 2

WinSock 2.2 is supported by Windows CE .NET 4.1 (from 2002, out of
support since 2013).

Ref: https://docs.microsoft.com/en-us/previous-versions/windows/embedded/ms899586(v=msdn.10)

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

3 years agoexternalsocket: use WinSock 2.2
Marcel Raad [Fri, 17 Sep 2021 23:26:27 +0000 (01:26 +0200)] 
externalsocket: use WinSock 2.2

That's the only version we support.

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

3 years agobuild: remove checks for WinSock 1
Marcel Raad [Fri, 17 Sep 2021 23:25:20 +0000 (01:25 +0200)] 
build: remove checks for WinSock 1

It's not supported anymore.

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

3 years agoscripts/copyright: .muse is .lift now
Daniel Stenberg [Tue, 28 Sep 2021 14:42:18 +0000 (16:42 +0200)] 
scripts/copyright: .muse is .lift now

And update 5 files with old copyright year range

3 years agocmdline-opts: made the 'Added:' field mandatory
Daniel Stenberg [Tue, 28 Sep 2021 09:50:07 +0000 (11:50 +0200)] 
cmdline-opts: made the 'Added:' field mandatory

Since "too old" versions are no longer included in the generated man
page, this field is now mandatory so that it won't be forgotten and then
not included in the documentation.

Closes #7786

3 years agocurl.1: remove mentions of really old version changes
Daniel Stenberg [Tue, 28 Sep 2021 08:30:59 +0000 (10:30 +0200)] 
curl.1: remove mentions of really old version changes

To make the man page more readable, this change removes all references
to changes in support/versions etc that happened before 7.30.0 from the
curl.1 output file. 7.30.0 was released on Apr 12 2013. This particular
limit is a bit arbitrary but was fairly easy to grep for.

It is handled like this: the 'Added' keyword is only used in output if
it refers to 7.30.0 or later. All occurances of "(Added in $VERSION)" in
description will be stripped out if the mentioned $VERSION is from
before 7.30.0. It is therefore important that the "Added in..."
references are always written exactly like that - and on a single line,
not split over two.

This change removes about 80 version number references from curl.1, down
to 138 from 218.

Closes #7786

3 years agoRELEASE-NOTES: synced
Daniel Stenberg [Tue, 28 Sep 2021 06:27:24 +0000 (08:27 +0200)] 
RELEASE-NOTES: synced

3 years agotool_cb_prg: make resumed upload progress bar show better
Daniel Stenberg [Mon, 27 Sep 2021 07:13:40 +0000 (09:13 +0200)] 
tool_cb_prg: make resumed upload progress bar show better

This is a regression that was *probably* injected in the larger progress
bar overhaul in 2018.

Reported-by: beslick5 on github
Fixes #7760
Closes #7777