]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
3 years agombedtls: fix CURLOPT_SSLCERT_BLOB
Daniel Stenberg [Tue, 14 Dec 2021 09:00:34 +0000 (10:00 +0100)] 
mbedtls: fix CURLOPT_SSLCERT_BLOB

The memory passed to mbedTLS for this needs to be null terminated.

Reported-by: Florian Van Heghe
Closes #8146

3 years agoasyn-ares: ares_getaddrinfo needs no happy eyeballs timer
Daniel Stenberg [Tue, 14 Dec 2021 07:31:37 +0000 (08:31 +0100)] 
asyn-ares: ares_getaddrinfo needs no happy eyeballs timer

Closes #8142

3 years agomailmap: add Yongkang Huang
Daniel Stenberg [Tue, 14 Dec 2021 13:48:30 +0000 (14:48 +0100)] 
mailmap: add Yongkang Huang

From #8141

3 years agocheck ssl_config when re-use proxy connection
MrDwZ [Tue, 14 Dec 2021 02:46:28 +0000 (18:46 -0800)] 
check ssl_config when re-use proxy connection

3 years agombedtls: do a separate malloc for ca_info_blob
Daniel Stenberg [Tue, 14 Dec 2021 08:34:46 +0000 (09:34 +0100)] 
mbedtls: do a separate malloc for ca_info_blob

Since the mbedTLS API requires the data to the null terminated.

Follow-up to 456c53730d21b1fad0c7f72c1817

Fixes #8139
Closes #8145

3 years agoCI: build examples for additional code verification
Marc Hoersken [Tue, 14 Dec 2021 06:53:39 +0000 (07:53 +0100)] 
CI: build examples for additional code verification

Some CIs already build them, let's do it on more of them.

Reviewed-by: Daniel Stenberg
Follow up to #7690 and 77311f420a541a0de5b3014e0e40ff8b4205d4af
Replaces #7591
Closes #7922

3 years agodocs/examples: workaround broken -Wno-pedantic-ms-format
Marc Hoersken [Tue, 14 Dec 2021 06:52:26 +0000 (07:52 +0100)] 
docs/examples: workaround broken -Wno-pedantic-ms-format

Avoid CURL_FORMAT_CURL_OFF_T by using unsigned long instead.
Improve size_t to long conversion in imap-append.c example.

Ref: https://github.com/curl/curl/issues/6079
Ref: https://github.com/curl/curl/pull/6082
Assisted-by: Jay Satiro
Reviewed-by: Daniel Stenberg
Preparation of #7922

3 years agotests/data/test302[12]: fix MSYS2 path conversion of hostpubsha256
Marc Hoersken [Mon, 13 Dec 2021 11:15:16 +0000 (12:15 +0100)] 
tests/data/test302[12]: fix MSYS2 path conversion of hostpubsha256

Ref: https://www.msys2.org/wiki/Porting/#filesystem-namespaces

Reviewed-by: Marcel Raad
Reviewed-by: Jay Satiro
Fixes #8084
Closes #8138

3 years agoopenldap: simplify ldif generation code
Patrick Monnerat [Sun, 12 Dec 2021 00:24:06 +0000 (01:24 +0100)] 
openldap: simplify ldif generation code

and take care of zero-length values, avoiding conversion to base64
and/or trailing spaces.

Closes #8136

3 years agoexample/progressfunc: remove code for old libcurls
Daniel Stenberg [Mon, 13 Dec 2021 10:13:17 +0000 (11:13 +0100)] 
example/progressfunc: remove code for old libcurls

7.61.0 is over three years old now, remove all #ifdefs for handling
ancient libcurl versions so that the example gets easier to read and
understand

Closes #8137

3 years agosha256/md5: return errors when init fails
x2018 [Fri, 10 Dec 2021 13:33:39 +0000 (21:33 +0800)] 
sha256/md5: return errors when init fails

Closes #8133

3 years agoTODO: 13.3 Defeat TLS fingerprinting
Daniel Stenberg [Sat, 11 Dec 2021 21:30:27 +0000 (22:30 +0100)] 
TODO: 13.3 Defeat TLS fingerprinting

Closes #8119

