]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
5 years agotests/data: fix static ip:port instead of dynamic values being used
Marc Hoersken [Tue, 10 Mar 2020 02:56:50 +0000 (03:56 +0100)] 
tests/data: fix static ip:port instead of dynamic values being used

Closes #5065

5 years agotests/server: fix missing use of exe_ext helper function
Marc Hoersken [Tue, 10 Mar 2020 02:56:17 +0000 (03:56 +0100)] 
tests/server: fix missing use of exe_ext helper function

Follow up to 9819984 and 3dce984
Reviewed-By: Daniel Stenberg
Closes #5064

5 years agoruntests: log minimal and maximal used port numbers
Marc Hoersken [Mon, 9 Mar 2020 16:12:35 +0000 (17:12 +0100)] 
runtests: log minimal and maximal used port numbers

5 years agosftp: fix segfault regression introduced by #4747
Jim Fuller [Sun, 8 Mar 2020 17:35:21 +0000 (18:35 +0100)] 
sftp: fix segfault regression introduced by #4747

This fix adds a defensive check for the case where the char *name in
struct libssh2_knownhost is NULL

Fixes #5041
Closes #5062

5 years agoRELEASE-NOTES: synced
Daniel Stenberg [Sun, 8 Mar 2020 22:22:02 +0000 (23:22 +0100)] 
RELEASE-NOTES: synced

5 years agosocks4: fix host resolve regression
Daniel Stenberg [Sun, 8 Mar 2020 16:24:50 +0000 (17:24 +0100)] 
socks4: fix host resolve regression

1. The socks4 state machine was broken in the host resolving phase

2. The code now insists on IPv4-only when using SOCKS4 as the protocol
only supports that.

Regression from #4907 and 4a4b63d, shipped in 7.69.0

Reported-by: amishmm on github
Bug: https://github.com/curl/curl/issues/5053#issuecomment-596191594
Closes #5061

5 years agosilly web server: silent a compilation warning
Patrick Monnerat [Tue, 28 Jan 2020 10:56:41 +0000 (11:56 +0100)] 
silly web server: silent a compilation warning

Recent gcc warns when byte count of strncpy() equals the destination
buffer size. Since the destination buffer is previously cleared and
the source string is always shorter, reducing the byte count by one
silents the warning without affecting the result.

Closes #5059

5 years agocookie: get_top_domain() sets zero length for null domains
Patrick Monnerat [Tue, 28 Jan 2020 09:23:41 +0000 (10:23 +0100)] 
cookie: get_top_domain() sets zero length for null domains

This silents a compilation warning with gcc -O3.

5 years agotest 1560: avoid valgrind false positives
Patrick Monnerat [Tue, 28 Jan 2020 01:44:29 +0000 (02:44 +0100)] 
test 1560: avoid valgrind false positives

When using maximum code optimization level (-O3), valgrind wrongly
detects uses of uninitialized values in strcmp().

Preset buffers with all zeroes to avoid that.

5 years agosha256: Added WinCrypt implementation
Steve Holme [Thu, 20 Feb 2020 01:49:31 +0000 (01:49 +0000)] 
sha256: Added WinCrypt implementation

Closed #5030

5 years agosha256: Added SecureTransport implementation
Steve Holme [Thu, 20 Feb 2020 01:41:01 +0000 (01:41 +0000)] 
sha256: Added SecureTransport implementation

5 years agolib1564: reduce number of mid-wait wakeup calls
Daniel Stenberg [Sat, 7 Mar 2020 12:37:50 +0000 (13:37 +0100)] 
lib1564: reduce number of mid-wait wakeup calls

This test does A LOT of *wakeup() calls and then calls curl_multi_poll()
twice. The first *poll() is then expected to return early and the second
not - as the first is supposed to drain the socketpair pipe.

It turns out however that when given "excessive" amounts of writes to
the pipe, some operating systems (the Solaris based are known) will
return EAGAIN before the pipe is drained, which in our test case causes
the second *poll() call to also abort early.

This change attempts to avoid the OS-specific behaviors in the test by
reducing the amount of wakeup calls from 1234567 to 10.

Reported-by: Andy Fiddaman
Fixes #5037
Closes #5058

5 years agomime: fix the binary encoder to handle large data properly
Patrick Monnerat [Sat, 7 Mar 2020 11:00:56 +0000 (12:00 +0100)] 
mime: fix the binary encoder to handle large data properly

