]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
5 years agoscripts: use last set tag if none given
Daniel Stenberg [Wed, 5 Feb 2020 06:48:18 +0000 (07:48 +0100)] 
scripts: use last set tag if none given

Makes 'delta' and 'contributors.sh' easier to use.

Make the delta script invoke contrithanks to get current number of
contributors instead of counting THANKS, for accuracy.

Closes #4881

5 years agoftp: shrink temp buffers used for PORT
Daniel Stenberg [Tue, 4 Feb 2020 22:27:39 +0000 (23:27 +0100)] 
ftp: shrink temp buffers used for PORT

These two stack based buffers only need to be 46 + 66 bytes instead of
256 + 1024.

Closes #4880

5 years agocurl: error on --alt-svc use w/o support
Daniel Stenberg [Tue, 4 Feb 2020 16:32:55 +0000 (17:32 +0100)] 
curl: error on --alt-svc use w/o support

Make the tool check for alt-svc support at run-time and return error
accordingly if not present when the option is used.

Reported-by: Harry Sintonen
Closes #4878

5 years agodocs/HTTP3: add --enable-alt-svc to curl's configure
Daniel Stenberg [Tue, 4 Feb 2020 23:25:12 +0000 (00:25 +0100)] 
docs/HTTP3: add --enable-alt-svc to curl's configure

5 years agoRELEASE-PROCEDURE: feature win is closed post-release a few days
Daniel Stenberg [Tue, 4 Feb 2020 15:29:28 +0000 (16:29 +0100)] 
RELEASE-PROCEDURE: feature win is closed post-release a few days

We've tried to uphold this already but let's make it official by
publicly stating this is the way we do it.

Closes #4877

5 years agoaltsvc: set h3 version at a common single spot
Daniel Stenberg [Tue, 4 Feb 2020 14:12:44 +0000 (15:12 +0100)] 
altsvc: set h3 version at a common single spot

... and move the #ifdefs out of the functions. Addresses the fact they
were different before this change.

Reported-by: Harry Sintonen
Closes #4876

5 years agoaltsvc: improved header parser
Harry Sintonen [Tue, 4 Feb 2020 04:21:58 +0000 (06:21 +0200)] 
altsvc: improved header parser

- Fixed the flag parsing to apply to specific alternative entry only, as
per RFC. The earlier code would also get totally confused by
multiprotocol header, parsing flags from the wrong part of the header.

- Fixed the parser terminating on unknown protocols, instead of skipping
them.

- Fixed a busyloop when protocol-id was present without an equal sign.

Closes #4875

5 years agongtcp2: fixed to only use AF_INET6 when ENABLE_IPV6
Harry Sintonen [Mon, 3 Feb 2020 22:58:38 +0000 (00:58 +0200)] 
ngtcp2: fixed to only use AF_INET6 when ENABLE_IPV6

5 years agodocs/HTTP3: update the OpenSSL branch to use for ngtcp2
Daniel Stenberg [Tue, 4 Feb 2020 14:05:57 +0000 (15:05 +0100)] 
docs/HTTP3: update the OpenSSL branch to use for ngtcp2

Reported-by: James Fuller
5 years agontlm: Pass the Curl_easy structure to the private winbind functions
Steve Holme [Wed, 8 May 2019 08:36:51 +0000 (09:36 +0100)] 
ntlm: Pass the Curl_easy structure to the private winbind functions

...rather than the full conndata structure.

5 years agoRELEASE-NOTES: synced
Daniel Stenberg [Tue, 4 Feb 2020 09:33:38 +0000 (10:33 +0100)] 
RELEASE-NOTES: synced

5 years agotool_operhlp: Copyright year out of date, should be 2020
Daniel Stenberg [Tue, 4 Feb 2020 07:29:41 +0000 (08:29 +0100)] 
tool_operhlp: Copyright year out of date, should be 2020

Follow-up from 2bc373740a3

5 years agocurl: avoid using strlen for testing if a string is empty
Orgad Shaneh [Mon, 3 Feb 2020 09:42:46 +0000 (11:42 +0200)] 
curl: avoid using strlen for testing if a string is empty

Closes #4873

5 years agontlm: Ensure the HTTP header data is not stored in the challenge/response
Steve Holme [Wed, 8 May 2019 23:30:09 +0000 (00:30 +0100)] 
ntlm: Ensure the HTTP header data is not stored in the challenge/response

5 years agoopenssl: remove redundant assignment
Marcel Raad [Sun, 2 Feb 2020 12:35:54 +0000 (13:35 +0100)] 
openssl: remove redundant assignment