3 years agoRELEASE-NOTES: synced
Daniel Stenberg [Sat, 11 Dec 2021 20:49:24 +0000 (21:49 +0100)] 
RELEASE-NOTES: synced

3 years agoopenldap: process search query response messages one by one
Patrick Monnerat [Mon, 6 Dec 2021 10:13:28 +0000 (11:13 +0100)] 
openldap: process search query response messages one by one

Upon receiving large result sets, this reduces memory consumption and
allows starting to output results while the transfer is still in
progress.

Closes #8101

3 years agohash: lazy-alloc the table in Curl_hash_add() 8132/head
Daniel Stenberg [Fri, 10 Dec 2021 11:54:17 +0000 (12:54 +0100)] 
hash: lazy-alloc the table in Curl_hash_add()

This makes Curl_hash_init() infallible which saves error paths.

Closes #8132

3 years agomulti: cleanup the socket hash when destroying it 8131/head
Daniel Stenberg [Fri, 10 Dec 2021 11:46:16 +0000 (12:46 +0100)] 
multi: cleanup the socket hash when destroying it

Since each socket hash entry may themselves have a hash table in them,
the destroying of the socket hash needs to make sure all the subhashes
are also correctly destroyed to avoid leaking memory.

Fixes #8129
Closes #8131

3 years agotest1156: fixup the stdout check for Windows
Daniel Stenberg [Fri, 10 Dec 2021 14:40:50 +0000 (15:40 +0100)] 
test1156: fixup the stdout check for Windows

It is not text mode.

Follow-up to 6f73e68d182

Closes #8134

3 years agotest1528: enable for hyper
Daniel Stenberg [Thu, 9 Dec 2021 16:02:19 +0000 (17:02 +0100)] 
test1528: enable for hyper

Closes #8128

3 years agotest1527: enable for hyper
Daniel Stenberg [Thu, 9 Dec 2021 16:01:31 +0000 (17:01 +0100)] 
test1527: enable for hyper

Closes #8128

3 years agotest1526: enable for hyper
Daniel Stenberg [Thu, 9 Dec 2021 15:07:19 +0000 (16:07 +0100)] 
test1526: enable for hyper

Closes #8128

3 years agotest1525: slightly tweaked for hyper
Daniel Stenberg [Thu, 9 Dec 2021 15:06:16 +0000 (16:06 +0100)] 
test1525: slightly tweaked for hyper

Closes #8128

3 years agotest1156: enable for hyper
Daniel Stenberg [Thu, 9 Dec 2021 14:46:32 +0000 (15:46 +0100)] 
test1156: enable for hyper

Minor reorg of the lib1156 code and it works fine for hyper.

Closes #8127

3 years agotest661: enable for hyper
Daniel Stenberg [Thu, 9 Dec 2021 14:39:55 +0000 (15:39 +0100)] 
test661: enable for hyper

Closes #8126

3 years agodocs: fix proselint nits
Daniel Stenberg [Thu, 9 Dec 2021 11:03:35 +0000 (12:03 +0100)] 
docs: fix proselint nits

- remove a lot of exclamation marks
- use consistent spaces (1, not 2)
- use better words at some places

Closes #8123

3 years agoBINDINGS.md: add cURL client for PostgreSQL
RekGRpth [Thu, 9 Dec 2021 11:16:37 +0000 (16:16 +0500)] 
BINDINGS.md: add cURL client for PostgreSQL

Closes #8125

3 years agoCURLSHOPT_USERDATA.3: fix copy-paste mistake
RekGRpth [Thu, 9 Dec 2021 11:13:58 +0000 (16:13 +0500)] 
CURLSHOPT_USERDATA.3: fix copy-paste mistake

Closes #8124

3 years agodocs: fix minor nroff format nits
Daniel Stenberg [Thu, 9 Dec 2021 12:18:27 +0000 (13:18 +0100)] 
docs: fix minor nroff format nits

Repairs test 1140

Follow-up to 436cdf82041

3 years agodocs/URL-SYNTAX.md: space is not fine in a given URL
Daniel Stenberg [Thu, 9 Dec 2021 10:32:09 +0000 (11:32 +0100)] 
docs/URL-SYNTAX.md: space is not fine in a given URL

