]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
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

5 years agotests: fix Python 3 compatibility of smbserver.py
Marc Hoersken [Wed, 29 Jan 2020 16:14:01 +0000 (17:14 +0100)] 
tests: fix Python 3 compatibility of smbserver.py

5 years agoruntests: restore the command log
Daniel Stenberg [Tue, 11 Feb 2020 16:36:23 +0000 (17:36 +0100)] 
runtests: restore the command log

The log file with all command lines for the invoked command lines is now
called logs/commands.log

Fixes #4911
Closes #4989

5 years agosmtp: fix memory leak on exit path
Daniel Stenberg [Thu, 27 Feb 2020 13:37:40 +0000 (14:37 +0100)] 
smtp: fix memory leak on exit path

Detected by Coverity. CID 1418139. "leaked_storage: Variable 'from'
going out of scope leaks the storage it points to"

Closes #4990

5 years agogtls: Fixed compilation when using GnuTLS < 3.5.0
Steve Holme [Thu, 27 Feb 2020 02:01:16 +0000 (02:01 +0000)] 
gtls: Fixed compilation when using GnuTLS < 3.5.0

Reverts the functionality from 41fcb4f when compiling with GnuTLS older
than 3.5.0.

Reviewed-by: Daniel Stenberg
Closes #4984

5 years agoRELEASE-NOTES: Corrected the link to issue #4892
Steve Holme [Thu, 27 Feb 2020 14:24:08 +0000 (14:24 +0000)] 
RELEASE-NOTES: Corrected the link to issue #4892

5 years agoCurl_is_ASCII_name: handle a NULL argument
Daniel Stenberg [Thu, 27 Feb 2020 10:06:14 +0000 (11:06 +0100)] 
Curl_is_ASCII_name: handle a NULL argument

Make the function tolerate a NULL pointer input to avoid dereferencing
that pointer.

Follow-up to efce3ea5a85126d
Detected by OSS-Fuzz
Reviewed-By: Steve Holme
Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=20907
Fixes #4985
Closes #4986

5 years agoRELEASE-NOTES: synced
Daniel Stenberg [Thu, 27 Feb 2020 09:49:27 +0000 (10:49 +0100)] 
RELEASE-NOTES: synced

5 years agohttp2: make pausing/unpausing set/clear local stream window
Daniel Stenberg [Thu, 27 Feb 2020 08:42:11 +0000 (09:42 +0100)] 
http2: make pausing/unpausing set/clear local stream window

This reduces the HTTP/2 window size to 32 MB since libcurl might have to
buffer up to this amount of data in memory and yet we don't want it set
lower to potentially impact tranfer performance on high speed networks.