New test 666 checks this is effective.
As upload buffer size is significant in this kind of tests, shorten it
in similar test 652.

Fixes #4860
Closes #4833
Reported-by: RuurdBeerstra on github
5 years agomime: do not perform more than one read in a row
Patrick Monnerat [Sat, 7 Mar 2020 10:51:00 +0000 (11:51 +0100)] 
mime: do not perform more than one read in a row

Input buffer filling may delay the data sending if data reads are slow.
To overcome this problem, file and callback data reads do not accumulate
in buffer anymore. All other data (memory data and mime framing) are
considered as fast and still concatenated in buffer.
As this may highly impact performance in terms of data overhead, an early
end of part data check is added to spare a read call.
When encoding a part's data, an encoder may require more bytes than made
available by a single read. In this case, the above rule does not apply
and reads are performed until the encoder is able to deliver some data.

Tests 643, 644, 645, 650 and 654 have been adapted to the output data
changes, with test data size reduced to avoid the boredom of long lists of
1-byte chunks in verification data.
New test 667 checks mimepost using single-byte read callback with encoder.
New test 668 checks the end of part data early detection.

Fixes #4826
Reported-by: MrdUkk on github
5 years agomime: latch last read callback status.
Patrick Monnerat [Fri, 6 Mar 2020 08:46:39 +0000 (09:46 +0100)] 
mime: latch last read callback status.

In case a read callback returns a status (pause, abort, eof,
error) instead of a byte count, drain the bytes read so far but
remember this status for further processing.
Takes care of not losing data when pausing, and properly resume a
paused mime structure when requested.
New tests 670-673 check unpausing cases, with easy or multi
interface and mime or form api.

Fixes #4813
Reported-by: MrdUkk on github
5 years agoruntests: fix missing use of exe_ext helper function
Marc Hoersken [Fri, 6 Mar 2020 20:15:58 +0000 (21:15 +0100)] 
runtests: fix missing use of exe_ext helper function

5 years agoares: store dns parameters for duphandle
Ernst Sjöstrand [Mon, 2 Mar 2020 13:51:43 +0000 (14:51 +0100)] 
ares: store dns parameters for duphandle

With c-ares the dns parameters lives in ares_channel. Store them in the
curl handle and set them again in easy_duphandle.

Regression introduced in #3228 (6765e6d), shipped in curl 7.63.0.

Fixes #4893
Closes #5020
Signed-off-by: Ernst Sjöstrand <ernst.sjostrand@verisure.com>
5 years agoversion: make curl_version* thread-safe without using global context
Daniel Stenberg [Sun, 1 Mar 2020 15:16:19 +0000 (16:16 +0100)] 
version: make curl_version* thread-safe without using global context

Closes #5010

5 years agoRELEASE-NOTES: synced
Daniel Stenberg [Sat, 7 Mar 2020 10:22:23 +0000 (11:22 +0100)] 
RELEASE-NOTES: synced

5 years agotests: use native Sleep function as fallback on Windows
Marc Hoersken [Sat, 7 Mar 2020 10:01:57 +0000 (11:01 +0100)] 
tests: use native Sleep function as fallback on Windows

Reviewed-By: Daniel Stenberg
Closes #5054

5 years agoperl: align order and completeness of Windows OS checks
Marc Hoersken [Fri, 6 Mar 2020 10:13:57 +0000 (11:13 +0100)] 
perl: align order and completeness of Windows OS checks

5 years agotool_cb_see: set correct copyright year range
Daniel Stenberg [Sat, 7 Mar 2020 10:00:48 +0000 (11:00 +0100)] 
tool_cb_see: set correct copyright year range

Follow-up to a39e5bfb9

5 years agoseek: fix fallback for missing ftruncate on Windows
Marc Hoersken [Sat, 7 Mar 2020 09:59:27 +0000 (10:59 +0100)] 
seek: fix fallback for missing ftruncate on Windows

This fixes test 198 on versions of MinGW-w64 without ftruncate

Reviewed-By: Daniel Stenberg
Reviewed-By: Marcel Raad
Closes #5055

5 years agoconfig-win32: Windows does not have ftruncate
Marc Hoersken [Fri, 6 Mar 2020 13:18:43 +0000 (14:18 +0100)] 
config-win32: Windows does not have ftruncate

5 years agopause: force a connection (re-)check after unpausing
Daniel Stenberg [Fri, 6 Mar 2020 09:04:28 +0000 (10:04 +0100)] 
pause: force a connection (re-)check after unpausing