3 years agocurl_multi_perform/socket_action.3: clarify what errors mean
Daniel Stenberg [Wed, 8 Dec 2021 14:37:37 +0000 (15:37 +0100)] 
curl_multi_perform/socket_action.3: clarify what errors mean

An error returned from one of these funtions mean that ALL still ongoing
transfers are to be considered failed.

Ref: #8114
Closes #8120

3 years agolibcurl-errors.3: add CURLM_ABORTED_BY_CALLBACK
Daniel Stenberg [Wed, 8 Dec 2021 14:01:33 +0000 (15:01 +0100)] 
libcurl-errors.3: add CURLM_ABORTED_BY_CALLBACK

Follow-up to #8089 (2b3dd01)

Closes #8116

3 years agohash: add asserts to help detect bad usage
Daniel Stenberg [Wed, 8 Dec 2021 12:22:44 +0000 (13:22 +0100)] 
hash: add asserts to help detect bad usage

For example trying to add entries after the hash has been "cleaned up"

Closes #8115

3 years agolib530: abort on curl_multi errors
Daniel Stenberg [Thu, 9 Dec 2021 07:26:28 +0000 (08:26 +0100)] 
lib530: abort on curl_multi errors

This makes torture tests run more proper.

Also add an assert to trap situations where it would end up with no
sockets to wait for.

Closes #8121

3 years agoFAQ: we never pronounced it "see URL", we say "kurl"
Daniel Stenberg [Wed, 8 Dec 2021 09:12:19 +0000 (10:12 +0100)] 
FAQ: we never pronounced it "see URL", we say "kurl"

3 years agoRELEASE-NOTES: synced
Daniel Stenberg [Tue, 7 Dec 2021 16:16:38 +0000 (17:16 +0100)] 
RELEASE-NOTES: synced

3 years agoCURLOPT_RESOLVE.3: minor polish
Daniel Stenberg [Tue, 7 Dec 2021 10:53:05 +0000 (11:53 +0100)] 
CURLOPT_RESOLVE.3: minor polish

Minor rephrasing for some explanations.

Put the format strings in stand-alone lines with .nf/.fi to be easier to spot.

Move "added in" to AVAILABILITY

Closed #8110

3 years agotest1556: adjust for hyper
Daniel Stenberg [Mon, 6 Dec 2021 16:51:40 +0000 (17:51 +0100)] 
test1556: adjust for hyper

Closes #8105

3 years agotest1554: adjust for hyper
Daniel Stenberg [Mon, 6 Dec 2021 16:46:50 +0000 (17:46 +0100)] 
test1554: adjust for hyper

Closes #8104

3 years agoretry-all-errors.d: make the example complete
Daniel Stenberg [Tue, 7 Dec 2021 09:10:51 +0000 (10:10 +0100)] 
retry-all-errors.d: make the example complete

... as it needs --retry too to work

3 years agoTODO: 5.7 Require HTTP version X or higher
Daniel Stenberg [Mon, 6 Dec 2021 16:03:00 +0000 (17:03 +0100)] 
TODO: 5.7 Require HTTP version X or higher

Closes #7980

3 years agoCURLOPT_STDERR.3: does not work with libcurl as a win32 DLL
Daniel Stenberg [Mon, 6 Dec 2021 14:05:16 +0000 (15:05 +0100)] 
CURLOPT_STDERR.3: does not work with libcurl as a win32 DLL

This is the exact same limitation already documented for
CURLOPT_WRITEDATA but should be clarified here. It also has a different
work-around.

Reported-by: Stephane Pellegrino
Bug: https://github.com/curl/curl/issues/8102
Closes #8103

3 years agomulti: handle errors returned from socket/timer callbacks
Daniel Stenberg [Thu, 2 Dec 2021 12:57:38 +0000 (13:57 +0100)] 
multi: handle errors returned from socket/timer callbacks

The callbacks were partially documented to support this. Now the
behavior is documented and returning error from either of these
callbacks will effectively kill all currently ongoing transfers.

Added test 530 to verify

Reported-by: Marcelo Juchem
Fixes #8083
Closes #8089

