summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* OS400: fix typoJay Satiro2021-04-221-1/+1
| | | | CURLVERSION_HEIGHTH -> CURLVERSION_EIGHTH
* checksrc: complain on == NULL or != 0 checks in conditionsbagder/checksrc-conditionsDaniel Stenberg2021-04-222-4/+36
| | | | | | | | ... to make them all consistenly use if(!var) and if(var) Also added a few missing warnings to the documentation. Closes #6912
* tidy-up: make conditional checks more consistentDaniel Stenberg2021-04-2285-283/+282
| | | | | | ... remove '== NULL' and '!= 0' Closes #6912
* vauth: factor base64 conversions out of authentication proceduresPatrick Monnerat2021-04-2213-713/+439
| | | | | | | | Input challenges and returned messages are now in binary. Conversions from/to base64 are performed by callers (currently curl_sasl.c and http_ntlm.c). Closes #6654
* bufref: buffer reference supportPatrick Monnerat2021-04-229-3/+398
| | | | | | | | | | | A struct bufref holds a buffer pointer, a data size and a destructor. When freed or its contents are changed, the previous buffer is implicitly released by the associated destructor. The data size, although not used internally, allows binary data support. A unit test checks its handling methods: test 1661 Closes #6654
* os400: additional support for options metadataPatrick Monnerat2021-04-224-68/+321
| | | | | | | | | | | | | | New functions curl_easy_option_by_name_ccsid() and curl_easy_option_get_name_ccsid() allows accessing metadata in alternate character encoding. This commit also updates curl_version_info_ccsid() to handle info version 9 and adds recent definitions to the ILE/RPG include file. Documentation updated accordingly. Reviewed-by: Jon Rumsey Closes #6574
* test server: take care of siginterrupt() deprecationPatrick Monnerat2021-04-221-24/+42
| | | | Closes #6529
* lib1564.c: enable last wakeup test part on WindowsMarc Hoersken2021-04-211-10/+1
| | | | | | | | Suggested-by: Gergely Nagy Reviewed-by: Jay Satiro Reviewed-by: Marcel Raad Closes #6245
* multi: fix slow write/upload performance on WindowsMarc Hoersken2021-04-211-6/+13
| | | | | | | | | | | | | | | | | | Reset FD_WRITE by sending zero bytes which is permissible and will be treated by implementations as successful send. Without this we won't be notified in case a socket is still writable if we already received such a notification and did not send any data afterwards on the socket. This would lead to waiting forever on a writable socket being writable again. Assisted-by: Tommy Odom Reviewed-by: Jay Satiro Reviewed-by: Marcel Raad Tested-by: tmkk on github Bug: #6146 Closes #6245
* multi: reduce Win32 API calls to improve performanceMarc Hoersken2021-04-211-75/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | 1. Consolidate pre-checks into a single Curl_poll call: This is an attempt to restructure the code in Curl_multi_wait in such a way that less syscalls are made by removing individual calls to Curl_socket_check via SOCKET_READABLE/SOCKET_WRITABLE. 2. Avoid resetting the WinSock event multiple times: We finally call WSAResetEvent anyway, so specifying it as an optional parameter to WSAEnumNetworkEvents is redundant. 3. Wakeup directly in case no sockets are being monitoring: Fix the WinSock based implementation to skip extra waiting by not sleeping in case no sockets are to be waited on and just the WinSock event is being monitored for wakeup functionality. Assisted-by: Tommy Odom Reviewed-by: Jay Satiro Reviewed-by: Marcel Raad Bug: #6146 Closes #6245
* Revert "Revert 'multi: implement wait using winsock events'"Marc Hoersken2021-04-212-3/+153
| | | | | | | | | | | | | | This reverts commit 2260e0ebe6d45529495231b3e37a0c58fb92a6a2, also restoring previous follow up changes which were reverted. Authored-by: rcombs on github Authored-by: Marc Hörsken Reviewed-by: Jay Satiro Reviewed-by: Marcel Raad Restores #5634 Reverts #6281 Part of #6245
* Revert "cmake: make libcurl library output name configurable"Daniel Stenberg2021-04-214-4/+4
| | | | | | | | | This reverts commit 1cba36d2166c396f987eea587cf92671b27acb92. CMake provides properties that can be set on a target to rename the output artifact without changing the name of a target. Ref: #6899
* sectransp: allow cipher name to be specifiedMichael Kolechkin2021-04-211-693/+852
| | | | | | | | | | | | | Add parser for CURLOPT_SSL_CIPHER_LIST option for Secure Transport (ST) back-end. Similar to NSS and GSKit back-ends, new code parses string value and configures ST library to use those ciphers for communication. Create cipher spec data structure and initialize the array of specs with cipher number, name, alias, and 'weak' flag. Mark triple-DES ciphers as 'weak', and exclude them from the default ciphers list. Closes #6464
* NSS: add ciphers to mapMichael Kolechkin2021-04-211-0/+25
| | | | | | | | Add cipher names to the `cipherlist` map, based on the list of ciphers implemented by the NSS in the source code file https://github.com/nss-dev/nss/blob/master/lib/ssl/sslenum.c Closes #6670
* http2: remove DEBUG_HTTP2Daniel Stenberg2021-04-211-1/+0
| | | | Accidentally committed in 605e84235
* cmake: make libcurl library output name configurableRalph Langendam2021-04-214-4/+4
| | | | Closes #6899
* sws: #ifdef S_IFSOCK useDaniel Stenberg2021-04-211-0/+2
| | | | | | | | SCO OpenServer 5.0.7 does not define S_IFSOCK. Reported-by: Kevin R. Bulgrien Bug: https://curl.se/mail/lib-2021-04/0074.html Closes #6926
* curl_setup: provide the shutdown flags widerDaniel Stenberg2021-04-211-5/+11
| | | | | | | | | | By using #ifdef on the symbol names to work on anything that don't provide them. SCO OpenServer 5.0.7, sys/socket.h does not define either SHUT_RDWR, SHUT_RD, and SHUT_WR. Reported-by: Kevin R. Bulgrien Bug: https://curl.se/mail/lib-2021-04/0073.html Closes #6925
* connect: use CURL_SA_FAMILY_T for portabilityDaniel Stenberg2021-04-211-1/+1
| | | | | | | Reported-by: Kevin R. Bulgrien Bug: https://curl.se/mail/lib-2021-04/0071.html Closes #6918
* urlapi: make sure no +/- signs are accepted in IPv4 numericalsDaniel Stenberg2021-04-212-1/+8
| | | | | | | | Follow-up to 56a037cc0ad1b2. Extends test 1560 to verify. Reported-by: Tuomas Siipola Fixes #6916 Closes #6917
* ConnectionExists: respect requests for h1 connections betterDaniel Stenberg2021-04-211-0/+7
| | | | | | | ... for situations when multiplexing isn't enabled on the h2 connection and h1 is explicitly requested for the transfer. Assisted-by: Gergely Nagy
* multi: don't close connection HTTP_1_1_REQUIREDDaniel Stenberg2021-04-211-1/+1
| | | | | | The ConnectionExists() function will note that the new transfer wants less then h2 and that it can't multiplex it and therefor opt to open a new connection instead.
* http2: move the stream error field to the per-transfer storageDaniel Stenberg2021-04-214-17/+17
| | | | | | | | Storing a stream error in the per-connection struct was an error that lead to race conditions as subsequent stream handling could overwrite the error code before it was used for the stream with the actual problem. Closes #6910
* http2: call the handle-closed function correctly on closed streamDaniel Stenberg2021-04-211-0/+4
| | | | | | | | | This was this one condition where the stream could be closed due to an error and the function would still wrongly just return 0 for it. Reported-by: Gergely Nagy Fixes #6862 Closes #6910
* test1660: check the created HSTS file as text modeDaniel Stenberg2021-04-211-1/+1
| | | | Closes #6922
* RELEASE-NOTES: syncedDaniel Stenberg2021-04-201-3/+30
|
* test 493: require https in curl to runDaniel Stenberg2021-04-201-0/+1
| | | | Closes #6927
* tool_operate: don't discard failed parallel transfer resultJay Satiro2021-04-201-6/+11
| | | | | | | | | | | | | | | | | | | | | | | - Save a parallel transfer's result code only when it fails and the transfer is not being retried. Prior to this change the result code was always set which meant that a failed result could be erroneously discarded if a different transfer later had a successful result (CURLE_OK). Before: > curl --fail -Z https://httpbin.org/status/404 https://httpbin.org/delay/10 > echo %ERRORLEVEL% 0 After: > curl --fail -Z https://httpbin.org/status/404 https://httpbin.org/delay/10 > echo %ERRORLEVEL% 22 Closes #xxxx
* openssl: fix build error with OpenSSL < 1.0.2Georeth Zhou2021-04-201-2/+2
| | | | Closes https://github.com/curl/curl/pull/6920
* README.md: delete Codacy UTM parameters & follow permanent redirect [ci skip]Viktor Szakats2021-04-191-1/+1
| | | | | | | | | | | UTM parameters leak referrer and various marketing/tracking information even if these would normally be stripped by website or client policy. This link also works fine without them. Also took the opportunity to update the URL to the one pointed to by the previous one via permanent redirect. Reviewed-by: Daniel Stenberg Closes #6919
* urlapi: "normalize" numerical IPv4 host namesDaniel Stenberg2021-04-192-3/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the host name in a URL is given as an IPv4 numerical address, the address can be specified with dotted numericals in four different ways: a32, a.b24, a.b.c16 or a.b.c.d and each part can be specified in decimal, octal (0-prefixed) or hexadecimal (0x-prefixed). Instead of passing on the name as-is and leaving the handling to the underlying name functions, which made them not work with c-ares but work with getaddrinfo, this change now makes the curl URL API itself detect and "normalize" host names specified as IPv4 numericals. The WHATWG URL Spec says this is an okay way to specify a host name in a URL. RFC 3896 does not allow them, but curl didn't prevent them before and it seems other RFC 3896-using tools have not either. Host names used like this are widely supported by other tools as well due to the handling being done by getaddrinfo and friends. I decided to add the functionality into the URL API itself so that all users of these functions get the benefits, when for example wanting to compare two URLs. Also, it makes curl built to use c-ares now support them as well and make curl builds more consistent. The normalization makes HTTPS and virtual hosted HTTP work fine even when curl gets the address specified using one of the "obscure" formats. Test 1560 is extended to verify. Fixes #6863 Closes #6871
* libssh: fix "empty expression statement has no effect" warningsDaniel Stenberg2021-04-191-39/+63
| | | | | | | | | | ... by fixing macros to do-while constructs and moving out the calls to "break" outside of the actual macro. It also fixes the problem where the macro was used witin a loop and the break didn't do right. Reported-by: Emil Engler Fixes #6847 Closes #6909
* hsts: enable by defaultDaniel Stenberg2021-04-1915-40/+65
| | | | | | No longer considered experimental. Closes #6700
* vtls: refuse setting any SSL versionDaniel Stenberg2021-04-198-147/+25
| | | | | | | | | ... previously they were supported if a TLS library would (unexpectedly) still support them, but from this change they will be refused already in curl_easy_setopt(). SSLv2 and SSLv3 have been known to be insecure for many years now. Closes #6773
* curl: ignore options asking for SSLv2 or SSLv3Daniel Stenberg2021-04-193-8/+7
| | | | | | | | | | | | | Instead output a warning about it and continue with the defaults. These SSL versions are typically not supported by the TLS libraries since a long time back already since they are inherently insecure and broken. Asking for them to be used will just cause an error to be returned slightly later. In the unlikely event that a user's TLS library actually still supports these protocol versions, this change might make the request a little less insecure. Closes #6772
* test972: verify the json output with jsonlintbagder/test-jsonDaniel Stenberg2021-04-174-1/+68
| | | | | | | Make sure one of the azure jobs has jsonlint installed so that the test runs there. Ref: #6905
* tool_writeout: fix the HTTP_CODE json outputJay Satiro2021-04-172-7/+8
| | | | | | | | Update test 970 accordingly. Reported-by: Michal Rus Fixes #6905 Closes #6906
* openldap: protect SSL-specific code with proper #ifdefDaniel Stenberg2021-04-151-0/+2
| | | | Closes #6901
* libssh2: fix Value stored to 'sshp' is never readDaniel Stenberg2021-04-151-3/+1
| | | | | | Pointed out by scan-build Closes #6900
* tool_getparam: replace (in-place) '%20' by '+' according to RFC1866Victor Vieux2021-04-153-11/+33
| | | | | | Signed-off-by: Victor Vieux <victorvieux@gmail.com> Closes #6895
* configure: provide --with-openssl, deprecate --with-sslDaniel Stenberg2021-04-158-49/+57
| | | | | | Makes the option more explicit. Closes #6887
* RELEASE-NOTES: syncedDaniel Stenberg2021-04-152-56/+13
| | | | and bumped curlver to 7.77.0
* rustls: only return CURLE_AGAIN when TLS session is fully drainedJavier Blazquez2021-04-151-5/+8
| | | | | | | | | | | | | | The code in cr_recv was returning prematurely as soon as the socket reported no more data to read. However, this could be leaving some unread plaintext data in the rustls session from a previous call, causing causing the transfer to hang if the socket never receives further data. We need to ensure that the session is fully drained of plaintext data before returning CURLE_AGAIN to the caller. Reviewed-by: Jacob Hoffman-Andrews Closes #6894
* cookie: CURLOPT_COOKIEFILE set to NULL switches off cookiesDaniel Stenberg2021-04-146-3/+175
| | | | | | | | | Add test 676 to verify that setting CURLOPT_COOKIEFILE to NULL again clears the cookiejar from memory. Reported-by: Stefan Karpinski Fixes #6889 Closes #6891
* RELEASE-NOTES: syncedcurl-7_76_1Daniel Stenberg2021-04-141-6/+30
| | | | curl 7.76.1 release
* THANKS: add names from 7.76.1Daniel Stenberg2021-04-131-0/+10
|
* misc: update copyright year ranges to match latest updatesDaniel Stenberg2021-04-132-2/+2
|
* ngtcp2: Use ALPN h3-29 for nowTatsuhiro Tsujikawa2021-04-131-4/+6
| | | | | Fixes #6864 Cloes #6886
* TODO: remove 18.22 --fail-with-bodyJay Satiro2021-04-111-9/+0
| | | | --fail-with-body was added in 8a964cb (precedes curl-7_76_0).
* src/tool_vms.c: remove duplicated word in commentJürgen Gmach2021-04-101-1/+1
| | | | Closes #6881