aboutsummaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2020-03-06multi: skip EINTR check on wakeup socket if it was closedJay Satiro
- 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
2020-03-06transfer: set correct copyright year rangeDaniel Stenberg
2020-03-06urldata: remove the 'stream_was_rewound' connectdata struct memberDaniel Stenberg
... as it is never set anywhere. Follow-up to 2f44e94ef Closes #5046
2020-03-05Revert "pause: force-drain the transfer on unpause"Daniel Stenberg
This reverts commit fa0216b294af4c7113a9040ca65eefc7fc18ac1c (from #5000) Clearly that didn't solve the problem correctly. Reported-by: Christopher Reid Reopens #4966 Fixes #5044
2020-03-05polarssl: remove more references and mentionsDaniel Stenberg
Assisted-by: Jay Satiro Follow-up to 6357a19ff29dac04 Closes #5036
2020-03-03Revert "sha256: Added SecureTransport implementation"Daniel Stenberg
This reverts commit 4feb38deed33fed14ff7c370a6a9153c661dbb9c (from #4956) That commit broke test 1610 on macos builds without TLS. Closes #5027
2020-03-03sha256: Tidy up following recent changesSteve Holme
Reviewed-by: Daniel Stenberg Closes #4956
2020-03-03sha256: Added WinCrypt implementationSteve Holme
2020-03-03sha256: Added SecureTransport implementationSteve Holme
2020-03-03sha256: Added mbedtls implementationSteve Holme
2020-03-03sha256: Added GNU TLS gcrypt implementationSteve Holme
2020-03-03sha256: Added GNU TLS Nettle implementationSteve Holme
2020-03-02md4: use init/update/final functions in Secure TransportNick Zitzmann
We can use CC_MD4_Init/Update/Final without having to allocate memory directly. Closes #4979
2020-03-02multi_wait: stop loop when sread() returns zeroDaniel Stenberg
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-02http: mark POSTs with no body as "upload done" from the startDaniel Stenberg
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-02formdata/mime: copyright year range updateDaniel Stenberg
Due to the merge/revert cycle
2020-03-02Revert "mime: latch last read callback status."Daniel Stenberg
This reverts commit 87869e38d7afdec3ef1bb4965711458b088e254f. Fixes #5014 Closes #5015 Reopens #4833
2020-03-02Revert "mime: do not perform more than one read in a row"Daniel Stenberg
This reverts commit ed0f357f7d25566110d4302f33759f4ffb5a6f83.
2020-03-02Revert "mime: fix the binary encoder to handle large data properly"Daniel Stenberg
This reverts commit b2caaa0681f329eed317ffb6ae6927f4a539f0c1.
2020-03-02altsvc: both h3 backends now speak h3-27Daniel Stenberg
... also updated the HTTP3 build description for ngtcp2 accordingly.
2020-03-02mime: fix the binary encoder to handle large data properlyPatrick Monnerat
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-02mime: do not perform more than one read in a rowPatrick Monnerat
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-02mime: latch last read callback status.Patrick Monnerat
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-01build: remove all HAVE_OPENSSL_ENGINE_H definesDaniel Stenberg
... as there's nothing in the code that actually uses the define! The last reference was removed in 38203f158. Closes #5007
2020-03-01polarssl: Additional removalSteve Holme
Follow up to 6357a19f. Reviewed-by: Daniel Stenberg Closes #5004
2020-02-29md5: Added implementation for mbedTLSSteve Holme
Reviewed-by: Jay Satiro Closes #4980
2020-02-29md5: Use pointer notation for array parameters in GnuTLS implementationSteve Holme
2020-02-29md4: Use non-deprecated functions in mbedTLS >= 2.7.0Steve Holme
Closes #4983
2020-02-29pause: force-drain the transfer on unpauseDaniel Stenberg
... 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-28smtp: overwriting 'from' leaks memoryDaniel Stenberg
Detected by Coverity. CID 1418139. Also, make sure to return error if the new 'from' allocation fails. Closes #4997
2020-02-27smtp: fix memory leak on exit pathDaniel Stenberg
Detected by Coverity. CID 1418139. "leaked_storage: Variable 'from' going out of scope leaks the storage it points to" Closes #4990
2020-02-27gtls: Fixed compilation when using GnuTLS < 3.5.0Steve Holme
Reverts the functionality from 41fcb4f when compiling with GnuTLS older than 3.5.0. Reviewed-by: Daniel Stenberg Closes #4984
2020-02-27Curl_is_ASCII_name: handle a NULL argumentDaniel Stenberg
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
2020-02-27http2: make pausing/unpausing set/clear local stream windowDaniel Stenberg
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
2020-02-27libssh: improve known hosts handlingAnderson Toshiyuki Sasaki
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
2020-02-26cookie: remove unnecessary check for 'out != 0'Daniel Stenberg
... as it will always be non-NULL at this point. Detected by Coverity: CID 1459009
2020-02-26http: added 417 response treatmentDaniel Stenberg
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
2020-02-26smtp: Tidy up, following recent changes, to maintain the coding styleSteve Holme
Closes #4892
2020-02-26smtp: Support the SMTPUTF8 extension for the EXPN commandSteve Holme
Simply notify the server we support the SMTPUTF8 extension if it does.
2020-02-26smtp: Support the SMTPUTF8 extension in the VRFY commandSteve Holme
2020-02-26smtp: Support the SMTPUTF8 extension in the RCPT TO commandSteve Holme
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.
2020-02-26smtp: Support the SMTPUTF8 extension in the MAIL commandSteve Holme
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
2020-02-26smtp: Detect server support for the UTF-8 extension as defined in RFC-6531Steve Holme
2020-02-26smtp: Support UTF-8 based host names in the VRFY commandSteve Holme
2020-02-26smtp: Support UTF-8 based host names in the RCPT TO commandSteve Holme
2020-02-26smtp: Support UTF-8 based host names in the MAIL commandSteve Holme
Non-ASCII host names will be ACE encoded if IDN is supported.
2020-02-26url: Make the IDN conversion functions available to othersSteve Holme
2020-02-24ntlm: Moved the HMAC MD5 function into the HMAC module as a generic functionSteve Holme
2020-02-23md4: Use const for the length input parameterSteve Holme
This keeps the interface the same as md5 and sha256.
2020-02-23ntlm: Removed the dependency on the TLS libaries when using MD5Steve Holme
As we have our own MD5 implementation use the MD5 wrapper to remove the TLS dependency. Closes #4967