3 years agohttp2:set_transfer_url() return early on OOM
Daniel Stenberg [Mon, 6 Dec 2021 10:19:52 +0000 (11:19 +0100)] 
http2:set_transfer_url() return early on OOM

If curl_url() returns NULL this should return early to avoid mistakes -
even if right now the subsequent function invokes are all OK.

Coverity (wrongly) pointed out this as a NULL deref.

Closes #8100

3 years agotool_parsecfg: use correct free() call to free memory
Daniel Stenberg [Mon, 6 Dec 2021 07:45:03 +0000 (08:45 +0100)] 
tool_parsecfg: use correct free() call to free memory

Detected by Coverity. CID 1494642.
Follow-up from 2be1aa619bca

Closes #8099

3 years agotool_operate: fix potential memory-leak
Daniel Stenberg [Mon, 6 Dec 2021 07:25:56 +0000 (08:25 +0100)] 
tool_operate: fix potential memory-leak

A 'CURLU *' would leak if url_proto() is called with no URL.

Detected by Coverity. CID 1494643.
Follow-up to 18270893abdb19
Closes #8098

3 years agoopenldap: implement STARTTLS
Patrick Monnerat [Tue, 30 Nov 2021 16:48:28 +0000 (17:48 +0100)] 
openldap: implement STARTTLS

As this introduces use of CURLOPT_USE_SSL option for LDAP, also check
this option in ldap.c as it is not supported by this backend.

Closes #8065

3 years agocurl_easy_unescape.3: call curl_easy_cleanup in example
Jun Tseng [Mon, 6 Dec 2021 04:38:24 +0000 (12:38 +0800)] 
curl_easy_unescape.3: call curl_easy_cleanup in example

Closes #8097

3 years agocurl_easy_escape.3: call curl_easy_cleanup in example
Jun Tseng [Mon, 6 Dec 2021 04:39:03 +0000 (12:39 +0800)] 
curl_easy_escape.3: call curl_easy_cleanup in example

Closes #8097

3 years agotool_listhelp: sync
Daniel Stenberg [Sun, 5 Dec 2021 22:13:56 +0000 (23:13 +0100)] 
tool_listhelp: sync

Follow-up to 172068b76f

3 years agorequest.d: refer to 'method' rather than 'command'
Damien Walsh [Fri, 3 Dec 2021 23:20:42 +0000 (23:20 +0000)] 
request.d: refer to 'method' rather than 'command'

Closes #8094

3 years agoRELEASE-NOTES: synced
Daniel Stenberg [Fri, 3 Dec 2021 22:04:04 +0000 (23:04 +0100)] 
RELEASE-NOTES: synced

3 years agowriteout: fix %{http_version} for HTTP/3
Daniel Stenberg [Fri, 3 Dec 2021 15:55:04 +0000 (16:55 +0100)] 
writeout: fix %{http_version} for HTTP/3

Output "3" properly when HTTP/3 was used.

Reported-by: Bernat Mut
Fixes #8072
Closes #8092

3 years agourlapi: accept port number zero
Daniel Stenberg [Fri, 3 Dec 2021 14:56:58 +0000 (15:56 +0100)] 
urlapi: accept port number zero

This is a regression since 7.62.0 (fb30ac5a2d).

Updated test 1560 accordingly

Reported-by: Brad Fitzpatrick
Fixes #8090
Closes #8091

3 years agolift: ignore is a deprecated config option, use ignoreRules
Mark Dodgson [Wed, 1 Dec 2021 15:31:52 +0000 (15:31 +0000)] 
lift: ignore is a deprecated config option, use ignoreRules

Closes #8082

3 years agoHTTP3: update quiche build instructions
Alessandro Ghedini [Tue, 30 Nov 2021 13:37:36 +0000 (13:37 +0000)] 
HTTP3: update quiche build instructions

The repo repo was re-organized a bit, so the build instructions need to
be updated.

Closes #8076

3 years agoCURLMOPT_TIMERFUNCTION.3: call it expire time, not interval
Daniel Stenberg [Thu, 2 Dec 2021 11:05:48 +0000 (12:05 +0100)] 
CURLMOPT_TIMERFUNCTION.3: call it expire time, not interval

