summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* http: CURL_DISABLE_HTTP_AUTHDaniel Stenberg2019-05-132-1/+20
|
* base64: build conditionally if there are usersDaniel Stenberg2019-05-131-1/+8
|
* doh: CURL_DISABLE_DOHDaniel Stenberg2019-05-133-1/+15
|
* auth: Rename the various authentication clean up functionsSteve Holme2019-05-1218-53/+54
| | | | | | For consistency and to a avoid confusion. Closes #3869
* easy: fix another "clarify calculation precedence" warningMarcel Raad2019-05-121-2/+2
| | | | I missed this one in commit 6b3dde7fe62ea5a557fd1fd323fac2bcd0c2e9be.
* build: fix "clarify calculation precedence" warningsMarcel Raad2019-05-126-11/+13
| | | | | | | Codacy/CppCheck warns about this. Consistently use parentheses as we already do in some places to silence the warning. Closes https://github.com/curl/curl/pull/3866
* http_ntlm: Corrected the name of the include guardSteve Holme2019-05-111-4/+4
| | | | | | Missed in f0bdd72c. Closes #3867
* http_digest: Don't expose functions when HTTP and Crypto Auth are disabledSteve Holme2019-05-113-5/+10
| | | | Closes #3861
* http_negotiate: Don't expose functions when HTTP is disabledSteve Holme2019-05-111-2/+2
|
* doh: disable DOH for the cases it doesn't workDaniel Stenberg2019-05-115-11/+15
| | | | | | | | | | Due to limitations in Curl_resolver_wait_resolv(), it doesn't work for DOH resolves. This fix disables DOH for those. Limitation added to KNOWN_BUGS. Fixes #3850 Closes #3857
* vauth: Fix incorrect function description for Curl_auth_user_contains_domain()Steve Holme2019-05-101-21/+21
| | | | | | ...and misalignment of these comments. From a78c61a4. Closes #3860
* Revert "multi: support verbose conncache closure handle"Jay Satiro2019-05-101-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit b0972bc. - No longer show verbose output for the conncache closure handle. The offending commit was added so that the conncache closure handle would inherit verbose mode from the user's easy handle. (Note there is no way for the user to set options for the closure handle which is why that was necessary.) Other debug settings such as the debug function were not also inherited since we determined that could lead to crashes if the user's per-handle private data was used on an unexpected handle. The reporter here says he has a debug function to capture the verbose output, and does not expect or want any output to stderr; however because the conncache closure handle does not inherit the debug function the verbose output for that handle does go to stderr. There are other plausible scenarios as well such as the user redirects stderr on their handle, which is also not inherited since it could lead to crashes when used on an unexpected handle. Short of allowing the user to set options for the conncache closure handle I don't think there's much we can safely do except no longer inherit the verbose setting. Bug: https://curl.haxx.se/mail/lib-2019-05/0021.html Reported-by: Kristoffer Gleditsch Ref: https://github.com/curl/curl/pull/3598 Ref: https://github.com/curl/curl/pull/3618 Closes https://github.com/curl/curl/pull/3856
* ntlm: Fix misaligned function comments for Curl_auth_ntlm_cleanup()Steve Holme2019-05-101-9/+9
| | | | | | From 6012fa5a. Closes #3858
* http_negotiate: do not treat failure of gss_init_sec_context() as fatalKamil Dudka2019-05-091-1/+7
| | | | | Fixes #3726 Closes #3849
* spnego_gssapi: fix return code on gss_init_sec_context() failureKamil Dudka2019-05-091-1/+1
| | | | | Fixes #3726 Closes #3849
* http: Ignore HTTP/2 prior knowledge setting for HTTP proxiesJay Satiro2019-05-081-0/+7
| | | | | | | | | | | | | | | | | | | - Do not switch to HTTP/2 for an HTTP proxy that is not tunnelling to the destination host. We already do something similar for HTTPS proxies by not sending h2. [1] Prior to this change setting CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE would incorrectly use HTTP/2 to talk to the proxy, which is not something we support (yet?). Also it's debatable whether or not that setting should apply to HTTP/2 proxies. [1]: https://github.com/curl/curl/commit/17c5d05 Bug: https://github.com/curl/curl/issues/3570 Bug: https://github.com/curl/curl/issues/3832 Closes https://github.com/curl/curl/pull/3853
* OpenSSL: Report -fips in version if OpenSSL is built with FIPSRicky Leverence2019-05-081-1/+5
| | | | | | | | | | | | | Older versions of OpenSSL report FIPS availabilty via an OPENSSL_FIPS define. It uses this define to determine whether to publish -fips at the end of the version displayed. Applications that utilize the version reported by OpenSSL will see a mismatch if they compare it to what curl reports, as curl is not modifying the version in the same way. This change simply adds a check to see if OPENSSL_FIPS is defined, and will alter the reported version to match what OpenSSL itself provides. This only appears to be applicable in versions of OpenSSL <1.1.1 Closes #3771
* nss: allow fifos and character devices for certificates.Frank Gevaerts2019-05-071-1/+1
| | | | | | | | | | Currently you can do things like --cert <(cat ./cert.crt) with (at least) the openssl backend, but that doesn't work for nss because is_file rejects fifos. I don't actually know if this is sufficient, nss might do things internally (like seeking back) that make this not work, so actual testing is needed. Closes #3807
* ssh: define USE_SSH if SSH is enabled (any backend)Daniel Stenberg2019-05-066-8/+12
| | | | Closes #3846
* urlapi: add CURLUPART_ZONEID to set and getDaniel Stenberg2019-05-051-13/+22
| | | | | | | | The zoneid can be used with IPv6 numerical addresses. Updated test 1560 to verify. Closes #3834
* WRITEFUNCTION: add missing set_in_callback around callbackTaiyu Len2019-05-051-1/+4
| | | | Closes #3837
* urlapi: strip off scope id from numerical IPv6 addressesDaniel Stenberg2019-05-031-9/+54
| | | | | | | | | | ... to make the host name "usable". Store the scope id and put it back when extracting a URL out of it. Also makes curl_url_set() syntax check CURLUPART_HOST. Fixes #3817 Closes #3822
* multiif.h: remove unused protosDaniel Stenberg2019-05-021-15/+0
| | | | | | | ... for functions related to pipelining. Those functions were removed in 2f44e94efb3df. Closes #3828
* travis: upgrade the MesaLink TLS backend to v1.0.0Yiming Jing2019-05-011-1/+1
| | | | | Closes #3823 Closes #3776
* ConnectionExists: improve non-multiplexing use caseDaniel Stenberg2019-05-011-2/+7
| | | | | | - better log output - make sure multiplex is enabled for it to be used
* multi: provide Curl_multiuse_state to update informationDaniel Stenberg2019-05-0110-2/+48
| | | | | | As soon as a TLS backend gets ALPN conformation about the specific HTTP version it can now set the multiplex situation for the "bundle" and trigger moving potentially queued up transfers to the CONNECT state.
* process_pending_handles: mark queued transfers as previously pendingDaniel Stenberg2019-05-012-0/+9
| | | | | | | | | With transfers being queued up, we only move one at a a time back to the CONNECT state but now we mark moved transfers so that when a moved transfer is confirmed "successful" (it connected) it will trigger the move of another pending transfer. Previously, it would otherwise wait until the transfer was done before doing this. This makes queued up pending transfers get processed (much) faster.
* http: mark bundle as not for multiuse on < HTTP/2 responseDaniel Stenberg2019-05-011-0/+4
| | | | | Fixes #3813 Closes #3815
* cookie: Guard against possible NULL ptr derefDaniel Gustafsson2019-05-011-5/+7
| | | | | | | | | | In case the name pointer isn't set (due to memory pressure most likely) we need to skip the prefix matching and reject with a badcookie to avoid a possible NULL pointer dereference. Closes #3820 #3821 Reported-by: Jonathan Moerman Reviewed-by: Daniel Stenberg <daniel@haxx.se>
* nss: provide more specific error messages on failed initKamil Dudka2019-04-291-2/+8
| | | | Closes #3808
* CURL_MAX_INPUT_LENGTH: largest acceptable string input sizeDaniel Stenberg2019-04-293-0/+19
| | | | | | | | | | | | | | | | | This limits all accepted input strings passed to libcurl to be less than CURL_MAX_INPUT_LENGTH (8000000) bytes, for these API calls: curl_easy_setopt() and curl_url_set(). The 8000000 number is arbitrary picked and is meant to detect mistakes or abuse, not to limit actual practical use cases. By limiting the acceptable string lengths we also reduce the risk of integer overflows all over. NOTE: This does not apply to `CURLOPT_POSTFIELDS`. Test 1559 verifies. Closes #3805
* cmake: rename CMAKE_USE_DARWINSSL to CMAKE_USE_SECTRANSPSimon Warta2019-04-271-2/+2
| | | | Closes https://github.com/curl/curl/pull/3769
* ntlm: Missed pre-processor || (or) during rebase for cd15acd0Steve Holme2019-04-231-1/+1
|
* ntlm: Support the NT response in the type-3 when OpenSSL doesn't include MD4Steve Holme2019-04-234-6/+16
| | | | | | Just like we do for mbed TLS, use our local implementation of MD4 when OpenSSL doesn't support it. This allows a type-3 message to include the NT response.
* sasl: Don't send authcid as authzid for the PLAIN mechanism as per RFC 4616Steve Holme2019-04-221-2/+2
| | | | | | | RFC 4616 specifies the authzid is optional in the client authentication message and that the server will derive the authorisation identity (authzid) from the authentication identity (authcid) when not specified by the client.
* memdebug: fix variable nameGisle Vanem2019-04-221-2/+2
| | | | | | Follow-up to 76b6348 which renamed logfile as curl_dbg_logfile. Ref: https://github.com/curl/curl/commit/76b6348#r33259088
* vauth/cleartext: Don't send the authzid if it is emptySteve Holme2019-04-211-2/+3
| | | | Follow up to 762a292f.
* CURLOPT_MAXAGE_CONN: set the maximum allowed age for conn reuseDaniel Stenberg2019-04-214-3/+34
| | | | | | | | | ... and disconnect too old ones instead of trying to reuse. Default max age is set to 118 seconds. Ref: #3722 Closes #3782
* altsvc: Fix building with cookies disablesPo-Chuan Hsieh2019-04-206-31/+88
| | | | | | | | | | | ALTSVC requires Curl_get_line which is defined in lib/cookie.c inside a #if check of HTTP and COOKIES. That makes Curl_get_line undefined if COOKIES is disabled. Fix by splitting out the function into a separate file which can be included where needed. Closes #3717 Reviewed-by: Daniel Gustafsson <daniel@yesql.se> Reviewed-by: Marcel Raad <Marcel.Raad@teamviewer.com>
* Curl_disconnect: treat all CONNECT_ONLY connections as "dead"Daniel Stenberg2019-04-201-0/+4
| | | | | | | | | Since the connection has been used by the "outside" we don't know the state of it anymore and curl should not use it anymore. Bug: https://curl.haxx.se/mail/lib-2019-04/0052.html Closes #3795
* multi: fix the statenames (follow-up fix from 2f44e94efb3df8e)Daniel Stenberg2019-04-191-2/+0
| | | | | The list of names must be in sync with the defined states in the header file!
* md5: Update the function signature following d84da52dSteve Holme2019-04-161-5/+5
|
* md5: Forgot to update the code alignment in d84da52dSteve Holme2019-04-151-2/+2
|
* md5: Return CURLcode from the internally accessible functionsSteve Holme2019-04-151-2/+2
| | | | Following 28f826b3 to return CURLE_OK instead of numeric 0.
* md(4|5): Fixed indentation oddities with the importation of replacement codeSteve Holme2019-04-142-114/+114
| | | | | | | The indentation from 211d5329 and 57d6d253 was a little strange as parts didn't align correctly, uses 4 spaces rather than 2. Checked the indentation of the original source so it aligns, albeit, using curl style.
* md5: Code style to return CURLE_OK rather than numeric 0Steve Holme2019-04-141-2/+2
|
* md5: Corrected code style for some pointer argumentsSteve Holme2019-04-141-6/+6
|
* singleipconnect: show port in the verbose "Trying ..." messageDaniel Stenberg2019-04-131-1/+1
| | | | To aid debugging better.
* CURLOPT_ADDRESS_SCOPE: fix range check and moretmilburn2019-04-133-16/+19
| | | | | | | | | | | | | | | | | Commit 9081014 fixed most of the confusing issues between scope id and scope however 844896d added bad limits checking assuming that the scope is being set and not the scope id. I have fixed the documentation so it all refers to scope ids. In addition Curl_if2ip refered to the scope id as remote_scope_id which is incorrect, so I renamed it to local_scope_id. Adjusted-by: Daniel Stenberg Closes #3655 Closes #3765 Fixes #3713
* urlapi: stricter CURLUPART_PORT parsingDaniel Stenberg2019-04-131-2/+9
| | | | | | | | | | | Only allow well formed decimal numbers in the input. Document that the number MUST be between 1 and 65535. Add tests to test 1560 to verify the above. Ref: https://github.com/curl/curl/issues/3753 Closes #3762