aboutsummaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2020-05-02libssh2: set the expected total size in SCP upload initDaniel Stenberg
... as otherwise the progress callback gets called without that information, making the progress meter have less info. Reported-by: Murugan Balraj Bug: https://curl.haxx.se/mail/archive-2020-05/0000.html Closes #5317
2020-04-30GnuTLS: Backend support for CURLINFO_SSL_VERIFYRESULTEmil Engler
Closes #5287
2020-04-30conncache: various concept cleanupsDaniel Stenberg
More connection cache accesses are protected by locks. CONNCACHE_* is a beter prefix for the connection cache lock macros. Curl_attach_connnection: now called as soon as there's a connection struct available and before the connection is added to the connection cache. Curl_disconnect: now assumes that the connection is already removed from the connection cache. Ref: #4915 Closes #5009
2020-04-29schannel: source code reindentDaniel Stenberg
White space edits only. Conform better to standard curl source code indenting style. Closes #5305
2020-04-28headers: copyright range fixDaniel Stenberg
2020-04-28doh: Constify some input pointersRikard Falkeborn
Closes #5306
2020-04-27nss: check for PK11_CreateDigestContext() returning NULLDaniel Stenberg
... to avoid crashes! Reported-by: Hao Wu Fixes #5302 Closes #5303
2020-04-26copyright updates: adjust year rangesDaniel Stenberg
2020-04-25smtp: set auth correctlyDaniel Stenberg
Regression since 7.69.0 and 68fb25fa3fcff. The code wrongly assigned 'from' instead of 'auth' which probably was a copy and paste mistake from other code, leading to that auth could remain NULL and later cause an error to be returned. Assisted-by: Eric Sauvageau Fixes #5294 Closes #5295
2020-04-25lib: clean up whitespaceMarcel Raad
This fixes CodeFactor warnings.
2020-04-25libssh: avoid options override by configuration filesAnderson Toshiyuki Sasaki
Previously, options set explicitly through command line options could be overridden by the configuration files parsed automatically when ssh_connect() was called. By calling ssh_options_parse_config() explicitly, the configuration files are parsed before setting the options, avoiding the options override. Once the configuration files are parsed, the automatic configuration parsing is not executed. Fixes #4972 Closes #5283 Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
2020-04-23select: make Curl_socket_check take timediff_t timeoutDaniel Stenberg
Coverity found CID 1461718: Integer handling issues (CONSTANT_EXPRESSION_RESULT) "timeout_ms > 9223372036854775807L" is always false regardless of the values of its operands. This occurs as the logical second operand of "||". Closes #5240
2020-04-22transfer: Switch PUT to GET/HEAD on 303 redirectJay Satiro
Prior to this change if there was a 303 reply to a PUT request then the subsequent request to respond to that redirect would also be a PUT. It was determined that was most likely incorrect based on the language of the RFCs. Basically 303 means "see other" resource, which implies it is most likely not the same resource, therefore we should not try to PUT to that different resource. Refer to the discussions in #5237 and #5248 for more information. Fixes https://github.com/curl/curl/issues/5237 Closes https://github.com/curl/curl/pull/5248
2020-04-22lib/mk-ca-bundle: skip empty certsDaniel Stenberg
Reviewed-by: Emil Engler Reported-by: Ashwin Metpalli Fixes #5278 Closes #5280
2020-04-22version: skip idn2_check_version() check and add precautionDaniel Stenberg
A gcc-10's -fanalyze complaint made me spot and do these improvements. Closes #5281
2020-04-21GnuTLS: Don't skip really long certificate fieldsEmil Engler
Closes #5271
2020-04-21gnutls: bump lowest supported version to 3.1.10Daniel Stenberg
GnuTLS 3.1.10 added new functions we want to use. That version was released on Mar 22, 2013. Removing support for older versions also greatly simplifies the code. Ref: #5271 Closes #5276
2020-04-20mqtt: make NOSTATE get within the debug name arrayDaniel Stenberg
2020-04-20mqtt: remove code with no purposeDaniel Stenberg
Detected by Coverity. CID 1462319. "The same code is executed when the condition result is true or false, because the code in the if-then branch and after the if statement is identical." Closes #5275
2020-04-20mqtt: fix Curl_read() error handling while reading remaining lengthDaniel Stenberg
Detected by Coverity. CID 1462320. Closes #5274
2020-04-20http: free memory when Alt-Used header creation fails due to OOMDaniel Stenberg
Reported-by: James Fuller Fixes #5268 Closes #5269
2020-04-20lib: fix typos in comments and errormessagesDaniel Gustafsson
This fixes a few randomly spotted typos in recently merged code, most notably one in a userfacing errormessage the schannel code.
2020-04-20multi-ssl: reset the SSL backend on `Curl_global_cleanup()`Johannes Schindelin
When cURL is compiled with support for multiple SSL backends, it is possible to configure an SSL backend via `curl_global_sslset()`, but only *before* `curl_global_init()` was called. If another SSL backend should be used after that, a user might be tempted to call `curl_global_cleanup()` to start over. However, we did not foresee that use case and forgot to reset the SSL backend in that cleanup. Let's allow that use case. Fixes #5255 Closes #5257 Reported-by: davidedec on github Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2020-04-20mqtt: improve the state machineDaniel Stenberg
To handle PUBLISH before SUBACK and more. Updated the existing tests and added three new ones. Reported-by: Christoph Krey Bug: https://curl.haxx.se/mail/lib-2020-04/0021.html Closes #5246
2020-04-19mime: properly check Content-Type even if it has parametersPatrick Monnerat
New test 669 checks this fix is effective. Fixes #5256 Closes #5258 Reported-by: thanhchungbtc on github
2020-04-17libssh: Use new ECDSA key types to check known hostsAnderson Toshiyuki Sasaki
From libssh 0.9.0, ssh_key_type() returns different key types for ECDSA keys depending on the curve. Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Fixes #5252 Closes #5253
2020-04-15copyright: bump the copyright year rangeDaniel Stenberg
2020-04-14mqtt: add new experimental protocolBjorn Stenberg
Closes #5173
2020-04-13cmake: add aliases so exported target names are available in treeNathaniel R. Lewis
Reviewed-by: Brad King Closes #5206
2020-04-13version: increase buffer space for ssl version outputDaniel Stenberg
To avoid it getting truncated, especially when several SSL backends are built-in. Reported-by: Gisle Vanem Fixes #5222 Closes #5226
2020-04-12schannel: Fix blocking timeout logicAndrew Kurushin
- Fix schannel_send for the case when no timeout was set. Prior to this change schannel would error if the socket was not ready to send data and no timeout was set. This commit is similar to parent commit 89dc6e0 which recently made the same change for SOCKS, for the same reason. Basically it was not well understood that when Curl_timeleft returns 0 it is not a timeout of 0 ms but actually means no timeout. Fixes https://github.com/curl/curl/issues/5177 Closes https://github.com/curl/curl/pull/5221
2020-04-12socks: Fix blocking timeout logicJay Satiro
- Document in Curl_timeleft's comment block that returning 0 signals no timeout (ie there's infinite time left). - Fix SOCKS' Curl_blockread_all for the case when no timeout was set. Prior to this change if the timeout had a value of 0 and that was passed to SOCKET_READABLE it would return right away instead of blocking. That was likely because it was not well understood that when Curl_timeleft returns 0 it is not a timeout of 0 ms but actually means no timeout. Ref: https://github.com/curl/curl/pull/5214#issuecomment-612512360 Closes https://github.com/curl/curl/pull/5220
2020-04-12gopher: check remaining time left during write busy loopMarc Hoersken
Prior to this change gopher's blocking code would block forever, ignoring any set timeout value. Assisted-by: Jay Satiro Reviewed-by: Daniel Stenberg Similar to #5220 and #5221 Closes #5214
2020-04-13gnutls: ensure TLS 1.3 when SRP isn't requestedDirkjan Bussink
When SRP is requested in the priority string, GnuTLS will disable support for TLS 1.3. Before this change, curl would always add +SRP to the priority list, effectively always disabling TLS 1.3 support. With this change, +SRP is only added to the priority list when SRP authentication is also requested. This also allows updating the error handling here to not have to retry without SRP. This is because SRP is only added when requested and in that case a retry is not needed. Closes #5223
2020-04-11Revert "file: on Windows, refuse paths that start with \\"Daniel Stenberg
This reverts commit 1b71bc532bde8621fd3260843f8197182a467ff2. Reminded-by: Chris Roberts Bug: https://curl.haxx.se/mail/archive-2020-04/0013.html Closes #5215
2020-04-11lib: fix conversion warnings for SOCKET_WRITABLE/READABLEJay Satiro
- If loss of data may occur converting a timediff_t to time_t and the time value is > TIME_T_MAX then treat it as TIME_T_MAX. This is a follow-up to 8843678 which removed the (time_t) typecast from the macros so that conversion warnings could be identified. Closes https://github.com/curl/curl/pull/5199
2020-04-09url: allow non-HTTPS altsvc-matching for debug buildsDaniel Stenberg
This is already partly supported but this part was missing. Reported-by: James Fuller Closes #5205
2020-04-08schannel: support .P12 or .PFX client certificatesGilles Vollant
Used with curl command line option like this: --cert <filename>:<password> --cert-type p12 Closes #5193
2020-04-08http: don't consider upload done if the request isn't completely sent offDaniel Stenberg
Fixes #4919 Closes #5197
2020-04-08http: allow Curl_add_buffer_send() to do a short first send by forceDaniel Stenberg
In a debug build, settting the environment variable "CURL_SMALLREQSEND" will make the first HTTP request send not send more bytes than the set amount, thus ending up verifying that the logic for handling a split HTTP request send works correctly.
2020-04-08connect: store connection info for QUIC connectionsDaniel Stenberg
Restores the --head functionality to the curl utility which extracts 'protocol' that is stored that way. Reported-by: James Fuller Fixes #5196 Closes #5198
2020-04-07select: remove typecast from SOCKET_WRITABLE/READABLE macrosDaniel Stenberg
So that they don't hide conversions-by-mistake Reviewed-by: Jay Satiro Closes #5190
2020-04-06cleanup: correct copyright year range on a few filesDaniel Stenberg
2020-04-06warnless: remove code block for icc that didn't workDaniel Stenberg
Reported-by: Alain Miniussi Fixes #5096
2020-04-06dist: add missing setup-win32.hMarc Hoersken
Follow up to d820224b8b
2020-04-05lib: never define CURL_CA_BUNDLE with a getenvDaniel Stenberg
- it breaks the build (since 6de756c9b1de34b7a1) - it's not documented and not consistent across platforms - the curl tool does that getenv magic Bug: https://github.com/curl/curl/commit/6de756c#r38127030 Reported-by: Gisle Vanem Closes #5187
2020-04-05CURLINFO_CONDITION_UNMET: return true for 304 http status codeKwon-Young Choi
In libcurl, CURLINFO_CONDITION_UNMET is used to avoid writing to the output file if the server did not transfered a file based on time condition. In the same manner, getting a 304 HTTP response back from the server, for example after passing a custom If-Match-* header, also fulfill this condition. Fixes #5181 Closes #5183
2020-04-04windows: enable UnixSockets with all build toolchainsViktor Szakats
Extend existing unix socket support in Windows builds to be enabled for all toolchain vendors or versions. (Previously it was only supported with certain MSVC versions + more recent Windows 10 SDKs) Ref: https://devblogs.microsoft.com/commandline/af_unix-comes-to-windows/ Ref: https://github.com/curl/curl/issues/5162 Closes: https://github.com/curl/curl/pull/5170
2020-03-31vquic/ngtcp2.h: update copyright year rangeDaniel Stenberg
Follow-up to 0736ee73d346a52
2020-03-31vquic: add support for GnuTLS backend of ngtcp2Daiki Ueno
Currently, the TLS backend used by vquic/ngtcp2.c is selected at compile time. Therefore OpenSSL support needs to be explicitly disabled. Signed-off-by: Daiki Ueno <dueno@redhat.com> Closes #5148