Since we say it is a non-repating timer

3 years agombedTLS: include NULL byte in blob data length for CURLOPT_CAINFO_BLOB
Florian Van Heghe [Wed, 1 Dec 2021 11:37:42 +0000 (12:37 +0100)] 
mbedTLS: include NULL byte in blob data length for CURLOPT_CAINFO_BLOB

Fixes #8079
Closes #8081

3 years agoversion_win32: Check build number and platform id
Wyatt O'Day [Thu, 7 Oct 2021 10:58:39 +0000 (06:58 -0400)] 
version_win32: Check build number and platform id

Prior to this change the build number was not checked during version
comparison, and the platform id was supposed to be checked but wasn't.

Checking the build number is required for enabling "evergreen"
Windows 10/11 features (like TLS 1.3).

Ref: https://github.com/curl/curl/pull/7784

Closes https://github.com/curl/curl/pull/7824
Closes https://github.com/curl/curl/pull/7867

3 years agolibssh2: fix error message for sha256 mismatch
Jay Satiro [Thu, 2 Dec 2021 07:19:51 +0000 (02:19 -0500)] 
libssh2: fix error message for sha256 mismatch

- On mismatch error show sha256 fingerprint in base64 format.

Prior to this change the fingerprint was mistakenly printed in binary.

3 years agoopenssl: check the return value of BIO_new()
x2018 [Wed, 1 Dec 2021 03:20:33 +0000 (11:20 +0800)] 
openssl: check the return value of BIO_new()

Closes #8078

3 years agodocs: Update the Reducing Size section
Dan Fandrich [Wed, 1 Dec 2021 02:33:49 +0000 (18:33 -0800)] 
docs: Update the Reducing Size section

Add many more options that can reduce the size of the binary that were
added since the last update. Update the sample minimal binary size for
version 7.80.0.

3 years agotests: Add some missing keywords to tests
Dan Fandrich [Wed, 1 Dec 2021 02:32:53 +0000 (18:32 -0800)] 
tests: Add some missing keywords to tests

These are needed to skip some tests when configure options have disabled
certain features.

3 years agombedTLS: add support for CURLOPT_CAINFO_BLOB
Florian Van Heghe [Mon, 29 Nov 2021 14:22:33 +0000 (15:22 +0100)] 
mbedTLS: add support for CURLOPT_CAINFO_BLOB

Closes #8071

3 years agodigest: compute user:realm:pass digest w/o userhash
Glenn Strauss [Sun, 28 Nov 2021 07:22:40 +0000 (02:22 -0500)] 
digest: compute user:realm:pass digest w/o userhash

https://datatracker.ietf.org/doc/html/rfc7616#section-3.4.4
  ... the client MUST calculate a hash of the username after
      any other hash calculation ...

Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
Closes #8066

3 years agoconfig.d: update documentation to match the path search 8035/head
Daniel Stenberg [Fri, 19 Nov 2021 16:09:51 +0000 (17:09 +0100)] 
config.d: update documentation to match the path search

Assisted-by: Jay Satiro
3 years agotool_findfile: search for a file in the homedir
Daniel Stenberg [Fri, 19 Nov 2021 15:11:29 +0000 (16:11 +0100)] 
tool_findfile: search for a file in the homedir

The homedir() function is now renamed into findfile() and iterates over
all the environment variables trying to access the file in question
until it finds it. Last resort is then getpwuid() if
available. Previously it would first try to find a home directory and if
that was set, insist on checking only that directory for the file. This
now returns the full file name it finds.

The Windows specific checks are now done differently too and in this
order:

1 - %USERPROFILE%
2 - %APPDATA%
3 - %USERPROFILE%\\Application Data

The windows order is modified to match how the Windows 10 ssh tool works
when it searches for .ssh/known_hosts.

Reported-by: jeffrson on github
Co-authored-by: Jay Satiro
Fixes #8033
Closes #8035

3 years agodocs: consistent manpage SYNOPSIS
Daniel Stenberg [Fri, 26 Nov 2021 13:20:18 +0000 (14:20 +0100)] 
docs: consistent manpage SYNOPSIS

