summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* ftp: fix memory leak in ftp_donebagder/ftp-leak-doneDaniel Stenberg2021-03-121-1/+3
| | | | | | | If after a transfer is complete Curl_GetFTPResponse() returns an error, curl would not free the ftp->pathalloc block. Found by torture-testing test 576
* rustls: support CURLOPT_SSL_VERIFYPEERJacob Hoffman-Andrews2021-03-121-42/+97
| | | | | | | | | | | | | This requires the latest main branch of crustls, which provides rustls_client_config_builder_dangerous_set_certificate_verifier and rustls_client_config_builder_set_enable_sni. This refactors the session setup into its own function, and adds a new function cr_hostname_is_ip. Because crustls doesn't support verification of IP addresses, special handling is needed: We disable SNI and set a placeholder hostname (which never actually gets sent on the wire). Closes #6719
* cookies: Fix potential NULL pointer deref with PSLDaniel Gustafsson2021-03-121-2/+6
| | | | | | | | | | | | | | | Curl_cookie_init can be called with data being NULL, and this can in turn be passed to Curl_cookie_add, meaning that both functions must be careful to only use data where it's checked for being a NULL pointer. The libpsl support code does however dereference data without checking, so if we are indeed having an unset data pointer we cannot PSL check the cookiedomain. This is currently not a reachable dereference, as the only caller with a NULL data isn't passing a file to initialize cookies from, but since the API has this contract let's ensure we hold it. Closes #6731 Reviewed-by: Daniel Stenberg <daniel@haxx.se>
* configure: only add OpenSSL paths if they are definedMichael Hordijk2021-03-121-2/+4
| | | | | | | | Add paths for OpenSSL compiling and linking only if they have been defined. If they haven't been defined, we'll assume that the paths are already available to the toolchain. Closes #6730
* retry.d: Clarify transient 5xx HTTP response codesJay Satiro2021-03-121-1/+2
| | | | | | | | | | | | - Clarify the only 5xx response codes that are treated as transient are 500, 502, 503 and 504. Prior to this change it said it treated all 5xx as transient, but the code says otherwise. Ref: https://github.com/curl/curl/blob/curl-7_75_0/src/tool_operate.c#L462-L495 Closes https://github.com/curl/curl/pull/6724
* retry-all-errors.d: Explain curl errors versus HTTP response errorsJay Satiro2021-03-121-0/+8
| | | | | | | | | | | | | | | | | - Add a paragraph explaining that curl does not consider HTTP response errors as curl errors, and how that behavior can be modified by using --retry and --fail. The --retry-all-errors doc says "Retry on any error" which some users may find misleading without the added explanation. Ref: https://curl.se/docs/faq.html#Why_do_I_get_downloaded_data_eve Ref: https://curl.se/docs/faq.html#curl_doesn_t_return_error_for_HT Reported-by: Lawrence Gripper Fixes https://github.com/curl/curl/issues/6712 Closes https://github.com/curl/curl/pull/6720
* travis: switch ngtcp2 build over to quictlsDaniel Stenberg2021-03-111-1/+1
| | | | | | | The ngtcp2 project switched over to using the quictls OpenSSL fork instead of their own patched OpenSSL. We follow suit. Closes #6729
* test220/314: adjust to run with HyperDaniel Stenberg2021-03-112-0/+16
|
* c-hyper: support automatic content-encodingDaniel Stenberg2021-03-111-1/+19
| | | | Closes #6727
* http: remove superfluous NULL assignDaniel Stenberg2021-03-111-3/+1
| | | | Closes #6727
* tool_operate: bail if set CURLOPT_HTTP09_ALLOWED returns errorDaniel Stenberg2021-03-111-0/+4
| | | | Closes #6727
* setopt: error on CURLOPT_HTTP09_ALLOWED set true with HyperDaniel Stenberg2021-03-111-0/+6
| | | | | | Not supported. Closes #6727
* test306: make it not run with HyperDaniel Stenberg2021-03-111-0/+1
| | | | ... as it tests HTTP/0.9 which Hyper doesn't support.
* test304: header CRLF cleanup to work with HyperDaniel Stenberg2021-03-111-1/+1
|
* FTP: allow SIZE to fail when doing (resumed) uploadDaniel Stenberg2021-03-113-3/+58
| | | | | | | | | Added test 362 to verify. Reported-by: Jordan Brown Regression since 7ea2e1d0c5a7f (7.73.0) Fixes #6715 Closes #6725
* configure: provide Largefile feature for curl-configDaniel Stenberg2021-03-112-2/+9
| | | | | | ... as cmake now does it correctly, and make test1014 check for it Closes #6702
* config: remove CURL_SIZEOF_CURL_OFF_T use only SIZEOF_CURL_OFF_TDaniel Stenberg2021-03-1114-28/+26
| | | | | | | Make the code consistently use a single name for the size of the "curl_off_t" type. Closes #6702
* ngtcp2: Fix build error due to change in ngtcp2_addr_initJun-ya Kato2021-03-101-4/+4
| | | | | | ngtcp2/ngtcp2@b8d90a9 changed the function prototype. Closes https://github.com/curl/curl/pull/6716
* multi: update pending list when removing handleejanchivdorj2021-03-101-0/+13
| | | | | | | when removing a handle, most of the lists are updated but pending list is not updated. Updating now. Closes #6713
* lib1536: check ptr against NULL before dereferencing itkokke2021-03-101-1/+1
| | | | Closes #6710
* lib1537: check ptr against NULL before dereferencing itkokke2021-03-101-1/+1
| | | | | Fixes #6707 Closes #6708
* travis: make torture tests skip TLS-SRP testsDaniel Stenberg2021-03-101-3/+2
| | | | | | | | | ... as it seems to often hang. Also: skip the "normal" tests as they're already run by many other builds. Closes #6705
* openssl: adapt to v3's new const for a few API callsDaniel Stenberg2021-03-091-3/+9
| | | | Closes #6703
* quiche: fix crash when failing to connectDaniel Stenberg2021-03-082-1/+5
| | | | | | Reported-by: ウさん Fixes #6664 Closes #6701
* RELEASE-NOTES: syncedDaniel Stenberg2021-03-081-5/+5
| | | | Fixed the release counter and added a missing contributor
* RELEASE-NOTES: syncedDaniel Stenberg2021-03-061-9/+40
|
* dynbuf: bump the max HTTP request to 1MBDaniel Stenberg2021-03-061-2/+2
| | | | | | | | Raised from 128KB to allow longer request headers. Reported-by: Carl Zogheib Fixes #6681 Closes #6685
* schannel: Evaluate CURLOPT_SSL_OPTIONS via SSL_SET_OPTION macroJay Satiro2021-03-063-4/+4
| | | | | | | | | | | | | | | | | | | | | | - Change use of those options from CURLOPT_SSL_OPTIONS that are not already evaluated via SSL_SET_OPTION in schannel and secure transport to use that instead of data->set.ssl.optname. Example: Evaluate SSL_SET_OPTION(no_revoke) instead of data->set.ssl.no_revoke. This change is because options set via CURLOPT_SSL_OPTIONS (data->set.ssl.optname) are separate from those set for HTTPS proxy via CURLOPT_PROXY_SSL_OPTIONS (data->set.proxy_ssl.optname). The SSL_SET_OPTION macro determines whether the connection is for HTTPS proxy and based on that which option to evaluate. Since neither Schannel nor Secure Transport backends currently support HTTPS proxy in libcurl, this change is for posterity and has no other effect. Closes https://github.com/curl/curl/pull/6690
* c-hyper: Remove superfluous pointer checkkokke2021-03-051-2/+0
| | | | | | | | `n` pointer is never NULL once set. Found by static analysis. Ref: https://github.com/curl/curl/issues/6696 Closes https://github.com/curl/curl/pull/6697
* version.d: Add missing features to the features listJay Satiro2021-03-041-6/+16
| | | | | | | | | | | | - Add missing entries for gsasl, Kerberos, NTLM_WB, TrackMemory, Unicode and zstd. - Remove krb4 since it's no longer a feature. Reported-by: Ádler Jonas Gross Fixes https://github.com/curl/curl/issues/6677 Closes https://github.com/curl/curl/pull/6687
* docs: add missing Arg tag to --stderrVladimir Varlamov2021-03-042-1/+2
| | | | | | | | | | | | | | | Prior to this change the required argument was not shown. curl.1 before: --stderr curl.1 after: --stderr <file> curl --help before: --stderr Where to redirect stderr curl --help after: --stderr <file> Where to redirect stderr Closes https://github.com/curl/curl/pull/6692
* projects: Update VS projects for OpenSSL 1.1.xJay Satiro2021-03-0321-468/+514
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Update VS project templates to use the OpenSSL lib names and include directories for OpenSSL 1.1.x. This change means the VS project files will now build only with OpenSSL 1.1.x when an OpenSSL configuration is chosen. Prior to this change the project files built only with OpenSSL 1.0.x (end-of-life) when an OpenSSL configuration was chosen. The template changes in this commit were made by script: libeay32.lib => libcrypto.lib ssleay32.lib => libssl.lib ..\..\..\..\..\openssl\inc32 => ..\..\..\..\..\openssl\include And since the output directory now contains the includes it's prepended: ..\..\..\..\..\openssl\build\Win{32,64}\VC{6..15}\{DLL,LIB} {Debug,Release}\include - Change build-openssl.bat to copy the build's include directory to the output directory (as seen above). Each build has its own opensslconf.h which is different so we can't just include the source include directory any longer. Note the include directory in the output directory is a full copy from the build so technically we don't need to include the OpenSSL source include directory in the template. However, I left it last in case the user made a custom OpenSSL build using the old method which would put opensslconf in the OpenSSL source include directory. - Change build-openssl.bat to use a temporary install directory that is different from the temporary build directory. For OpenSSL 1.1.x the temporary paths must be separate not a descendant of the other, otherwise pdb files will be lost between builds. Ref: https://curl.se/mail/lib-2018-10/0049.html Ref: https://gist.github.com/jay/125191c35bbeb894444eff827651f755 Ref; https://github.com/openssl/openssl/issues/10005 Fixes https://github.com/curl/curl/issues/984 Closes https://github.com/curl/curl/pull/6675
* doh: Inherit CURLOPT_STDERR from user's easy handleJay Satiro2021-03-021-0/+2
| | | | | | | | | | | | Prior to this change if the user set their easy handle's error stream to something other than stderr it was not inherited by the doh handles, which meant that they would still write to the default standard error stream (stderr) for verbose output. Bug: https://github.com/curl/curl/issues/6605 Reported-by: arvids-kokins-bidstack@users.noreply.github.com Closes https://github.com/curl/curl/pull/6661
* CI/azure: replace python-impacket with python3-impacketMarc Hoersken2021-03-011-1/+1
| | | | | | | As of this month Azure DevOps uses Ubuntu 20.04 LTS which no longer supports Python 2 and instead ships Python 3. Closes #6678
* runtests.pl: kill processes locking test log filesMarc Hoersken2021-03-013-8/+56
| | | | | | | | | | | | | | Introduce a new runtests.pl command option: -rm For now only required and implemented for Windows. Ignore stunnel logs due to long running processes. Requires Sysinternals handle[64].exe to be on PATH. Reviewed-by: Jay Satiro Ref: #6058 Closes #6179
* pathhelp.pm: fix use of pwd -L in Msys environmentMarc Hoersken2021-03-011-3/+25
| | | | | | | | | While Msys2 has a pwd binary which supports -L, Msys1 only has a shell built-in with that feature. Reviewed-by: Jay Satiro Part of #6179
* ldap: use correct memory free functionDaniel Gustafsson2021-03-011-3/+3
| | | | | | | | | | | | | unescaped is coming from Curl_urldecode and not a unicode conversion function, so reclaiming its memory should be performed with a normal call to free rather than curlx_unicodefree. In reality, this is the same thing as curlx_unicodefree is implemented as a call to free but that's not guaranteed to always hold. Using the curlx macro present issues with memory debugging as well. Closes #6671 Reviewed-by: Jay Satiro <raysatiro@yahoo.com> Reviewed-by: Daniel Stenberg <daniel@haxx.se>
* url: fix typo in commentDaniel Gustafsson2021-02-281-1/+1
| | | | Correct a small typo which snuck in with a304051620.
* tool_help: Increase space between option and descriptionJay Satiro2021-02-284-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | - Increase the minimum number of spaces between the option and the description from 1 to 2. Before: ~~~ -u, --user <user:password> Server user and password -A, --user-agent <name> Send User-Agent <name> to server -v, --verbose Make the operation more talkative -V, --version Show version number and quit -w, --write-out <format> Use output FORMAT after completion --xattr Store metadata in extended file attributes ~~~ After: ~~~ -u, --user <user:password> Server user and password -A, --user-agent <name> Send User-Agent <name> to server -v, --verbose Make the operation more talkative -V, --version Show version number and quit -w, --write-out <format> Use output FORMAT after completion --xattr Store metadata in extended file attributes ~~~ Closes https://github.com/curl/curl/pull/6674
* curl: set CURLOPT_NEW_FILE_PERMS if requestedDaniel Stenberg2021-02-271-0/+3
| | | | | | | | | | The --create-file-mode code logic accepted the value but never actually passed it on to libcurl! Follow-up to a7696c73436f (shipped in 7.75.0) Reported-by: Johannes Lesr Fixes #6657 Closes #6666
* tool_operate: check argc before accessing argv[1]Daniel Stenberg2021-02-271-1/+1
| | | | | | | Follow-up to 09363500b Reported-by: Emil Engler Reviewed-by: Daniel Gustafsson Closes #6668
* openssl: remove get_ssl_version_txt in favor of SSL_get_versionJean-Philippe Menil2021-02-261-30/+1
| | | | | | | | | | | | openssl: use SSL_get_version to get connection protocol Replace our bespoke get_ssl_version_txt in favor of SSL_get_version. We can get rid of few lines of code, since SSL_get_version achieve the exact same thing Closes #6665 Reviewed-by: Daniel Gustafsson <daniel@yesql.se> Signed-off-by: Jean-Philippe Menil <jpmenil@gmail.com>
* gnutls: Fix nettle discoveryDaniel Gustafsson2021-02-253-70/+2
| | | | | | | | | | | | | | | | | Commit e06fa7462ac258c removed support for libgcrypt leaving only support for nettle which has been the default crypto library in GnuTLS for a long time. There were however a few conditionals on USE_GNUTLS_NETTLE which cause compilation errors in the metalink code (as it used the gcrypt fallback instead as a result). See the below autobuild for an example of the error: https://curl.se/dev/log.cgi?id=20210225123226-30704#prob1 This removes all uses of USE_GNUTLS_NETTLE and also removes the gcrypt support from the metalink code while at it. Closes #6656 Reviewed-by: Daniel Stenberg <daniel@haxx.se>
* cookies: Support multiple -b parametersDaniel Gustafsson2021-02-257-15/+48
| | | | | | | | | | Previously only a single -b cookie parameter was supported with the last one winning. This adds support for supplying multiple -b params to have them serialized semicolon separated. Both cookiefiles and cookies can be entered multiple times. Closes #6649 Reviewed-by: Daniel Stenberg <daniel@haxx.se>
* build: remove all traces of USE_BLOCKING_SOCKETSDaniel Stenberg2021-02-256-20/+4
| | | | | | libcurl doesn't behave properly with the define set Closes #6655
* RELEASE-NOTES: syncedDaniel Stenberg2021-02-251-9/+25
|
* docs: Fix typosDaniel Gustafsson2021-02-252-3/+3
| | | | Random typos spotted when skimming docs.
* cookies: Use named parameters in header prototypesDaniel Gustafsson2021-02-231-6/+7
| | | | | | | | Align header with project style of using named parameters in the function prototypes to aid readability and self-documentation. Closes #6653 Reviewed-by: Daniel Stenberg <daniel@haxx.se>
* urldata: make 'actions[]' use unsigned char instead of intDaniel Stenberg2021-02-242-10/+10
| | | | | | | ... as it only needs a few bits per index anyway. Reviewed-by: Daniel Gustafsson Closes #6648
* configure: fail if --with-quiche is used and quiche isn't foundDaniel Stenberg2021-02-241-4/+2
| | | | Closes #6652