summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* openssl: show "proper" version number for libressl buildsbagder/libressl-versionDaniel Stenberg2018-09-131-6/+5
|
* sendf: use failf() rather than Curl_failf()Daniel Gustafsson2018-09-131-3/+2
| | | | | | | | The failf() macro is the name used for invoking Curl_failf(). While there isn't a way to turn off failf like there is for infof, but it's still a good idea to use the macro. Reviewed-by: Daniel Stenberg <daniel@haxx.se>
* sendf: Fix whitespace in infof/failf concatenationDaniel Gustafsson2018-09-132-2/+2
| | | | | | | | | | Strings broken on multiple rows in the .c file need to have appropriate whitespace padding on either side of the concatenation point to render a correct amalgamated string. Fix by adding a space at the occurrences found. Closes #2986 Reviewed-by: Daniel Stenberg <daniel@haxx.se>
* krb5: fix memory leak in krb_authDaniel Gustafsson2018-09-131-0/+1
| | | | | | The FTP command allocated by aprintf() must be freed after usage. Reviewed-by: Daniel Stenberg <daniel@haxx.se>
* ftp: include command in Curl_ftpsend sendbufferDaniel Gustafsson2018-09-131-1/+5
| | | | | | | | | | Commit 8238ba9c5f10414a88f502bf3f5d5a42d632984c inadvertently removed the actual command to be sent from the send buffer in a refactoring. Add back copying the command into the buffer. Also add more guards against malformed input while at it. Closes #2985 Reviewed-by: Daniel Stenberg <daniel@haxx.se>
* ntlm_wb: Fix memory leaks in ntlm_wb_responseDaniel Gustafsson2018-09-131-0/+1
| | | | | | | | When erroring out on a request being too large, the existing buffer was leaked. Fix by explicitly freeing on the way out. Closes #2966 Reviewed-by: Daniel Stenberg <daniel@haxx.se>
* vtls: add a MesaLink vtls backendYiming Jing2018-09-135-1/+666
| | | | Closes #2984
* configure.ac: add a MesaLink vtls backendYiming Jing2018-09-131-2/+2
|
* lib: fix gcc8 warning on WindowsViktor Szakats2018-09-121-2/+3
| | | | Closes https://github.com/curl/curl/pull/2979
* openssl: fix gcc8 warningJay Satiro2018-09-121-1/+1
| | | | | | | | | | - Use memcpy instead of strncpy to copy a string without termination, since gcc8 warns about using strncpy to copy as many bytes from a string as its length. Suggested-by: Viktor Szakats Closes https://github.com/curl/curl/issues/2980
* cookies: Move failure case label to end of functionDaniel Gustafsson2018-09-101-6/+7
| | | | | | | | Rather than jumping backwards to where failure cleanup happens to be performed, move the failure case to end of the function where it is expected per existing coding convention. Closes #2965
* misc: fix typos in commentsDaniel Gustafsson2018-09-102-2/+2
| | | | Closes #2963
* cookies: fix leak when writing cookies to fileDaniel Gustafsson2018-09-101-3/+2
| | | | | | | | | If the formatting fails, we error out on a fatal error and clean up on the way out. The array was however freed within the wrong scope and was thus never freed in case the cookies were written to a file instead of STDOUT. Closes #2957
* cookies: Remove redundant expired checkDaniel Gustafsson2018-09-101-6/+2
| | | | | | | Expired cookies have already been purged at a later expiration time before this check, so remove the redundant check. closes #2962
* ntlm_wb: bail out if the response gets overly largeDaniel Stenberg2018-09-091-1/+10
| | | | | | | | Exit the realloc() loop if the response turns out ridiculously large to avoid worse problems. Reported-by: Harry Sintonen Closes #2959
* url.c: fix comment typo and indentationDaniel Gustafsson2018-09-081-2/+2
| | | | Closes #2960
* urlapi: avoid derefencing a possible NULL pointerDaniel Stenberg2018-09-081-2/+2
| | | | Coverity CID 1439134
* URL-APIDaniel Stenberg2018-09-089-340/+1394
| | | | | | | See header file and man pages for API. All documented API details work and are tested in the 1560 test case. Closes #2842
* curl_easy_upkeep: removed 'conn' from the nameDaniel Stenberg2018-09-074-5/+5
| | | | | | | ... including the associated option. Fixes #2951 Closes #2952
* upkeep: add a connection upkeep API: curl_easy_conn_upkeep()Max Dymond2018-09-076-0/+105
| | | | | | | | | Add functionality so that protocols can do custom keepalive on their connections, when an external API function is called. Add docs for the new options in 7.62.0 Closes #1641
* configure: add option to disable automatic OpenSSL config loadingPhilipp Waehnert2018-09-071-0/+2
| | | | | | | | | | | | | | | Sometimes it may be considered a security risk to load an external OpenSSL configuration automatically inside curl_global_init(). The configuration option --disable-ssl-auto-load-config disables this automatism. The Windows build scripts winbuild/Makefile.vs provide a corresponding option ENABLE_SSL_AUTO_LOAD_CONFIG accepting a boolean value. Setting neither of these options corresponds to the previous behavior loading the external OpenSSL configuration automatically. Fixes #2724 Closes #2791
* doh: minor edits to please CoverityDaniel Stenberg2018-09-071-2/+5
| | | | | | | The gcc typecheck macros and coverity combined made it warn on the 2nd argument for ERROR_CHECK_SETOPT(). Here's minor rearrange to please it. Coverity CID 1439115 and CID 1439114.
* schannel: avoid switch-cases that go to default anywayDaniel Stenberg2018-09-071-0/+4
| | | | | | | | | | SEC_E_APPLICATION_PROTOCOL_MISMATCH isn't defined in some versions of mingw and would require an ifdef otherwise. Reported-by: Thomas Glanzmann Approved-by: Marc Hörsken Bug: https://curl.haxx.se/mail/lib-2018-09/0020.html Closes #2950
* imap: change from "FETCH" to "UID FETCH"Nicklas Avén2018-09-062-21/+43
| | | | | | | | | | | | ... and add "MAILINDEX". As described in #2789, this is a suggested solution. Changing UID=xx to actually get mail with UID xx and add "MAILINDEX" to get a mail with a special index in the mail box (old behavior). So MAILINDEX=1 gives the first non deleted mail in the mail box. Fixes #2789 Closes #2815
* CURLOPT_UPLOAD_BUFFERSIZE: set upload buffer sizeDaniel Stenberg2018-09-068-17/+39
| | | | | | | This is step 3 of #2888. Fixes #2888 Closes #2896
* DOH: add test case 1650 and 2100Daniel Stenberg2018-09-062-65/+92
|
* setopt: add CURLOPT_DOH_URLDaniel Stenberg2018-09-069-60/+1092
| | | | Closes #2668
* ssl: deprecate CURLE_SSL_CACERT in favour of a unified error codeHan Han2018-09-063-8/+4
| | | | Long live CURLE_PEER_FAILED_VERIFICATION
* x509asn1: return CURLE_PEER_FAILED_VERIFICATION on failure to parse certHan Han2018-09-061-1/+1
| | | | | | | | CURLE_PEER_FAILED_VERIFICATION makes more sense because Curl_parseX509 does not allocate memory internally as its first argument is a pointer to the certificate structure. The same error code is also returned by Curl_verifyhost when its call to Curl_parseX509 fails so the change makes error handling more consistent.
* openssl: return CURLE_PEER_FAILED_VERIFICATION on failure to parse issuerHan Han2018-09-061-2/+2
| | | | | Failure to extract the issuer name from the server certificate should return a more specific error code like on other TLS backends.
* schannel: unified error code handlingHan Han2018-09-062-30/+71
| | | | Closes #2901
* darwinssl: more specific and unified error codesHan Han2018-09-061-146/+278
| | | | Closes #2901
* CURLOPT_DNS_USE_GLOBAL_CACHE: deprecatedDaniel Stenberg2018-09-061-0/+2
| | | | | | | | Disable the CURLOPT_DNS_USE_GLOBAL_CACHE option and mark it for deprecation and complete removal in six months. Bug: https://curl.haxx.se/mail/lib-2018-09/0010.html Closes #2942
* url: default to CURL_HTTP_VERSION_2TLS if built h2-enabledDaniel Stenberg2018-09-052-9/+11
| | | | Closes #2709
* multiplex: enable by defaultDaniel Stenberg2018-09-051-0/+1
| | | | Starting 7.62.0, multiplexing is enabled by default in multi handles.
* tests: add unit tests for url.cJim Fuller2018-09-052-7/+3
| | | | | Approved-by: Daniel Gustafsson Closes #2937
* pipelining: deprecatedDaniel Stenberg2018-09-051-1/+1
| | | | | | | | | | | | Transparently. The related curl_multi_setopt() options all still returns OK when pipelining is selected. To re-enable the support, the single line change in lib/multi.c needs to be reverted. See docs/DEPRECATE.md Closes #2705
* Curl_getoff_all_pipelines: ignore unused return valuesDaniel Stenberg2018-09-041-3/+2
| | | | Since scan-build would warn on the dead "Dead store/Dead increment"
* sftp: fix indentationViktor Szakats2018-09-041-1/+1
|
* sftp: don't send post-qoute sequence when retrying a connectionPrzemysław Tomaszewski2018-09-042-3/+5
| | | | | Fixes #2939 Closes #2940
* url, vtls: make CURLOPT{,_PROXY}_TLS13_CIPHERS workKamil Dudka2018-09-032-1/+8
| | | | | | This is a follow-up to PR #2607 and PR #2926. Closes #2936
* openssl: Fix setting TLS 1.3 cipher suitesJay Satiro2018-09-031-0/+3
| | | | | | | | | | The flag indicating TLS 1.3 cipher support in the OpenSSL backend was missing. Bug: https://github.com/curl/curl/pull/2607#issuecomment-417283187 Reported-by: Kamil Dudka Closes #2926
* Curl_ntlm_core_mk_nt_hash: return error on too long passwordDaniel Stenberg2018-09-031-1/+4
| | | | | | | | | | | ... since it would cause an integer overflow if longer than (max size_t / 2). This is CVE-2018-14618 Bug: https://curl.haxx.se/docs/CVE-2018-14618.html Closes #2756 Reported-by: Zhaoyang Wu
* http2: Use correct format identifier for stream_idRikard Falkeborn2018-09-021-4/+4
| | | | Closes #2928
* all: s/int/size_t cleanupDaniel Stenberg2018-09-0112-53/+53
| | | | | | Assisted-by: Rikard Falkeborn Closes #2922
* ssh-libssh: use FALLTHROUGH to silence gcc8Daniel Stenberg2018-09-011-11/+11
|
* cookies: support creation-time attribute for cookiesDaniel Gustafsson2018-08-312-17/+55
| | | | | | | | | | | | | | According to RFC6265 section 5.4, cookies with equal path lengths SHOULD be sorted by creation-time (earlier first). This adds a creation-time record to the cookie struct in order to make cookie sorting more deterministic. The creation-time is defined as the order of the cookies in the jar, the first cookie read fro the jar being the oldest. The creation-time is thus not serialized into the jar. Also remove the strcmp() matching in the sorting as there is no lexicographic ordering in RFC6265. Existing tests are updated to match. Closes #2524
* curl_threads: silence bad-function-cast warningMarcel Raad2018-08-241-1/+2
| | | | | | | As uintptr_t and HANDLE are always the same size, this warning is harmless. Just silence it using an intermediate uintptr_t variable. Closes https://github.com/curl/curl/pull/2908
* schannel: client certificate store opening fixIhor Karpenko2018-08-241-5/+8
| | | | | | | | | | | | | | | | | | | 1) Using CERT_STORE_OPEN_EXISTING_FLAG ( or CERT_STORE_READONLY_FLAG ) while opening certificate store would be sufficient in this scenario and less-demanding in sense of required user credentials ( for example, IIS_IUSRS will get "Access Denied" 0x05 error for existing CertOpenStore call without any of flags mentioned above ), 2) as 'cert_store_name' is a DWORD, attempt to format its value like a string ( in "Failed to open cert store" error message ) will throw null pointer exception 3) adding GetLastError(), in my opinion, will make error message more useful. Bug: https://curl.haxx.se/mail/lib-2018-08/0198.html Closes #2909
* gopher: Do not translate `?' to `%09'Leonardo Taccari2018-08-241-7/+0
| | | | | | | | | | | | | Since GOPHER support was added in curl `?' character was automatically translated to `%09' (`\t'). However, this behaviour does not seems documented in RFC 4266 and for search selectors it is documented to directly use `%09' in the URL. Apart that several gopher servers in the current gopherspace have CGI support where `?' is used as part of the selector and translating it to `%09' often leads to surprising results. Closes #2910