Make all libcurl related options use .nf (no fill) for the SYNOPSIS
section - for consistent look. roffit then renders that section using
<pre> (monospace font) in html for the website.

Extended manpage-syntax (test 1173) with a basic check for it.

Closes #8062

3 years agoRELEASE-NOTES: synced
Daniel Stenberg [Fri, 26 Nov 2021 13:37:49 +0000 (14:37 +0100)] 
RELEASE-NOTES: synced

3 years agoopenldap: handle connect phase with a state machine
Patrick Monnerat [Thu, 25 Nov 2021 14:03:56 +0000 (15:03 +0100)] 
openldap: handle connect phase with a state machine

Closes #8054

3 years agodocs: address proselint nits
Daniel Stenberg [Fri, 26 Nov 2021 07:46:59 +0000 (08:46 +0100)] 
docs: address proselint nits

- avoid exclamation marks
- use consistent number of spaces after periods: one
- avoid clichés
- avoid using 'very'

Closes #8060

3 years agoFAQ: typo fix : "yout" ➤ "your"
Bruno Baguette [Fri, 26 Nov 2021 07:23:34 +0000 (08:23 +0100)] 
FAQ: typo fix : "yout" ➤ "your"

Closes #8059

3 years agodocs/INSTALL.md: typo fix : added missing "get" verb
Bruno Baguette [Fri, 26 Nov 2021 07:05:09 +0000 (08:05 +0100)] 
docs/INSTALL.md: typo fix : added missing "get" verb

Closes #8058

3 years agoinsecure.d: detail its use for SFTP and SCP as well
Daniel Stenberg [Thu, 25 Nov 2021 12:17:49 +0000 (13:17 +0100)] 
insecure.d: detail its use for SFTP and SCP as well

Closes #8056

3 years agoMakefile.m32: rename -winssl option to -schannel and tidy up
Viktor Szakats [Thu, 25 Nov 2021 17:35:24 +0000 (17:35 +0000)] 
Makefile.m32: rename -winssl option to -schannel and tidy up

- accept `-schannel` as an alternative to `CFG` option `-winssl`
  (latter still accepted, but deprecated)
- rename internal variable `WINSSL` to `SCHANNEL`
- make the `CFG` option evaluation shorter, without repeating the option
  name

Reviewed-by: Marcel Raad
Reviewed-by: Daniel Stenberg
Closes #8053

3 years agoKNOWN_BUGS: 5.6 make distclean loops forever
Daniel Stenberg [Thu, 25 Nov 2021 13:44:59 +0000 (14:44 +0100)] 
KNOWN_BUGS: 5.6 make distclean loops forever

Reported-by: David Bohman
Closes #7716

3 years agoKNOWN_BUGS: add one, remove one
Daniel Stenberg [Thu, 25 Nov 2021 13:08:52 +0000 (14:08 +0100)] 
KNOWN_BUGS: add one, remove one

- 5.10 SMB tests fail with Python 2

Just use python 3.

+ 5.10 curl hangs on SMB upload over stdin

Closes #7896

3 years agourlapi: provide more detailed return codes 8049/head
Daniel Stenberg [Tue, 23 Nov 2021 16:07:31 +0000 (17:07 +0100)] 
urlapi: provide more detailed return codes

Previously, the return code CURLUE_MALFORMED_INPUT was used for almost
30 different URL format violations. This made it hard for users to
understand why a particular URL was not acceptable. Since the API cannot
point out a specific position within the URL for the problem, this now
instead introduces a number of additional and more fine-grained error
codes to allow the API to return more exactly in what "part" or section
of the URL a problem was detected.

Also bug-fixes curl_url_get() with CURLUPART_ZONEID, which previously
returned CURLUE_OK even if no zoneid existed.

Test cases in 1560 have been adjusted and extended. Tests 1538 and 1559
have been updated.

Updated libcurl-errors.3 and curl_url_strerror() accordingly.

Closes #8049

3 years agourlapi: make Curl_is_absolute_url always use MAX_SCHEME_LEN
Daniel Stenberg [Tue, 23 Nov 2021 13:16:38 +0000 (14:16 +0100)] 
urlapi: make Curl_is_absolute_url always use MAX_SCHEME_LEN

