Commit Graph

25355 Commits

Author SHA1 Message Date
Marc Hoersken e7c144f1d1
ci/tests: fix escaping of testnames and disable proxy for CI APIs
Follow up to ada581f and c0d8b96
Closes #5031
2020-03-03 22:13:57 +01:00
Jay Satiro e4b4ccbc67 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
2020-03-03 15:17:07 -05:00
Marc Hoersken 119ea453f9
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
2020-03-03 17:32:38 +01:00
Marc Hoersken 86ceb9b006
README.md: add Azure DevOps Pipelines build status badge 2020-03-03 17:11:26 +01:00
Marc Hoersken 3feb60d289
ci/tests: Move CI test result creation above environment setup
This avoids using our test servers as proxy to the AppVeyor API.

Closes #5022
2020-03-03 16:00:04 +01:00
Marc Hoersken c0d8b96f24
ci/tests: Send test results to AppVeyor for status overview
Closes #5021
2020-03-03 15:59:59 +01:00
Daniel Stenberg b572e0be59
Revert "sha256: Added SecureTransport implementation"
This reverts commit 4feb38deed (from #4956)

That commit broke test 1610 on macos builds without TLS.

Closes #5027
2020-03-03 09:36:40 +01:00
Daniel Stenberg c537b00577
dist: include tests/azure.pm in the tarball
Bug: ada581f2cc (commitcomment-37601589)
Reported-by: Marcel Raad
2020-03-03 08:42:38 +01:00
Steve Holme 18901c7bb7
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
2020-03-03 00:37:24 +00:00
Steve Holme e6322feb3a
sha256: Tidy up following recent changes
Reviewed-by: Daniel Stenberg
Closes #4956
2020-03-03 00:37:23 +00:00
Steve Holme f22a5c35e0
sha256: Added WinCrypt implementation 2020-03-03 00:37:23 +00:00
Steve Holme 4feb38deed
sha256: Added SecureTransport implementation 2020-03-03 00:37:22 +00:00
Steve Holme 425ceb0150
sha256: Added mbedtls implementation 2020-03-03 00:37:22 +00:00
Steve Holme 8fbd937248
sha256: Added GNU TLS gcrypt implementation 2020-03-03 00:37:21 +00:00
Steve Holme 365f4ea53d
sha256: Added GNU TLS Nettle implementation 2020-03-03 00:37:17 +00:00
Jay Satiro 256a29361f curl_escape.3: Add a link to curl_free
Ref: https://github.com/curl/curl/pull/5016#issuecomment-593628582
2020-03-02 18:16:24 -05:00
Jay Satiro 1722eb83b4 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
2020-03-02 18:16:23 -05:00
Nick Zitzmann 0b337ecc91
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
2020-03-02 23:02:35 +01:00
Marc Hoersken 0e539970e4
ci/tests: some MacOS builds randomly take longer than 20min 2020-03-02 19:44:19 +01:00
Daniel Stenberg cf7760ab52
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
2020-03-02 15:45:05 +01:00
Daniel Stenberg 0caae3c4be
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
2020-03-02 15:43:04 +01:00
Daniel Stenberg 5494afac8f
tests: disable 962, 963 and 964 on Windows
These tests are also doing UTF-8 SMTP.

Follow-up to df207d2dd9
2020-03-02 14:44:46 +01:00
Marc Hoersken 8ef1f55ad8 ci/tests: fine-tune Azure Pipeline timeouts with a small puffer 2020-03-02 13:56:36 +01:00
Daniel Stenberg 967bf4633a
configure: bump the AC_COPYRIGHT year range 2020-03-02 09:44:03 +01:00
Steve Holme df207d2dd9
tests: disable SMTP UTF-8 tests on Windows
Fixes #4988
Closes #4992
2020-03-02 08:29:11 +01:00
Daniel Stenberg 0b3e3644e0
formdata/mime: copyright year range update
Due to the merge/revert cycle
2020-03-02 08:11:35 +01:00
Daniel Stenberg 8cd4e6d81f
Revert "mime: latch last read callback status."
This reverts commit 87869e38d7.

Fixes #5014
Closes #5015
Reopens #4833
2020-03-02 08:07:49 +01:00
Daniel Stenberg d7242f4757
Revert "mime: do not perform more than one read in a row"
This reverts commit ed0f357f7d.
2020-03-02 07:42:54 +01:00
Daniel Stenberg e002f6c0cb
Revert "mime: fix the binary encoder to handle large data properly"
This reverts commit b2caaa0681.
2020-03-02 07:42:48 +01:00
Daniel Stenberg ff3b1f4860
altsvc: both h3 backends now speak h3-27
... also updated the HTTP3 build description for ngtcp2 accordingly.
2020-03-02 00:07:37 +01:00
Patrick Monnerat b2caaa0681
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
2020-03-02 00:00:59 +01:00
Patrick Monnerat ed0f357f7d
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
2020-03-02 00:00:58 +01:00
Patrick Monnerat 87869e38d7
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
2020-03-02 00:00:50 +01:00
Steve Holme cf1466bd47
unit1651: Fixed conversion compilation warning
371:17: warning: conversion to 'unsigned char' from 'int' may alter its
        value [-Wconversion]

Closes #5008
2020-03-01 15:10:28 +00:00
Steve Holme cdcc9df182
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
2020-03-01 15:10:25 +00:00
Marc Hoersken c770609238 ci/tests: Update Azure DevOps pipeline job display names
Make the configure step more descriptive and align others.
2020-03-01 14:59:03 +01:00
Marc Hoersken d753cfc16c ci/tests: Fix typo in previous commit 597cf2 2020-03-01 14:49:35 +01:00
Marc Hoersken 597cf2f1f3 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.
2020-03-01 14:43:58 +01:00
Daniel Stenberg d6e3273bb0
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
2020-03-01 11:06:28 +01:00
Rolf Eike Beer fc9312f717 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
2020-02-29 23:14:16 -05:00
Jay Satiro 711f022c05 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
2020-02-29 22:34:05 -05:00
Steve Holme a2ad278756
polarssl: Additional removal
Follow up to 6357a19f.

Reviewed-by: Daniel Stenberg
Closes #5004
2020-03-01 00:28:46 +00:00
Jonathan Cardoso Machado 5b46790f11
docs: fix typo on CURLINFO_RETRY_AFTER - alwaus -> always
Reviewed-by: Steve Holme
Closes #5005
2020-02-29 21:14:26 +00:00
Steve Holme 1d421de9a1
md5: Added implementation for mbedTLS
Reviewed-by: Jay Satiro
Closes #4980
2020-02-29 20:53:04 +00:00
Steve Holme 5aea558dc8
md5: Use pointer notation for array parameters in GnuTLS implementation 2020-02-29 20:53:04 +00:00
Steve Holme f0ec0e902a
md4: Use non-deprecated functions in mbedTLS >= 2.7.0
Closes #4983
2020-02-29 20:53:03 +00:00
Marc Hoersken ada581f2cc
ci/tests: Send test results to Azure DevOps for reporting 2020-02-29 21:01:28 +01:00
Daniel Stenberg fa0216b294
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
2020-02-29 10:53:09 +01:00
Daniel Stenberg 0e06c1637b
TODO: curl --proxycommand
Suggested-by: Kristian Mide
Closes #4941
2020-02-29 00:11:03 +01:00
Daniel Stenberg aeb292301a
smtp: overwriting 'from' leaks memory
Detected by Coverity. CID 1418139.

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

Closes #4997
2020-02-28 16:52:33 +01:00