Requires nghttp2 commit b3f85e2daa629
(https://github.com/nghttp2/nghttp2/pull/1444) to work properly, to end
up in the next release after 1.40.0.

Fixes #4939
Closes #4940

5 years agolibssh: improve known hosts handling
Anderson Toshiyuki Sasaki [Fri, 21 Feb 2020 10:09:26 +0000 (11:09 +0100)] 
libssh: improve known hosts handling

Previously, it was not possible to get a known hosts file entry due to
the lack of an API.  ssh_session_get_known_hosts_entry(), introduced in
libssh-0.9.0, allows libcurl to obtain such information and behave the
same as when compiled with libssh2.

This also tries to avoid the usage of deprecated functions when the
replacements are available.  The behaviour will not change if versions
older than libssh-0.8.0 are used.

Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Fixes #4953
Closes #4962

5 years agotests: Automatically deduce the tool name from the test case for unit tests
Steve Holme [Sun, 23 Feb 2020 08:20:32 +0000 (08:20 +0000)] 
tests: Automatically deduce the tool name from the test case for unit tests

It is still possible to override the executable to run during the test,
using the <tool> tag, but this patch removes the requirement that the
tag must be present for unit tests.

It also removes the possibility of human error when existing test cases
are used as the basis for new tests, as recently witnessed in 81c37124.

Reviewed-by: Daniel Stenberg
Closes #4976

5 years agotest1323: Added the missing 'unit test' feature requirement in the test case
Steve Holme [Sun, 23 Feb 2020 06:38:06 +0000 (06:38 +0000)] 
test1323: Added the missing 'unit test' feature requirement in the test case

5 years agocookie: remove unnecessary check for 'out != 0'
Daniel Stenberg [Wed, 26 Feb 2020 22:50:03 +0000 (23:50 +0100)] 
cookie: remove unnecessary check for 'out != 0'

... as it will always be non-NULL at this point.

Detected by Coverity: CID 1459009

5 years agohttp: added 417 response treatment
Daniel Stenberg [Wed, 26 Feb 2020 21:48:09 +0000 (22:48 +0100)] 
http: added 417 response treatment

When doing a request with a body + Expect: 100-continue and the server
responds with a 417, the same request will be retried immediately
without the Expect: header.

Added test 357 to verify.

Also added a control instruction to tell the sws test server to not read
the request body if Expect: is present, which the new test 357 uses.

Reported-by: bramus on github
Fixes #4949
Closes #4964

5 years agosmtp: Tidy up, following recent changes, to maintain the coding style
Steve Holme [Sun, 9 Feb 2020 02:18:37 +0000 (02:18 +0000)] 
smtp: Tidy up, following recent changes, to maintain the coding style

Closes #4892

5 years agosmtp: Support the SMTPUTF8 extension for the EXPN command
Steve Holme [Sun, 9 Feb 2020 16:41:34 +0000 (16:41 +0000)] 
smtp: Support the SMTPUTF8 extension for the EXPN command

Simply notify the server we support the SMTPUTF8 extension if it does.

5 years agosmtp: Support the SMTPUTF8 extension in the VRFY command
Steve Holme [Thu, 13 Feb 2020 22:56:51 +0000 (22:56 +0000)] 
smtp: Support the SMTPUTF8 extension in the VRFY command

5 years agosmtp: Support the SMTPUTF8 extension in the RCPT TO command
Steve Holme [Thu, 13 Feb 2020 22:39:28 +0000 (22:39 +0000)] 
smtp: Support the SMTPUTF8 extension in the RCPT TO command

Note: The RCPT TO command isn't required to advertise to the server that
it contains UTF-8 characters, instead the server is told that a mail may
contain UTF-8 in any envelope command via the MAIL command.

5 years agosmtp: Support the SMTPUTF8 extension in the MAIL command
Steve Holme [Thu, 13 Feb 2020 20:59:36 +0000 (20:59 +0000)] 
smtp: Support the SMTPUTF8 extension in the MAIL command

Support the SMTPUTF8 extension when sending mailbox information in the
MAIL command (FROM and AUTH parameters). Non-ASCII domain names will
be ACE encoded, if IDN is supported, whilst non-ASCII characters in
the local address part are passed to the server.

Reported-by: ygthien on github
Fixes #4828

5 years agosmtp: Detect server support for the UTF-8 extension as defined in RFC-6531
Steve Holme [Fri, 7 Feb 2020 19:57:15 +0000 (19:57 +0000)] 
smtp: Detect server support for the UTF-8 extension as defined in RFC-6531

5 years agosmtp: Support UTF-8 based host names in the VRFY command
Steve Holme [Sat, 8 Feb 2020 00:37:03 +0000 (00:37 +0000)] 
smtp: Support UTF-8 based host names in the VRFY command

5 years agosmtp: Support UTF-8 based host names in the RCPT TO command
Steve Holme [Sat, 8 Feb 2020 00:14:57 +0000 (00:14 +0000)] 
smtp: Support UTF-8 based host names in the RCPT TO command

5 years agosmtp: Support UTF-8 based host names in the MAIL command
Steve Holme [Fri, 7 Feb 2020 15:53:25 +0000 (15:53 +0000)] 
smtp: Support UTF-8 based host names in the MAIL command

Non-ASCII host names will be ACE encoded if IDN is supported.

5 years agourl: Make the IDN conversion functions available to others
Steve Holme [Fri, 7 Feb 2020 15:09:41 +0000 (15:09 +0000)] 
url: Make the IDN conversion functions available to others

5 years agosmtp: Added UTF-8 mailbox tests to verify existing behaviour
Steve Holme [Mon, 10 Feb 2020 20:48:46 +0000 (20:48 +0000)] 
smtp: Added UTF-8 mailbox tests to verify existing behaviour

5 years agoftpserver: Updated VRFY_smtp() so the response isn't necessary in the test case
Steve Holme [Mon, 10 Feb 2020 20:49:45 +0000 (20:49 +0000)] 
ftpserver: Updated VRFY_smtp() so the response isn't necessary in the test case

5 years agoftpserver: Corrected the e-mail address regex in MAIL_smtp() and RCTP_smtp()
Steve Holme [Mon, 10 Feb 2020 20:50:50 +0000 (20:50 +0000)] 
ftpserver: Corrected the e-mail address regex in MAIL_smtp() and RCTP_smtp()

The dot character between the host and the tld was not being escaped,
which meant it specified a match of 'any' character rather than an
explicit dot separator.

Additionally removed the dot character from the host name as it allowed
the following to be specified as a valid address in our test cases:

<bad@example......com>

Both are typos from 98f7ca7 and 8880f84 :(

I can't remember whether my intention was to allow sub-domains to be
specified in the host or not with these additional dots, but by placing
it outside of the host means it can only be specified once per domain
and by placing a + after the new grouping support for sub-domains is
kept.

Closes #4912

5 years agohmac: Added a unit test for the HMAC hash generation
Steve Holme [Sun, 23 Feb 2020 22:54:26 +0000 (22:54 +0000)] 
hmac: Added a unit test for the HMAC hash generation

Closes #4973

5 years agontlm: Moved the HMAC MD5 function into the HMAC module as a generic function
Steve Holme [Sun, 23 Feb 2020 22:37:43 +0000 (22:37 +0000)] 
ntlm: Moved the HMAC MD5 function into the HMAC module as a generic function

5 years agotests: Added a unit test for MD4 digest generation
Steve Holme [Sun, 23 Feb 2020 04:21:49 +0000 (04:21 +0000)] 
tests: Added a unit test for MD4 digest generation

Closes #4970

5 years agomd4: Use const for the length input parameter
Steve Holme [Sun, 23 Feb 2020 18:46:24 +0000 (18:46 +0000)] 
md4: Use const for the length input parameter

This keeps the interface the same as md5 and sha256.

5 years agotest1610: Fixed the link to the unit test
Steve Holme [Sun, 23 Feb 2020 04:29:20 +0000 (04:29 +0000)] 
test1610: Fixed the link to the unit test

Typo from 81c37124.

5 years agontlm: Removed the dependency on the TLS libaries when using MD5
Steve Holme [Sat, 22 Feb 2020 14:31:26 +0000 (14:31 +0000)] 
ntlm: Removed the dependency on the TLS libaries when using MD5

As we have our own MD5 implementation use the MD5 wrapper to remove the
TLS dependency.

Closes #4967

5 years agomd5/sha256: Updated the functions to allow non-string data to be hashed
Steve Holme [Sat, 22 Feb 2020 05:37:01 +0000 (05:37 +0000)] 
md5/sha256: Updated the functions to allow non-string data to be hashed

5 years agodigest: Corrected the name of the local HTTP digest function
Steve Holme [Sat, 22 Feb 2020 04:59:46 +0000 (04:59 +0000)] 
digest: Corrected the name of the local HTTP digest function

Follow up to 2b5b37cb. Local static functions do not require the Curl
prefix.

5 years agotests: Added a unit test for SHA256 digest generation
Steve Holme [Sat, 22 Feb 2020 18:17:12 +0000 (18:17 +0000)] 
tests: Added a unit test for SHA256 digest generation

Follow up to 2b5b37c.

Closes #4968

5 years agomd4: Fixed compilation issues when using GNU TLS gcrypt
Steve Holme [Thu, 20 Feb 2020 18:55:55 +0000 (18:55 +0000)] 
md4: Fixed compilation issues when using GNU TLS gcrypt

* Don't include 'struct' in the gcrypt MD4_CTX typedef
* The call to gcry_md_read() should use a dereferenced ctx
* The call to gcry_md_close() should use a dereferenced ctx

Additional minor whitespace issue in the USE_WIN32_CRYPTO code.

Closes #4959

5 years agoRELEASE-NOTES: synced
Daniel Stenberg [Fri, 21 Feb 2020 16:07:34 +0000 (17:07 +0100)] 
RELEASE-NOTES: synced

5 years agohttp2: now require nghttp2 >= 1.12.0
Daniel Stenberg [Fri, 21 Feb 2020 10:30:05 +0000 (11:30 +0100)] 
http2: now require nghttp2 >= 1.12.0

To simplify our code and since earlier versions lack important function
calls libcurl needs to function correctly.

nghttp2 1.12.0 was relased on June 26, 2016.

Closes #4961

5 years agogtls: fix the copyright year
Daniel Stenberg [Fri, 21 Feb 2020 14:43:45 +0000 (15:43 +0100)] 
gtls: fix the copyright year

Follow-up from 41fcb4f609

5 years agoGnuTLS: Always send client cert
jethrogb [Thu, 20 Feb 2020 19:36:25 +0000 (20:36 +0100)] 
GnuTLS: Always send client cert

TLS servers may request a certificate from the client. This request
includes a list of 0 or more acceptable issuer DNs. The client may use
this list to determine which certificate to send. GnuTLS's default
behavior is to not send a client certificate if there is no
match. However, OpenSSL's default behavior is to send the configured
certificate. The `GNUTLS_FORCE_CLIENT_CERT` flag mimics OpenSSL
behavior.

Authored-by: jethrogb on github
Fixes #1411
Closes #4958

5 years agogithub action: add CIFuzz
Leo Neat [Fri, 21 Feb 2020 00:17:50 +0000 (16:17 -0800)] 
github action: add CIFuzz

Closes #4960

5 years agocleanup: comment typos
Daniel Stenberg [Thu, 20 Feb 2020 14:18:38 +0000 (15:18 +0100)] 
cleanup: comment typos

Spotted by 'codespell'

Closes #4957

5 years agowin32: USE_WIN32_CRYPTO to enable Win32 based MD4, MD5 and SHA256 functions
Steve Holme [Wed, 19 Feb 2020 07:46:22 +0000 (07:46 +0000)] 
win32: USE_WIN32_CRYPTO to enable Win32 based MD4, MD5 and SHA256 functions

Whilst lib\md4.c used this pre-processor, lib\md5.c and
src\tool_metalink.c did not and simply relied on the WIN32
pre-processor directive.

Reviewed-by: Marcel Raad
Closes #4955

5 years agoconnect: remove some spurious infof() calls
Daniel Stenberg [Wed, 19 Feb 2020 09:30:23 +0000 (10:30 +0100)] 
connect: remove some spurious infof() calls

As they were added primarily for debugging, they provide little use for
users.

Closes #4951

5 years agoHTTP-COOKIES: mention that a trailing newline is required
Daniel Stenberg [Tue, 18 Feb 2020 13:23:04 +0000 (14:23 +0100)] 
HTTP-COOKIES: mention that a trailing newline is required

... so that we know we got the whole and not a partial line.

Also, changed the formatting of the fields away from a table again since
the table format requires a github-markdown tool version that we don't
run on the web server atm.

Reported-by: Sunny Bean
Fixes #4946
Closes #4947

5 years agonit: Copyright year out of date
Daniel Stenberg [Wed, 19 Feb 2020 06:53:54 +0000 (07:53 +0100)] 
nit: Copyright year out of date

Follow-up to 1fc0617dcc

5 years agotool_util: Improve Windows version of tvnow()
Jay Satiro [Fri, 24 Jan 2020 08:34:52 +0000 (03:34 -0500)] 
tool_util: Improve Windows version of tvnow()

- Change tool_util.c tvnow() for Windows to match more closely to
  timeval.c Curl_now().

- Create a win32 init function for the tool, since some initialization
  is required for the tvnow() changes.

Prior to this change the monotonic time function used by curl in Windows
was determined at build-time and not runtime. That was a problem because
when curl was built targeted for compatibility with old versions of
Windows (eg _WIN32_WINNT < 0x0600) it would use GetTickCount which wraps
every 49.7 days that Windows has been running.

This change makes curl behave similar to libcurl's tvnow function, which
determines at runtime whether the OS is Vista+ and if so calls
QueryPerformanceCounter instead. (Note QueryPerformanceCounter is used
because it has higher resolution than the more obvious candidate
GetTickCount64). The changes to tvnow are basically a copy and paste but
the types in some cases are different.

Ref: https://github.com/curl/curl/issues/3309

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

5 years agoSOCKS: fix typo in printf formatting
Daniel Stenberg [Tue, 18 Feb 2020 11:54:02 +0000 (12:54 +0100)] 
SOCKS: fix typo in printf formatting

Follow-up to 4a4b63daa

Reported-by: Peter Piekarski
Bug: https://github.com/curl/curl/commit/4a4b63daaa01ef59b131d91e8e6e6dfe275c0f08#r37351330