Instad of having all callers pass in the maximum length, always use
it. The passed in length is instead used only as the length of the
target buffer for to storing the scheme name in, if used.

Added the scheme max length restriction to the curl_url_set.3 man page.

Follow-up to 45bcb2eaa78c79

Closes #8047

3 years agocmake: warn on use of the now deprecated symbols
Jay Satiro [Wed, 24 Nov 2021 06:53:12 +0000 (07:53 +0100)] 
cmake: warn on use of the now deprecated symbols

Follow-up to 9108da2c26d

Closes #8052

3 years agotests/CI.md: add more information on CI environments
Kevin Burke [Tue, 16 Nov 2021 05:00:26 +0000 (21:00 -0800)] 
tests/CI.md: add more information on CI environments

Fixes #8012
Closes #8022

3 years agocmake: private identifiers use CURL_ instead of CMAKE_ prefix
Daniel Stenberg [Mon, 22 Nov 2021 16:39:46 +0000 (17:39 +0100)] 
cmake: private identifiers use CURL_ instead of CMAKE_ prefix

Since the 'CMAKE_' prefix is reserved for cmake's own private use.
Ref: https://cmake.org/cmake/help/latest/manual/cmake-variables.7.html

Reported-by: Boris Rasin
Fixes #7988
Closes #8044

3 years agourlapi: reject short file URLs
Daniel Stenberg [Mon, 22 Nov 2021 09:11:59 +0000 (10:11 +0100)] 
urlapi: reject short file URLs

file URLs that are 6 bytes or shorter are not complete. Return
CURLUE_MALFORMED_INPUT for those. Extended test 1560 to verify.

Triggered by #8041
Closes #8042

3 years agocurl: improve error message for --head with -J
Daniel Stenberg [Mon, 22 Nov 2021 17:09:43 +0000 (18:09 +0100)] 
curl: improve error message for --head with -J

... it now focuses on the "output of headers" combined with the
--remote-header-name option, as that is actually the problem. Both
--head and --include can output headers.

Reported-by: nimaje on github
Fixes #7987
Closes #8045

3 years agoRELEASE-NOTES: synced
Daniel Stenberg [Mon, 22 Nov 2021 22:11:40 +0000 (23:11 +0100)] 
RELEASE-NOTES: synced

3 years agourlapi: cleanup scheme parsing
Stefan Eissing [Mon, 22 Nov 2021 11:47:56 +0000 (12:47 +0100)] 
urlapi: cleanup scheme parsing

Makea Curl_is_absolute_url() always leave a defined 'buf' and avoids
copying on urls that do not start with a scheme.

Closes #8043

3 years agotool_operate: only set SSH related libcurl options for SSH URLs
Daniel Stenberg [Sun, 21 Nov 2021 14:52:58 +0000 (15:52 +0100)] 
tool_operate: only set SSH related libcurl options for SSH URLs

For example, this avoids trying to find and set the known_hosts file (or
warn for its absence) if SFTP or SCP are not used.

Closes #8040

3 years agorustls: remove comment about checking handshaking
Jacob Hoffman-Andrews [Fri, 19 Nov 2021 18:02:20 +0000 (10:02 -0800)] 
rustls: remove comment about checking handshaking

The comment is incorrect in two ways:
 - It says the check needs to be last, but the check is actually first.
 - is_handshaking actually starts out true.

Closes #8038

3 years agoopenssl: use non-deprecated API to read key parameters 7893/head
Marcel Raad [Mon, 11 Oct 2021 20:58:51 +0000 (22:58 +0200)] 
openssl: use non-deprecated API to read key parameters

With OpenSSL 3.0, the parameters are read directly from the `EVP_PKEY`
using `EVP_PKEY_get_bn_param`.

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

3 years agoopenssl: reduce code duplication
Marcel Raad [Mon, 11 Oct 2021 19:29:51 +0000 (21:29 +0200)] 
openssl: reduce code duplication

`BN_print`'s `BIGNUM` parameter has been `const` since OpenSSL 0.9.4.

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