There might be data available that was already read off the socket, for
example in the TLS layer.

Reported-by: Anders Berg
Fixes #4966
Closes #5049

5 years agosocks5: switch state properly when the resolve is done
Daniel Stenberg [Fri, 6 Mar 2020 21:32:38 +0000 (22:32 +0100)] 
socks5: switch state properly when the resolve is done

Regression from 4a4b63d (and #4907)
Reported-by: vitaha85 on github
Fixes #5053
Closes #5056

5 years agolibssh: Fix matching user-specified MD5 hex key
Jay Satiro [Sun, 23 Feb 2020 23:37:09 +0000 (18:37 -0500)] 
libssh: Fix matching user-specified MD5 hex key

Prior to this change a match would never be successful because it
was mistakenly coded to compare binary data from libssh to a
user-specified hex string (ie CURLOPT_SSH_HOST_PUBLIC_KEY_MD5).

Reported-by: fds242@users.noreply.github.com
Fixes https://github.com/curl/curl/issues/4971
Closes https://github.com/curl/curl/pull/4974

5 years agopause: bail out on bad input
Daniel Stenberg [Fri, 6 Mar 2020 09:12:22 +0000 (10:12 +0100)] 
pause: bail out on bad input

A NULL easy handle or an easy handle without an associated connection
cannot be paused or unpaused.

Closes #5050

5 years agounit1612: fixed the inclusion and compilation of the HMAC unit test
Steve Holme [Tue, 3 Mar 2020 02:32:42 +0000 (02:32 +0000)] 
unit1612: fixed the inclusion and compilation of the HMAC unit test

Follow up to 3f74e5e6 to fix:

- A typo in Makefile.inc where unit1611 was used instead
- Some compilation issues in unit1612.c

Closes #5024

5 years agopause: return early for calls that don't change pause state
Daniel Stenberg [Tue, 3 Mar 2020 07:10:09 +0000 (08:10 +0100)] 
pause: return early for calls that don't change pause state

Reviewed-by: Patrick Monnerat
Ref: #4833
Closes #5026

5 years agocurl_share_setopt.3: Note sharing cookies doesn't enable the engine
Jay Satiro [Fri, 6 Mar 2020 05:04:54 +0000 (00:04 -0500)] 
curl_share_setopt.3: Note sharing cookies doesn't enable the engine

Follow-up to d0a7ee3 which fixed a bug in 7.66.0 that caused
CURL_LOCK_DATA_COOKIE to enable the easy handle's cookie engine.

Bug: https://curl.haxx.se/mail/lib-2020-03/0019.html
Reported-by: Felipe Gasper
Closes https://github.com/curl/curl/pull/5048

5 years agomulti: skip EINTR check on wakeup socket if it was closed
Jay Satiro [Fri, 6 Mar 2020 04:35:32 +0000 (23:35 -0500)] 
multi: skip EINTR check on wakeup socket if it was closed

- Don't check errno on wakeup socket if sread returned 0 since sread
  doesn't set errno in that case.

This is a follow-up to cf7760a from several days ago which fixed
Curl_multi_wait to stop busy looping sread on the non-blocking wakeup
socket if it was closed (ie sread returns 0). Due to a logic error it
was still possible to busy loop in that case if errno == EINTR.

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

5 years agotransfer: set correct copyright year range
Daniel Stenberg [Fri, 6 Mar 2020 07:16:38 +0000 (08:16 +0100)] 
transfer: set correct copyright year range

5 years agourldata: remove the 'stream_was_rewound' connectdata struct member
Daniel Stenberg [Thu, 5 Mar 2020 22:52:41 +0000 (23:52 +0100)] 
urldata: remove the 'stream_was_rewound' connectdata struct member

... as it is never set anywhere.

Follow-up to 2f44e94ef
Closes #5046

5 years agoRevert "pause: force-drain the transfer on unpause" 5045/head
Daniel Stenberg [Thu, 5 Mar 2020 22:45:36 +0000 (23:45 +0100)] 
Revert "pause: force-drain the transfer on unpause"

This reverts commit fa0216b294af4c7113a9040ca65eefc7fc18ac1c (from #5000)

Clearly that didn't solve the problem correctly.

Reported-by: Christopher Reid
Reopens #4966
Fixes #5044

5 years agoRELEASE-NOTES: synced
Daniel Stenberg [Thu, 5 Mar 2020 14:32:13 +0000 (15:32 +0100)] 
RELEASE-NOTES: synced

and bumped curlver.h

5 years agoMANUAL: update a dict-using command line
Daniel Stenberg [Thu, 5 Mar 2020 13:30:13 +0000 (14:30 +0100)] 
MANUAL: update a dict-using command line

The 'web1913' database is now invalid, use 'gcide' instead.

5 years agoKNOWN_BUGS: configure --with-gssapi with Heimdal is ignored on macOS
Daniel Stenberg [Thu, 5 Mar 2020 13:27:14 +0000 (14:27 +0100)] 
KNOWN_BUGS: configure --with-gssapi with Heimdal is ignored on macOS

Closes #3841

5 years agopolarssl: remove more references and mentions
Daniel Stenberg [Wed, 4 Mar 2020 13:50:11 +0000 (14:50 +0100)] 
polarssl: remove more references and mentions

Assisted-by: Jay Satiro
Follow-up to 6357a19ff29dac04
Closes #5036

5 years agotests: wrap ignored test failures in braces
Marc Hoersken [Wed, 4 Mar 2020 21:36:47 +0000 (22:36 +0100)] 
tests: wrap ignored test failures in braces

5 years agotests: align some Windows sleep defines with each other
Marc Hoersken [Wed, 4 Mar 2020 15:11:03 +0000 (16:11 +0100)] 
tests: align some Windows sleep defines with each other

5 years agotests: try to make sleeping portable by avoiding select
Marc Hoersken [Wed, 4 Mar 2020 10:44:49 +0000 (11:44 +0100)] 
tests: try to make sleeping portable by avoiding select

select does not support just waiting on Windows:
https://perldoc.perl.org/perlport.html#select

Reviewed-By: Daniel Stenberg
Closes #5035

5 years agoruntests.1: rephrase how to specify what tests to run
Daniel Stenberg [Tue, 3 Mar 2020 21:20:16 +0000 (22:20 +0100)] 
runtests.1: rephrase how to specify what tests to run

Also mention the new tilde-prefixed way to ignore test results.

Reviewed-By: Marc Hoersken
Closes #5033

5 years agocirrus-ci: disable the FreeBSD 13 builds
Daniel Stenberg [Tue, 3 Mar 2020 13:20:04 +0000 (14:20 +0100)] 
cirrus-ci: disable the FreeBSD 13 builds

FreeBSD 13.0 is apparently close to a year away from a stable release
and has proven to cause intermittent builds failures recently.

Assisted-by: Dan Fandrich
Assisted-by: Fedor Korotkov
Fixes #5028
Closes #5029

5 years agoRELEASE-NOTES: 7.69.0 curl-7_69_0
Daniel Stenberg [Sat, 29 Feb 2020 10:36:05 +0000 (11:36 +0100)] 
RELEASE-NOTES: 7.69.0

5 years agoTHANKS: from 7.69.0
Daniel Stenberg [Sat, 29 Feb 2020 10:35:54 +0000 (11:35 +0100)] 
THANKS: from 7.69.0

Now sorted case insensitive

5 years agoci/tests: fix escaping of testnames and disable proxy for CI APIs 5031/head
Marc Hoersken [Tue, 3 Mar 2020 19:05:58 +0000 (20:05 +0100)] 
ci/tests: fix escaping of testnames and disable proxy for CI APIs

Follow up to ada581f and c0d8b96
Closes #5031

5 years agocmake: Show HTTPS-proxy in the features output
Jay Satiro [Tue, 3 Mar 2020 05:25:44 +0000 (00:25 -0500)] 
cmake: Show HTTPS-proxy in the features output

- Show HTTPS-proxy in the features output for those backends that
  support it: OpenSSL, GnuTLS and NSS.

Prior to this change HTTPS-proxy was missing from the cmake features
output even if curl was built with it. Only cmake output was affected.
Both the library and tool correctly reported the feature.

Bug: https://curl.haxx.se/mail/lib-2020-03/0008.html
Reported-by: David Lopes
Closes https://github.com/curl/curl/pull/5025

5 years agoci/tests: Make it possible to still run but ignore failing tests 4994/head
Marc Hoersken [Mon, 2 Mar 2020 13:05:59 +0000 (14:05 +0100)] 
ci/tests: Make it possible to still run but ignore failing tests

This enables the development of a solution for the failing tests by
running them on CI while ignoring their result for the overall status.

Closes #4994

5 years agoREADME.md: add Azure DevOps Pipelines build status badge
Marc Hoersken [Tue, 3 Mar 2020 16:11:26 +0000 (17:11 +0100)] 
README.md: add Azure DevOps Pipelines build status badge

5 years agoci/tests: Move CI test result creation above environment setup
Marc Hoersken [Tue, 3 Mar 2020 11:49:53 +0000 (12:49 +0100)] 
ci/tests: Move CI test result creation above environment setup

This avoids using our test servers as proxy to the AppVeyor API.

Closes #5022

5 years agoci/tests: Send test results to AppVeyor for status overview
Marc Hoersken [Tue, 3 Mar 2020 11:37:40 +0000 (12:37 +0100)] 
ci/tests: Send test results to AppVeyor for status overview

Closes #5021

5 years agoRevert "sha256: Added SecureTransport implementation"
Daniel Stenberg [Tue, 3 Mar 2020 07:38:09 +0000 (08:38 +0100)] 
Revert "sha256: Added SecureTransport implementation"

This reverts commit 4feb38deed33fed14ff7c370a6a9153c661dbb9c (from #4956)

That commit broke test 1610 on macos builds without TLS.

Closes #5027

5 years agodist: include tests/azure.pm in the tarball
Daniel Stenberg [Tue, 3 Mar 2020 07:42:38 +0000 (08:42 +0100)] 
dist: include tests/azure.pm in the tarball

Bug: https://github.com/curl/curl/commit/ada581f2cc32f48c1629b729707ac19208435b27#commitcomment-37601589
Reported-by: Marcel Raad
5 years agoconfigure.ac: Disable metalink if mbedTLS is specified
Steve Holme [Mon, 2 Mar 2020 01:51:49 +0000 (01:51 +0000)] 
configure.ac: Disable metalink if mbedTLS is specified

Follow up to cdcc9df1 and #5006. Even though I mentioned mbedTLS as
being one of the backends that metalink needs to be disabled for, I
seem to have included it in the list of allowed SSL/TLS backends in
comnfigure.ac :(

Closes #5013

5 years agosha256: Tidy up following recent changes
Steve Holme [Tue, 25 Feb 2020 17:12:28 +0000 (17:12 +0000)] 
sha256: Tidy up following recent changes

Reviewed-by: Daniel Stenberg
Closes #4956

5 years agosha256: Added WinCrypt implementation
Steve Holme [Thu, 20 Feb 2020 01:49:31 +0000 (01:49 +0000)] 
sha256: Added WinCrypt implementation

5 years agosha256: Added SecureTransport implementation
Steve Holme [Thu, 20 Feb 2020 01:41:01 +0000 (01:41 +0000)] 
sha256: Added SecureTransport implementation

5 years agosha256: Added mbedtls implementation
Steve Holme [Tue, 25 Feb 2020 19:04:49 +0000 (19:04 +0000)] 
sha256: Added mbedtls implementation

5 years agosha256: Added GNU TLS gcrypt implementation
Steve Holme [Thu, 20 Feb 2020 01:31:06 +0000 (01:31 +0000)] 
sha256: Added GNU TLS gcrypt implementation

5 years agosha256: Added GNU TLS Nettle implementation
Steve Holme [Thu, 20 Feb 2020 01:25:27 +0000 (01:25 +0000)] 
sha256: Added GNU TLS Nettle implementation

5 years agocurl_escape.3: Add a link to curl_free
Jay Satiro [Mon, 2 Mar 2020 22:39:10 +0000 (17:39 -0500)] 
curl_escape.3: Add a link to curl_free

Ref: https://github.com/curl/curl/pull/5016#issuecomment-593628582

5 years agocurl_getenv.3: Fix the memory handling description
Jay Satiro [Mon, 2 Mar 2020 07:59:40 +0000 (02:59 -0500)] 
curl_getenv.3: Fix the memory handling description

- Tell the user to call curl_free() to free the pointer returned by
  curl_getenv().

Prior to this change the user was directed to call free(), but that
would not work in cases where the library and application use separate C
runtimes and therefore have separate heap memory management.

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

5 years agomd4: use init/update/final functions in Secure Transport
Nick Zitzmann [Mon, 24 Feb 2020 02:23:52 +0000 (20:23 -0600)] 
md4: use init/update/final functions in Secure Transport

We can use CC_MD4_Init/Update/Final without having to allocate memory
directly.

Closes #4979

5 years agoci/tests: some MacOS builds randomly take longer than 20min
Marc Hoersken [Mon, 2 Mar 2020 18:44:19 +0000 (19:44 +0100)] 
ci/tests: some MacOS builds randomly take longer than 20min

5 years agomulti_wait: stop loop when sread() returns zero
Daniel Stenberg [Mon, 2 Mar 2020 09:38:53 +0000 (10:38 +0100)] 
multi_wait: stop loop when sread() returns zero

It's unclear why it would ever return zero here, but this change fixes
Robert's problem and it shouldn't loop forever...

Reported-by: Robert Dunaj
Bug: https://curl.haxx.se/mail/archive-2020-02/0011.html
Closes #5019

5 years agohttp: mark POSTs with no body as "upload done" from the start
Daniel Stenberg [Sat, 29 Feb 2020 11:00:18 +0000 (12:00 +0100)] 
http: mark POSTs with no body as "upload done" from the start

As we have logic that checks if we get a >= 400 reponse code back before
the upload is done, which then got confused since it wasn't "done" but
yet there was no data to send!

Reported-by: IvanoG on github
Fixes #4996
Closes #5002

5 years agotests: disable 962, 963 and 964 on Windows
Daniel Stenberg [Mon, 2 Mar 2020 13:44:46 +0000 (14:44 +0100)] 
tests: disable 962, 963 and 964 on Windows

These tests are also doing UTF-8 SMTP.

Follow-up to df207d2dd93b9e73

5 years agoci/tests: fine-tune Azure Pipeline timeouts with a small puffer
Marc Hoersken [Mon, 2 Mar 2020 12:56:36 +0000 (13:56 +0100)] 
ci/tests: fine-tune Azure Pipeline timeouts with a small puffer

5 years agoconfigure: bump the AC_COPYRIGHT year range
Daniel Stenberg [Mon, 2 Mar 2020 08:44:03 +0000 (09:44 +0100)] 
configure: bump the AC_COPYRIGHT year range

5 years agotests: disable SMTP UTF-8 tests on Windows
Steve Holme [Thu, 27 Feb 2020 17:33:16 +0000 (17:33 +0000)] 
tests: disable SMTP UTF-8 tests on Windows

Fixes #4988
Closes #4992

5 years agoformdata/mime: copyright year range update
Daniel Stenberg [Mon, 2 Mar 2020 07:11:35 +0000 (08:11 +0100)] 
formdata/mime: copyright year range update

Due to the merge/revert cycle

5 years agoRevert "mime: latch last read callback status."
Daniel Stenberg [Mon, 2 Mar 2020 06:42:55 +0000 (07:42 +0100)] 
Revert "mime: latch last read callback status."

This reverts commit 87869e38d7afdec3ef1bb4965711458b088e254f.

Fixes #5014
Closes #5015
Reopens #4833

5 years agoRevert "mime: do not perform more than one read in a row"
Daniel Stenberg [Mon, 2 Mar 2020 06:42:54 +0000 (07:42 +0100)] 
Revert "mime: do not perform more than one read in a row"

This reverts commit ed0f357f7d25566110d4302f33759f4ffb5a6f83.

5 years agoRevert "mime: fix the binary encoder to handle large data properly"
Daniel Stenberg [Mon, 2 Mar 2020 06:42:48 +0000 (07:42 +0100)] 
Revert "mime: fix the binary encoder to handle large data properly"

This reverts commit b2caaa0681f329eed317ffb6ae6927f4a539f0c1.

5 years agoaltsvc: both h3 backends now speak h3-27
Daniel Stenberg [Sun, 1 Mar 2020 23:07:37 +0000 (00:07 +0100)] 
altsvc: both h3 backends now speak h3-27

... also updated the HTTP3 build description for ngtcp2 accordingly.

5 years agomime: fix the binary encoder to handle large data properly
Patrick Monnerat [Wed, 29 Jan 2020 04:30:08 +0000 (05:30 +0100)] 
mime: fix the binary encoder to handle large data properly

New test 666 checks this is effective.
As upload buffer size is significant in this kind of tests, shorten it
in similar test 652.

Fixes #4860
Reported-by: RuurdBeerstra on github
5 years agomime: do not perform more than one read in a row
Patrick Monnerat [Wed, 29 Jan 2020 04:28:26 +0000 (05:28 +0100)] 
mime: do not perform more than one read in a row

Input buffer filling may delay the data sending if data reads are slow.
To overcome this problem, file and callback data reads do not accumulate
in buffer anymore. All other data (memory data and mime framing) are
considered as fast and still concatenated in buffer.
As this may highly impact performance in terms of data overhead, an early
end of part data check is added to spare a read call.
When encoding a part's data, an encoder may require more bytes than made
available by a single read. In this case, the above rule does not apply
and reads are performed until the encoder is able to deliver some data.

Tests 643, 644, 645, 650 and 654 have been adapted to the output data
changes, with test data size reduced to avoid the boredom of long lists of
1-byte chunks in verification data.
New test 664 checks mimepost using single-byte read callback with encoder.
New test 665 checks the end of part data early detection.

Fixes #4826
Reported-by: MrdUkk on github
5 years agomime: latch last read callback status.
Patrick Monnerat [Tue, 21 Jan 2020 00:33:04 +0000 (01:33 +0100)] 
mime: latch last read callback status.

In case a read callback returns a status (pause, abort, eof,
error) instead of a byte count, drain the bytes read so far but
remember this status for further processing.
Takes care of not losing data when pausing, and properly resume a
paused mime structure when requested.
New tests 670-673 check unpausing cases, with easy or multi
interface and mime or form api.

Fixes #4813
Reported-by: MrdUkk on github
Closes #4833

5 years agounit1651: Fixed conversion compilation warning
Steve Holme [Sun, 1 Mar 2020 02:43:28 +0000 (02:43 +0000)] 
unit1651: Fixed conversion compilation warning

371:17: warning: conversion to 'unsigned char' from 'int' may alter its
        value [-Wconversion]

Closes #5008

5 years agoconfigure.ac: Disable metalink support if an incompatible SSL/TLS specified
Steve Holme [Sat, 29 Feb 2020 21:44:10 +0000 (21:44 +0000)] 
configure.ac: Disable metalink support if an incompatible SSL/TLS specified

tool_metalink only supports cryptography from OpenSSL, GnuTLS, NSS,
The Win32 Crypto library and Apple's Common Crypto library.

If an TLS backend such as mbedTLS or WolfSSL is specified then the
following error is given during compilation along, with a load of
unresolved extern errors:

Can't compile METALINK support without a crypto library.

Reviewed-by: Daniel Stenberg
Closes #5006

5 years agoci/tests: Update Azure DevOps pipeline job display names
Marc Hoersken [Sun, 1 Mar 2020 13:59:03 +0000 (14:59 +0100)] 
ci/tests: Update Azure DevOps pipeline job display names

Make the configure step more descriptive and align others.

5 years agoci/tests: Fix typo in previous commit 597cf2
Marc Hoersken [Sun, 1 Mar 2020 13:49:35 +0000 (14:49 +0100)] 
ci/tests: Fix typo in previous commit 597cf2

5 years agoci/tests: Make sure that the AZURE_ACCESS_TOKEN is available
Marc Hoersken [Sun, 1 Mar 2020 13:43:58 +0000 (14:43 +0100)] 
ci/tests: Make sure that the AZURE_ACCESS_TOKEN is available

For security reasons the access token is not available to PR builds.
Therefore we should not try to use the DevOps API with an empty token.

5 years agobuild: remove all HAVE_OPENSSL_ENGINE_H defines
Daniel Stenberg [Sat, 29 Feb 2020 22:39:42 +0000 (23:39 +0100)] 
build: remove all HAVE_OPENSSL_ENGINE_H defines

... as there's nothing in the code that actually uses the define! The
last reference was removed in 38203f158.

Closes #5007

5 years agoCMake: clean up and improve build procedures
Rolf Eike Beer [Mon, 24 Feb 2020 12:34:54 +0000 (13:34 +0100)] 
CMake: clean up and improve build procedures

- remove check for unsupported old CMake versions

- do not link to c-ares library twice

- modernize custom Find modules

    - FindLibSSH2:
        - pass version to FPHSA to show it in the output
        - use LIBSSH2_VERSION define to extract the version number in
          one shot. This variable exists in the header for 10 years.
        - remove unneeded code

    - FindNGHTTP2.cmake:
        - drop needless FPHSA argument
        - mark found variables as advanced

    - FindNSS.cmake:
        - show version number

    - FindCARES.cmake:
        - drop default paths
        - use FPHSA instead of checking things by hand

- remove needless explict variable dereference

- simplify count_true()

- allow all policies up to version 3.16 to be set to NEW

- do not rerun check for -Wstrict-aliasing=3 every time

In contrast to every other compiler flag this has a = in it, which CMake
can't have in a variable name.

- only read the interesting strings from curlver.h

Reviewed-by: Peter Wu
Closes https://github.com/curl/curl/pull/4975

5 years agoruntests: fix output to command log
Jay Satiro [Sat, 29 Feb 2020 08:11:06 +0000 (03:11 -0500)] 
runtests: fix output to command log

- Record only the command of the most recently ran test in the command
  log.

This is a follow-up to 02988b7 from several weeks ago which fixed
writing to the command log, however it saved all commands for all tests
instead of just the most recently ran test as we would now expect.

Fixes https://github.com/curl/curl/commit/02988b7#commitcomment-37546876
Closes https://github.com/curl/curl/pull/5001

5 years agopolarssl: Additional removal
Steve Holme [Sat, 29 Feb 2020 12:52:55 +0000 (12:52 +0000)] 
polarssl: Additional removal

Follow up to 6357a19f.

Reviewed-by: Daniel Stenberg
Closes #5004

5 years agodocs: fix typo on CURLINFO_RETRY_AFTER - alwaus -> always
Jonathan Cardoso Machado [Sat, 29 Feb 2020 21:08:48 +0000 (18:08 -0300)] 
docs: fix typo on CURLINFO_RETRY_AFTER - alwaus -> always

Reviewed-by: Steve Holme
Closes #5005

5 years agomd5: Added implementation for mbedTLS
Steve Holme [Tue, 25 Feb 2020 21:21:17 +0000 (21:21 +0000)] 
md5: Added implementation for mbedTLS

Reviewed-by: Jay Satiro
Closes #4980

5 years agomd5: Use pointer notation for array parameters in GnuTLS implementation
Steve Holme [Tue, 25 Feb 2020 22:40:28 +0000 (22:40 +0000)] 
md5: Use pointer notation for array parameters in GnuTLS implementation

5 years agomd4: Use non-deprecated functions in mbedTLS >= 2.7.0
Steve Holme [Wed, 26 Feb 2020 18:24:31 +0000 (18:24 +0000)] 
md4: Use non-deprecated functions in mbedTLS >= 2.7.0

Closes #4983

5 years agoci/tests: Send test results to Azure DevOps for reporting
Marc Hoersken [Sat, 22 Feb 2020 19:09:29 +0000 (20:09 +0100)] 
ci/tests: Send test results to Azure DevOps for reporting

5 years agopause: force-drain the transfer on unpause
Daniel Stenberg [Fri, 28 Feb 2020 22:55:05 +0000 (23:55 +0100)] 
pause: force-drain the transfer on unpause

... since the socket might not actually be readable anymore when for
example the data is already buffered in the TLS layer.

Fixes #4966
Reported-by: Anders Berg
Closes #5000

5 years agoTODO: curl --proxycommand
Daniel Stenberg [Fri, 28 Feb 2020 23:11:03 +0000 (00:11 +0100)] 
TODO: curl --proxycommand

Suggested-by: Kristian Mide
Closes #4941

5 years agosmtp: overwriting 'from' leaks memory
Daniel Stenberg [Fri, 28 Feb 2020 08:49:02 +0000 (09:49 +0100)] 
smtp: overwriting 'from' leaks memory

Detected by Coverity. CID 1418139.

Also, make sure to return error if the new 'from' allocation fails.

Closes #4997

5 years agoCIfuzz: switch off 'dry_run' mode
Daniel Stenberg [Fri, 28 Feb 2020 09:29:14 +0000 (10:29 +0100)] 
CIfuzz: switch off 'dry_run' mode

Follow-up from #4960: now make it fail if it detects problems.

Closes #4998

5 years agoci/tests: Increase timeouts of Windows builds due to new tests
Marc Hoersken [Fri, 28 Feb 2020 15:34:51 +0000 (16:34 +0100)] 
ci/tests: Increase timeouts of Windows builds due to new tests

Recently added tests increased their runtime above the limit of 60min.

5 years agoci/tests: align Azure Pipeline job names with each other 4866/head
Marc Hoersken [Thu, 27 Feb 2020 17:09:11 +0000 (18:09 +0100)] 
ci/tests: align Azure Pipeline job names with each other

5 years agoci/tests: Add Windows builds via Azure Pipelines using Docker
Marc Hoersken [Sat, 22 Feb 2020 13:20:57 +0000 (14:20 +0100)] 
ci/tests: Add Windows builds via Azure Pipelines using Docker