Fixes a scan-build failure on Bionic.

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

5 years agotravis: update non-OpenSSL Linux jobs to Bionic
Marcel Raad [Sun, 2 Feb 2020 08:56:21 +0000 (09:56 +0100)] 
travis: update non-OpenSSL Linux jobs to Bionic

For the OpenSSL builds, test 323 [TLS-SRP to non-TLS-SRP server] is
failing with "curl returned 52, when expecting 35".

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

5 years agocirrus: Add some missing semicolons
Dan Fandrich [Mon, 3 Feb 2020 11:27:30 +0000 (12:27 +0100)] 
cirrus: Add some missing semicolons

Newlines aren't preserved in this section so they're needed to separate
commands. The exports luckily worked anyway as a single long line, but
erroneously exported a variable called "export"
[skip ci]

5 years agocleanup: fix typos and wording in docs and comments
Pedro Monreal [Sun, 2 Feb 2020 08:49:28 +0000 (09:49 +0100)] 
cleanup: fix typos and wording in docs and comments

Closes #4869
Reviewed-by: Emil Engler and Daniel Gustafsson
5 years agontlm: Move the winbind data into the NTLM data structure
Steve Holme [Tue, 7 May 2019 22:36:52 +0000 (23:36 +0100)] 
ntlm: Move the winbind data into the NTLM data structure

To assist with adding winbind support to the SASL NTLM authentication,
move the winbind specific data out of conndata into ntlmdata.

5 years agoquiche: Copyright year out of date
Daniel Stenberg [Thu, 30 Jan 2020 18:13:01 +0000 (19:13 +0100)] 
quiche: Copyright year out of date

Follow-up to 7fc63d72333a

5 years agoaltsvc: use h3-25
Daniel Stenberg [Thu, 30 Jan 2020 15:02:27 +0000 (16:02 +0100)] 
altsvc: use h3-25

Closes #4868

5 years agoquiche: update to draft-25
Alessandro Ghedini [Thu, 30 Jan 2020 13:06:31 +0000 (13:06 +0000)] 
quiche: update to draft-25

Closes #4867

5 years agongtcp2: update to git master and its draft-25 support
Daniel Stenberg [Wed, 29 Jan 2020 14:56:16 +0000 (15:56 +0100)] 
ngtcp2: update to git master and its draft-25 support

Closes #4865

5 years agocookie: check __Secure- and __Host- case sensitively
Daniel Stenberg [Wed, 29 Jan 2020 08:57:50 +0000 (09:57 +0100)] 
cookie: check __Secure- and __Host- case sensitively

While most keywords in cookies are case insensitive, these prefixes are
specified explicitly to get checked "with a case-sensitive match".

(From the 6265bis document in progress)

Ref: https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-04
Closes #4864

5 years agoKNOWN_BUGS: Multiple methods in a single WWW-Authenticate: header
Daniel Stenberg [Wed, 29 Jan 2020 06:57:42 +0000 (07:57 +0100)] 
KNOWN_BUGS: Multiple methods in a single WWW-Authenticate: header

5 years agooauth2-bearer.d: works for HTTP too
Daniel Stenberg [Tue, 28 Jan 2020 21:27:15 +0000 (22:27 +0100)] 
oauth2-bearer.d: works for HTTP too

Reported-by: Mischa Salle
Bug: https://curl.haxx.se/mail/lib-2020-01/0070.html
Closes #4862

5 years agomulti_done: if multiplexed, make conn->data point to another transfer
Daniel Stenberg [Mon, 27 Jan 2020 21:50:33 +0000 (22:50 +0100)] 
multi_done: if multiplexed, make conn->data point to another transfer

... since the current transfer is being killed. Setting to NULL is
wrong, leaving it pointing to 'data' is wrong since that handle might be
about to get freed.

Fixes #4845
Closes #4858
Reported-by: dmitrmax on github
5 years agolocation.d: the method change is from POST to GET only
Daniel Stenberg [Tue, 28 Jan 2020 09:41:10 +0000 (10:41 +0100)] 
location.d: the method change is from POST to GET only

Not from generic non-GET to GET.

Reported-by: Andrius Merkys
Ref: #4859
Closes #4861

5 years agourlapi: guess scheme correct even with credentials given
Daniel Stenberg [Mon, 27 Jan 2020 16:28:40 +0000 (17:28 +0100)] 
urlapi: guess scheme correct even with credentials given