3 years agoopenssl: remove `RSA_METHOD_FLAG_NO_CHECK` handling if unavailable
Marcel Raad [Mon, 11 Oct 2021 19:07:26 +0000 (21:07 +0200)] 
openssl: remove `RSA_METHOD_FLAG_NO_CHECK` handling if unavailable

The flag has been deprecated without replacement in OpenSSL 3.0.

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

3 years agoopenssl: remove usage of deprecated `SSL_get_peer_certificate`
Marcel Raad [Sun, 10 Oct 2021 09:51:37 +0000 (11:51 +0200)] 
openssl: remove usage of deprecated `SSL_get_peer_certificate`

The function name was changed to `SSL_get1_peer_certificate` in OpenSSL
3.0.

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

3 years agopage-footer: fix typo
Daniel Stenberg [Fri, 19 Nov 2021 16:11:30 +0000 (17:11 +0100)] 
page-footer: fix typo

Closes #8036

3 years agohttp: enable haproxy support for hyper backend
Daniel Stenberg [Fri, 19 Nov 2021 09:55:23 +0000 (10:55 +0100)] 
http: enable haproxy support for hyper backend

This is done by having native code do the haproxy header output before
hyper issues its request. The little downside with this approach is that
we need the entire Curl_buffer_send() function built, which is otherwise
not used for hyper builds.

If hyper ends up getting native support for the haproxy protocols we can
backpedal on this.

Enables test 1455 and 1456

Closes #8034

3 years agoconfigure: fix runtime-lib detection on macOS
Bernhard Walle [Wed, 17 Nov 2021 10:40:41 +0000 (11:40 +0100)] 
configure: fix runtime-lib detection on macOS

With a non-standard installation of openssl we get this error:

    checking run-time libs availability... failed
    configure: error: one or more libs available at link-time are not available run-time. Libs used at link-time: -lnghttp2 -lssl -lcrypto -lssl -lcrypto -lz

There's already code to set LD_LIBRARY_PATH on Linux, so set
DYLD_LIBRARY_PATH equivalent on macOS.

Closes #8028

3 years agocmake: don't set _USRDLL on a static Windows build
Don [Wed, 17 Nov 2021 21:21:28 +0000 (13:21 -0800)] 
cmake: don't set _USRDLL on a static Windows build

Closes #8030

3 years agopage-footer: document more environment variables
Daniel Stenberg [Wed, 17 Nov 2021 07:30:12 +0000 (08:30 +0100)] 
page-footer: document more environment variables

... that curl might use.

Closes #8027

3 years agonetrc.d: edit the .netrc example to look nicer
Daniel Stenberg [Tue, 16 Nov 2021 13:58:36 +0000 (14:58 +0100)] 
netrc.d: edit the .netrc example to look nicer

Works nicely thanks to d1828b470f43d

Closes #8025

3 years agotftp: mark protocol as not possible to do over CONNECT
Daniel Stenberg [Mon, 15 Nov 2021 15:51:32 +0000 (16:51 +0100)] 
tftp: mark protocol as not possible to do over CONNECT

... and make connect_init() refusing trying to tunnel protocols marked
as not working. Avoids a double-free.

Reported-by: Even Rouault
Fixes #8018
Closes #8020

3 years agodocs/cmdline-opts: do not say "protocols: all"
Daniel Stenberg [Mon, 15 Nov 2021 16:13:17 +0000 (17:13 +0100)] 
docs/cmdline-opts: do not say "protocols: all"

Remove the lines saying "protocols: all". It makes the output in the
manpage look funny, and the expectation is probably by default that if
not anything is mentioned about protocols the option apply to them all.

Closes #8021

3 years agocurl.1: require "see also" for every documented option
Daniel Stenberg [Mon, 15 Nov 2021 14:58:20 +0000 (15:58 +0100)] 
curl.1: require "see also" for every documented option

gen.pl now generates a warning if the "See Also" field is not filled in for a
command line option

All command line options now provide one or more related options. 167
"See alsos" added!

Closes #8019

3 years agoinsecure.d: expand and clarify
Daniel Stenberg [Mon, 15 Nov 2021 14:07:01 +0000 (15:07 +0100)] 
insecure.d: expand and clarify

Closes #8017