In the "scheme-less" parsing case, we need to strip off credentials
first before we guess scheme based on the host name!

Assisted-by: Jay Satiro
Fixes #4856
Closes #4857

5 years agoglobal_init: move the IPv6 works status bool to multi handle
Daniel Stenberg [Sun, 26 Jan 2020 16:51:01 +0000 (17:51 +0100)] 
global_init: move the IPv6 works status bool to multi handle

Previously it was stored in a global state which contributed to
curl_global_init's thread unsafety. This boolean is now instead figured
out in curl_multi_init() and stored in the multi handle. Less effective,
but thread safe.

Closes #4851

5 years agoREADME: mention that the docs is in docs/
Jay Satiro [Mon, 27 Jan 2020 08:15:26 +0000 (09:15 +0100)] 
README: mention that the docs is in docs/

Reported-by: Austin Green
Fixes #4830
Closes #4853

5 years agocurl.h: define CURL_WIN32 on windows
Daniel Stenberg [Mon, 27 Jan 2020 10:37:33 +0000 (11:37 +0100)] 
curl.h: define CURL_WIN32 on windows

... so that the subsequent logic below can use a single known define to know
when built on Windows (as we don't define WIN32 anymore).

Follow-up to 1adebe7886ddf20b

Reported-by: crazydef on github
Assisted-by: Marcel Raad
Fixes #4854
Closes #4855

5 years agoRELEASE-NOTES: synced
Daniel Stenberg [Mon, 27 Jan 2020 08:44:33 +0000 (09:44 +0100)] 
RELEASE-NOTES: synced

5 years agourldata: do string enums without #ifdefs for build scripts
Jon Rumsey [Mon, 27 Jan 2020 08:23:43 +0000 (09:23 +0100)] 
urldata: do string enums without #ifdefs for build scripts

... and check for inconsistencies for OS400 at build time with the new
chkstrings tool.

Closes #4822

5 years agocurl: make the -# spaceship bar not wrap the line
Daniel Stenberg [Sat, 25 Jan 2020 15:46:41 +0000 (16:46 +0100)] 
curl: make the -# spaceship bar not wrap the line

The fixed-point math made us lose precision and thus a too high index
value could be used for outputting the hashtags which could overwrite
the newline.

The fix increases the precision in the sine table (*100) and the
associated position math.

Reported-by: Andrew Potter
Fixes #4849
Closes #4850

5 years agoglobal_init: assume the EINTR bit by default
Daniel Stenberg [Thu, 23 Jan 2020 12:39:27 +0000 (13:39 +0100)] 
global_init: assume the EINTR bit by default

- Removed from global_init since it isn't thread-safe. The symbol will
  still remain to not break compiles, it just won't have any effect going
  forward.

- make the internals NOT loop on EINTR (the opposite from previously).
  It only risks returning from the select/poll/wait functions early, and that
  should be risk-free.

Closes #4840

5 years agoconn: do not reuse connection if SOCKS proxy credentials differ
Peter Piekarski [Mon, 20 Jan 2020 17:02:09 +0000 (18:02 +0100)] 
conn: do not reuse connection if SOCKS proxy credentials differ

Closes #4835

5 years agollist: removed unused Curl_llist_move()
Daniel Stenberg [Thu, 23 Jan 2020 08:15:39 +0000 (09:15 +0100)] 
llist: removed unused Curl_llist_move()

(and the corresponding unit test)

Closes #4842

5 years agoconncache: removed unused Curl_conncache_bundle_size()
Daniel Stenberg [Thu, 23 Jan 2020 08:03:29 +0000 (09:03 +0100)] 
conncache: removed unused Curl_conncache_bundle_size()

5 years agostrcase: turn Curl_raw_tolower into static
Daniel Stenberg [Thu, 23 Jan 2020 08:01:25 +0000 (09:01 +0100)] 
strcase: turn Curl_raw_tolower into static

Only ever used from within this file.

5 years agosingleuse.pl: support new API functions, fix curl_dbg_ handling
Daniel Stenberg [Thu, 23 Jan 2020 07:59:22 +0000 (08:59 +0100)] 
singleuse.pl: support new API functions, fix curl_dbg_ handling

5 years agowolfssh: make it init properly via Curl_ssh_init()
Daniel Stenberg [Thu, 23 Jan 2020 19:05:22 +0000 (20:05 +0100)] 
wolfssh: make it init properly via Curl_ssh_init()

Closes #4846

5 years agoform.d: fix two minor typos
Aron Rotteveel [Thu, 23 Jan 2020 08:24:30 +0000 (09:24 +0100)] 
form.d: fix two minor typos

Closes #4843

5 years agoopenssl: make CURLINFO_CERTINFO not truncate x509v3 fields
Daniel Stenberg [Wed, 22 Jan 2020 09:29:44 +0000 (10:29 +0100)] 
openssl: make CURLINFO_CERTINFO not truncate x509v3 fields

Avoid "reparsing" the content and instead deliver more exactly what is
provided in the certificate and avoid truncating the data after 512
bytes as done previously. This no longer removes embedded newlines.

Fixes #4837
Reported-by: bnfp on github
Closes #4841

5 years agoCURLOPT_PROXY_SSL_OPTIONS.3: Sync with CURLOPT_SSL_OPTIONS.3
Jay Satiro [Thu, 23 Jan 2020 07:51:52 +0000 (02:51 -0500)] 
CURLOPT_PROXY_SSL_OPTIONS.3: Sync with CURLOPT_SSL_OPTIONS.3

- Copy CURLOPT_SSL_OPTIONS.3 description to CURLOPT_PROXY_SSL_OPTIONS.3.

Prior to this change CURLSSLOPT_NO_PARTIALCHAIN was missing from the
CURLOPT_PROXY_SSL_OPTIONS description.

5 years agomk-ca-bundle: add support for CKA_NSS_SERVER_DISTRUST_AFTER
Daniel Stenberg [Mon, 20 Jan 2020 21:23:44 +0000 (22:23 +0100)] 
mk-ca-bundle: add support for CKA_NSS_SERVER_DISTRUST_AFTER

For now, no cert in the bundle actually sets a date there...

Co-Authored-by: Jay Satiro
Reported-by: Christian Heimes
Fixes #4834
Closes #4836

5 years agoRELEASE-NOTES: synced
Daniel Stenberg [Tue, 21 Jan 2020 14:15:31 +0000 (15:15 +0100)] 
RELEASE-NOTES: synced

5 years agosmtp: Allow RCPT TO command to fail for some recipients
Pavel Volgarev [Tue, 14 Jan 2020 22:22:38 +0000 (17:22 -0500)] 
smtp: Allow RCPT TO command to fail for some recipients

Introduces CURLOPT_MAIL_RCPT_ALLLOWFAILS.

Verified with the new tests 3002-3007

Closes #4816

5 years agocopyright: fix year ranges
Daniel Stenberg [Tue, 21 Jan 2020 09:34:44 +0000 (10:34 +0100)] 
copyright: fix year ranges

follow-up from dea17b519d (one of these days I'll learn to check before
I push)

5 years agohttp: move "oauth_bearer" from connectdata to Curl_easy
nao [Tue, 21 Jan 2020 09:30:37 +0000 (10:30 +0100)] 
http: move "oauth_bearer" from connectdata to Curl_easy

Fixes the bug where oauth_bearer gets deallocated when we re-use a
connection.

Closes #4824

5 years agocurl: Let -D merge headers in one file again
Emil Engler [Tue, 21 Jan 2020 08:23:21 +0000 (09:23 +0100)] 
curl: Let -D merge headers in one file again

Closes #4762
Fixes #4753

5 years agodata.d: remove "Multiple files can also be specified"
Daniel Stenberg [Tue, 21 Jan 2020 07:39:47 +0000 (08:39 +0100)] 
data.d: remove "Multiple files can also be specified"

It is superfluous and could even be misleading.

Bug: https://curl.haxx.se/mail/archive-2020-01/0016.html
Reported-by: Mike Norton
Closes #4832

5 years agoCMake: support specifying the target Windows version
Marcel Raad [Tue, 14 Jan 2020 19:28:20 +0000 (20:28 +0100)] 
CMake: support specifying the target Windows version

Previously, it was only possible to set it to Windows Vista or XP by
setting the option `ENABLE_INET_PTON` to `ON` resp. `OFF`.
Use a new cache variable `CURL_TARGET_WINDOWS_VERSION` to be able to
explicitly set the target Windows version. `ENABLE_INET_PTON` is
ignored in this case.

Ref: https://github.com/curl/curl/pull/1639#issuecomment-313039352
Ref: https://github.com/curl/curl/pull/4607#issuecomment-557541456
Closes https://github.com/curl/curl/pull/4815

5 years agohttp.h: Copyright year out of date, should be 2020
Daniel Stenberg [Mon, 20 Jan 2020 07:37:21 +0000 (08:37 +0100)] 
http.h: Copyright year out of date, should be 2020

Follow-up to 7ff9222ced8c

5 years agoHTTP: increase EXPECT_100_THRESHOLD to 1Mb
加藤郁之 [Tue, 14 Jan 2020 14:34:56 +0000 (23:34 +0900)] 
HTTP: increase EXPECT_100_THRESHOLD to 1Mb

Mentioned: https://curl.haxx.se/mail/lib-2020-01/0050.html

Closes #4814

5 years agoROADMAP: thread-safe `curl_global_init()`
Daniel Stenberg [Fri, 17 Jan 2020 11:58:35 +0000 (12:58 +0100)] 
ROADMAP: thread-safe `curl_global_init()`

I'd like to see this happen.

5 years agoRELEASE-NOTES: synced
Daniel Stenberg [Fri, 17 Jan 2020 07:08:36 +0000 (08:08 +0100)] 
RELEASE-NOTES: synced

5 years agowolfssl: use the wc-prefixed symbol alternatives
Daniel Stenberg [Thu, 16 Jan 2020 14:59:56 +0000 (15:59 +0100)] 
wolfssl: use the wc-prefixed symbol alternatives

The symbols without wc_ prefix are not always provided.

Ref: https://github.com/wolfSSL/wolfssl/issues/2744

Closes #4827

5 years agopolarssl: removed
Daniel Stenberg [Thu, 16 Jan 2020 07:17:04 +0000 (08:17 +0100)] 
polarssl: removed

As detailed in DEPRECATE.md, the polarssl support is now removed after
having been disabled for 6 months and nobody has missed it.

The threadlock files used by mbedtls are renamed to an 'mbedtls' prefix
instead of the former 'polarssl' and the common functions that
previously were shared between mbedtls and polarssl and contained the
name 'polarssl' have now all been renamed to instead say 'mbedtls'.

Closes #4825

5 years agolibssh2: fix variable type
Marcel Raad [Wed, 15 Jan 2020 19:28:01 +0000 (20:28 +0100)] 
libssh2: fix variable type

This led to a conversion warning on 64-bit MinGW, which has 32-bit
`long` but 64-bit `size_t`.

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

5 years agocurl:progressbarinit: ignore column width from terminals < 20
Daniel Stenberg [Tue, 14 Jan 2020 21:18:12 +0000 (22:18 +0100)] 
curl:progressbarinit: ignore column width from terminals < 20

To avoid division by zero - or other issues.

Reported-by: Daniel Marjamäki
Closes #4818

5 years agowolfssh: set the password correctly for PASSWORD auth
Daniel Stenberg [Wed, 15 Jan 2020 13:23:03 +0000 (14:23 +0100)] 
wolfssh: set the password correctly for PASSWORD auth

5 years agowolfssh: remove fprintf() calls (and uses of __func__)
Daniel Stenberg [Wed, 15 Jan 2020 13:00:37 +0000 (14:00 +0100)] 
wolfssh: remove fprintf() calls (and uses of __func__)

5 years agoCMake: use check_symbol_exists also for inet_pton
Marcel Raad [Sat, 11 Jan 2020 10:20:38 +0000 (11:20 +0100)] 
CMake: use check_symbol_exists also for inet_pton

It doesn't make much sense to only check if the function can be linked
when it's not declared in any header and that is treated as an error.
With the correct target Windows version set, the function is declared
in ws2tcpip.h and the comment above the modified block is invalid.

Also, move the definition of `_WIN32_WINNT` up to before all symbol
availability checks so that we don't have to care which ones must be
done after it.

Tested with Visual Studio 2019 and current MinGW-w64.

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

5 years agoschannel_verify: Fix alt names manual verify for UNICODE builds
Jay Satiro [Mon, 13 Jan 2020 23:25:12 +0000 (18:25 -0500)] 
schannel_verify: Fix alt names manual verify for UNICODE builds

Follow-up to 29e40a6 from two days ago, which added that feature for
Windows 7 and earlier. The bug only occurred in same.

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

5 years agoHTTP-COOKIES.md: describe the cookie file format
Daniel Stenberg [Fri, 10 Jan 2020 21:53:05 +0000 (22:53 +0100)] 
HTTP-COOKIES.md: describe the cookie file format

... and refer to that file from from CURLOPT_COOKIEFILE.3 and
CURLOPT_COOKIELIST.3

Assisted-by: Jay Satiro
Reported-by: bsammon on github
Fixes #4805
Closes #4806

5 years agoCMake: Add support for CMAKE_LTO option.
Tobias Hieta [Thu, 9 Jan 2020 11:10:55 +0000 (12:10 +0100)] 
CMake: Add support for CMAKE_LTO option.

This enables Link Time Optimization. LTO is a proven technique for
optimizing across compilation units.

Closes #4799

5 years agoRELEASE-NOTES: synced
Daniel Stenberg [Mon, 13 Jan 2020 15:02:01 +0000 (16:02 +0100)] 
RELEASE-NOTES: synced

5 years agoConnectionExists: respect the max_concurrent_streams limits
Daniel Stenberg [Sun, 5 Jan 2020 09:34:19 +0000 (10:34 +0100)] 
ConnectionExists: respect the max_concurrent_streams limits

A regression made the code use 'multiplexed' as a boolean instead of the
counter it is intended to be. This made curl try to "over-populate"
connections with new streams.

This regression came with 41fcdf71a1, shipped in curl 7.65.0.

Also, respect the CURLMOPT_MAX_CONCURRENT_STREAMS value in the same
check.

Reported-by: Kunal Ekawde
Fixes #4779
Closes #4784

5 years agocurl: make #0 not output the full URL
Daniel Stenberg [Mon, 13 Jan 2020 11:30:37 +0000 (12:30 +0100)] 
curl: make #0 not output the full URL

It was not intended nor documented!

Added test 1176 to verify.

Reported-by: vshmuk on hackerone
Closes #4812

5 years agowolfSSH: new SSH backend
Daniel Stenberg [Sun, 5 Jan 2020 09:51:39 +0000 (10:51 +0100)] 
wolfSSH: new SSH backend

Adds support for SFTP (not SCP) using WolfSSH.

Closes #4231

5 years agocurl: remove 'config' field from OutStruct
Daniel Stenberg [Sat, 11 Jan 2020 21:53:34 +0000 (22:53 +0100)] 
curl: remove 'config' field from OutStruct

As it was just unnecessary duplicated information already stored in the
'per_transfer' struct and that's around mostly anyway.

The duplicated pointer caused problems when the code flow was aborted
before the dupe was filled in and could cause a NULL pointer access.

Reported-by: Brian Carpenter
Fixes #4807
Closes #4810

5 years agomisc: Copyright year out of date, should be 2020
Daniel Stenberg [Sun, 12 Jan 2020 15:55:34 +0000 (16:55 +0100)] 
misc: Copyright year out of date, should be 2020

Follow-up to recent commits

[skip ci]

5 years agolibssh2: add support for forcing a hostkey type
Santino Keupp [Fri, 20 Dec 2019 12:37:20 +0000 (13:37 +0100)] 
libssh2: add support for forcing a hostkey type

- Allow forcing the host's key type found in the known_hosts file.

Currently, curl (with libssh2) does not take keys from your known_hosts
file into account when talking to a server. With this patch the
known_hosts file will be searched for an entry matching the hostname
and, if found, libssh2 will be told to claim this key type from the
server.

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

5 years agocmake: Improve libssh2 check on Windows
nicoguillier [Fri, 10 Jan 2020 08:57:38 +0000 (09:57 +0100)] 
cmake: Improve libssh2 check on Windows

- Add "libssh2" name to FindLibSSH2 library search.

On Windows systems, libSSH2 CMake installation may name the library
"LibSSH2".

Prior to this change cmake only checked for name "ssh2". On Linux that
works fine because it will prepend the "lib", but it doesn't do that on
Windows.

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

5 years agoschannel: Make CURLOPT_CAINFO work better on Windows 7
Faizur Rahman [Wed, 25 Dec 2019 23:49:48 +0000 (18:49 -0500)] 
schannel: Make CURLOPT_CAINFO work better on Windows 7

- Support hostname verification via alternative names (SAN) in the
  peer certificate when CURLOPT_CAINFO is used in Windows 7 and earlier.

CERT_NAME_SEARCH_ALL_NAMES_FLAG doesn't exist before Windows 8. As a
result CertGetNameString doesn't quite work on those versions of
Windows. This change provides an alternative solution for
CertGetNameString by iterating through CERT_ALT_NAME_INFO for earlier
versions of Windows.

Prior to this change many certificates failed the hostname validation
when CURLOPT_CAINFO was used in Windows 7 and earlier. Most certificates
now represent multiple hostnames and rely on the alternative names field
exclusively to represent their hostnames.

Reported-by: Jeroen Ooms
Fixes https://github.com/curl/curl/issues/3711
Closes https://github.com/curl/curl/pull/4761

5 years agongtcp2: Add an error code for QUIC connection errors
Emil Engler [Tue, 24 Dec 2019 10:17:16 +0000 (11:17 +0100)] 
ngtcp2: Add an error code for QUIC connection errors

- Add new error code CURLE_QUIC_CONNECT_ERROR for QUIC connection
  errors.

Prior to this change CURLE_FAILED_INIT was used, but that was not
correct.

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

5 years agomulti: Change curl_multi_wait/poll to error on negative timeout
Jay Satiro [Sat, 28 Dec 2019 04:39:24 +0000 (23:39 -0500)] 
multi: Change curl_multi_wait/poll to error on negative timeout

- Add new error CURLM_BAD_FUNCTION_ARGUMENT and return that error when
  curl_multi_wait/poll is passed timeout param < 0.

Prior to this change passing a negative value to curl_multi_wait/poll
such as -1 could cause the function to wait forever.

Reported-by: hamstergene@users.noreply.github.com
Fixes https://github.com/curl/curl/issues/4763

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

5 years agocmake: Enable SMB for Windows builds
Marc Aldorasi [Fri, 13 Dec 2019 22:23:11 +0000 (17:23 -0500)] 
cmake: Enable SMB for Windows builds

- Define USE_WIN32_CRYPTO by default. This enables SMB.

- Show whether SMB is enabled in the "Enabled features" output.

- Fix mingw compiler warning for call to CryptHashData by casting away
  const param. mingw CryptHashData prototype is wrong.

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

5 years agovtls: Refactor Curl_multissl_version to make the code clearer
Jay Satiro [Fri, 10 Jan 2020 06:34:00 +0000 (01:34 -0500)] 
vtls: Refactor Curl_multissl_version to make the code clearer

Reported-by: Johannes Schindelin
Ref: https://github.com/curl/curl/pull/3863#pullrequestreview-241395121

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

5 years agofix: Copyright year out of date, should be 2020
Daniel Stenberg [Fri, 10 Jan 2020 21:38:44 +0000 (22:38 +0100)] 
fix: Copyright year out of date, should be 2020

Follow-up to 875314ed0bf3b

5 years agohostip: move code to resolve IP address literals to `Curl_resolv`
Marcel Raad [Mon, 6 Jan 2020 11:56:44 +0000 (12:56 +0100)] 
hostip: move code to resolve IP address literals to `Curl_resolv`

The code was duplicated in the various resolver backends.

Also, it was called after the call to `Curl_ipvalid`, which matters in
case of `CURLRES_IPV4` when called from `connect.c:bindlocal`. This
caused test 1048 to fail on classic MinGW.

The code ignores `conn->ip_version` as done previously in the
individual resolver backends.

Move the call to the `resolver_start` callback up to appease test 655,
which wants it to be called also for literal addresses.

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

5 years agoscripts/delta: adapt to new public header layout
Daniel Stenberg [Tue, 7 Jan 2020 07:30:59 +0000 (08:30 +0100)] 
scripts/delta: adapt to new public header layout

5 years agotest1167: verify global symbols in public headers are curl prefixed
Daniel Stenberg [Tue, 7 Jan 2020 07:06:33 +0000 (08:06 +0100)] 
test1167: verify global symbols in public headers are curl prefixed

... using the new badsymbols.pl perl script

Fixes #4793
Closes #4794

5 years agolibtest/mk-lib1521: adapt to new public header layout
Daniel Stenberg [Tue, 7 Jan 2020 07:30:33 +0000 (08:30 +0100)] 
libtest/mk-lib1521: adapt to new public header layout

5 years agoinclude: remove non-curl prefixed defines
Daniel Stenberg [Tue, 7 Jan 2020 07:28:47 +0000 (08:28 +0100)] 
include: remove non-curl prefixed defines

...requires some rearranging of the setup of CURLOPT_ and CURLMOPT_
enums.

5 years agocurl.h: remove WIN32 define
Daniel Stenberg [Mon, 6 Jan 2020 22:31:42 +0000 (23:31 +0100)] 
curl.h: remove WIN32 define

It isn't our job to define this in a public header - and it defines a
name outside of our naming scope.

5 years agotool_dirhie.c: fix the copyright year range
Daniel Stenberg [Thu, 9 Jan 2020 21:49:02 +0000 (22:49 +0100)] 
tool_dirhie.c: fix the copyright year range

Follow-up to: 4027bd72d9

5 years agobump: work towards 7.69.0 is started
Daniel Stenberg [Thu, 9 Jan 2020 21:37:59 +0000 (22:37 +0100)] 
bump: work towards 7.69.0 is started

5 years agotool_dirhie: Allow directory traversal during creation
Jay Satiro [Wed, 8 Jan 2020 00:44:51 +0000 (19:44 -0500)] 
tool_dirhie: Allow directory traversal during creation

- When creating a directory hierarchy do not error when mkdir fails due
  to error EACCESS (13) "access denied".

Some file systems allow for directory traversal; in this case that it
should be possible to create child directories when permission to the
parent directory is restricted.

This is a regression caused by me in f16bed0 (precedes curl-7_61_1).
Basically I had assumed that if a directory already existed it would
fail only with error EEXIST, and not error EACCES. The latter may
happen if the directory exists but has certain restricted permissions.

Reported-by: mbeifuss@users.noreply.github.com
Fixes https://github.com/curl/curl/issues/4796
Closes https://github.com/curl/curl/pull/4797

5 years agoKNOWN_BUGS: AUTH PLAIN for SMTP is not working on all servers
Daniel Stenberg [Thu, 9 Jan 2020 15:19:34 +0000 (16:19 +0100)] 
KNOWN_BUGS: AUTH PLAIN for SMTP is not working on all servers

Closes #4080

5 years agodocs/RELEASE-PROCEDURE.md: pushed some release dates
Daniel Stenberg [Thu, 9 Jan 2020 08:25:56 +0000 (09:25 +0100)] 
docs/RELEASE-PROCEDURE.md: pushed some release dates

Ref: https://curl.haxx.se/mail/lib-2020-01/0031.html

5 years agoruntests: make random seed fixed for a month
Daniel Stenberg [Wed, 18 Dec 2019 14:37:20 +0000 (15:37 +0100)] 
runtests: make random seed fixed for a month

When using randomized features of runtests (-R and --shallow) it is
useful to have a fixed random seed to make sure for example extra
commits in a branch or a rebase won't change the seed that would make
repeated runs work differently.

As it is also useful to change seed sometimes, the default seed is now
determined based on the current month (and first line curl -V
output). When the month changes, so will the random seed.

The specific seed is also shown in the standard test suite top header
and it can be set explictly with the new --seed=[num] option so that the
exact order of a previous run can be achieved.

Closes #4734

5 years agoRELEASE-PROCEDURE.md: fix next release date (Feb 26)
Daniel Stenberg [Wed, 8 Jan 2020 08:47:37 +0000 (09:47 +0100)] 
RELEASE-PROCEDURE.md: fix next release date (Feb 26)

[skip ci]

5 years agoRELEASE-NOTES: 7.68.0 curl-7_68_0
Daniel Stenberg [Sat, 4 Jan 2020 21:48:15 +0000 (22:48 +0100)] 
RELEASE-NOTES: 7.68.0

5 years agoTHANKS: updated with names from the 7.68.0 release
Daniel Stenberg [Sat, 4 Jan 2020 21:49:37 +0000 (22:49 +0100)] 
THANKS: updated with names from the 7.68.0 release

5 years agoRELEASE-PROCEDURE: add four future release dates
Daniel Stenberg [Tue, 7 Jan 2020 14:16:46 +0000 (15:16 +0100)] 
RELEASE-PROCEDURE: add four future release dates

and remove four past release dates

[skip ci]

5 years agoTrackMemory tests: always remove CR before LF
Marcel Raad [Mon, 6 Jan 2020 10:11:50 +0000 (11:11 +0100)] 
TrackMemory tests: always remove CR before LF

It was removed for output containing ' =' via `s/ =.*//`. With classic
MinGW, this made lines with `free()` end with CRLF, but lines with e.g.
`malloc()` end with only LF. The tests expect LF only.

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

5 years agomulti.h: move INITIAL_MAX_CONCURRENT_STREAMS from public header
Daniel Stenberg [Mon, 6 Jan 2020 12:13:33 +0000 (13:13 +0100)] 
multi.h: move INITIAL_MAX_CONCURRENT_STREAMS from public header

... to the private multihhandle.h. It is not for public use and it
wasn't prefixed correctly anyway!

Closes #4790

5 years agofile: fix copyright year range
Daniel Stenberg [Mon, 6 Jan 2020 09:12:02 +0000 (10:12 +0100)] 
file: fix copyright year range

Follow-up to 1b71bc532bd