aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2018-08-08ssl: set engine implicitly when a PKCS#11 URI is providedAnderson Toshiyuki Sasaki
This allows the use of PKCS#11 URI for certificates and keys without setting the corresponding type as "ENG" and the engine as "pkcs11" explicitly. If a PKCS#11 URI is provided for certificate, key, proxy_certificate or proxy_key, the corresponding type is set as "ENG" if not provided and the engine is set to "pkcs11" if not provided. Acked-by: Nikos Mavrogiannopoulos Closes #2333
2018-07-31curl: use Content-Disposition before the "URL end" for -OJDaniel Stenberg
Regression introduced in 7.61.0 Reported-by: Thomas Klausner Fixes #2783 Closes #2813
2018-07-28curl: Fix segfault when -H @headerfile is emptyTobias Blomberg
The curl binary would crash if the -H command line option was given a filename to read using the @filename syntax but that file was empty. Closes #2797
2018-07-17CMake: Update scripts to use consistent styleRuslan Baratov
Closes #2727 Reviewed-by: Sergei Nikulov
2018-07-17header output: switch off all styles, not just unboldDaniel Stenberg
... the "unbold" sequence doesn't work on the mac Terminal. Reported-by: Zero King Fixes #2736 Closes #2738
2018-06-11cppcheck: fix warningsMarian Klymov
- Get rid of variable that was generating false positive warning (unitialized) - Fix issues in tests - Reduce scope of several variables all over etc Closes #2631
2018-06-03spelling fixesViktor Szakats
Detected using the `codespell` tool (version 1.13.0). Also secure and fix an URL.
2018-06-02build: remove the Borland specific makefilesDaniel Stenberg
According to the user survey 2018, not even one out of 670 users use them. Nobody on the mailing list spoke up for them either. Closes #2629
2018-05-31option: disallow username in URLBjörn Stenberg
Adds CURLOPT_DISALLOW_USERNAME_IN_URL and --disallow-username-in-url. Makes libcurl reject URLs with a username in them. Closes #2340
2018-05-30curl.rc: embed manifest for correct Windows version detectionViktor Szakats
* enable it in `src/Makefile.m32` * enable it in `winbuild/MakefileBuild.vc` if a custom manifest is _not_ enabled via the existing `EMBED_MANIFEST` option * enable it for all Windows CMake builds (also disable the built-in minimal manifest, added by CMake by default.) For other build systems, add the `-DCURL_EMBED_MANIFEST` option to the list of RC (Resource Compiler) flags to enable the manifest included in `src/curl.rc`. This may require to disable whatever automatic or other means in which way another manifest is added to `curl.exe`. Notice that Borland C doesn't support this method due to a long-pending resource compiler bug. Watcom C may also not handle it correctly when the `-zm` `wrc` option is used (this option may be unnecessary though) and regardless of options in certain earlier revisions of the 2.0 beta version. Closes https://github.com/curl/curl/pull/1221 Fixes https://github.com/curl/curl/issues/2591
2018-05-29setopt: add TLS 1.3 ciphersuitesDaniel Stenberg
Adds CURLOPT_TLS13_CIPHERS and CURLOPT_PROXY_TLS13_CIPHERS. curl: added --tls13-ciphers and --proxy-tls13-ciphers Fixes #2435 Reported-by: zzq1015 on github Closes #2607
2018-05-24httpauth: add support for Bearer tokensLinus Lewandowski
Closes #2102
2018-05-24cmake: set -d postfix for debug builds if not specifiedSergei Nikulov
using -DCMAKE_DEBUG_POSTFIX explicitly fixes #2121, obsoletes #2384
2018-05-21checksrc: make sure sizeof() is used *with* parenthesesDaniel Stenberg
... and unify the source code to adhere. Closes #2563
2018-05-21curl: added --styled-outputDaniel Stenberg
It is enabled by default, so --no-styled-output will switch off the detection/use of bold headers. Closes #2538
2018-05-21curl: show headers in boldDaniel Stenberg
The feature is only enabled if the output is believed to be a tty. -J: There's some minor differences and improvements in -J handling, as now J should work with -i and it actually creates a file first using the initial name and then *renames* that to the one found in Content-Disposition (if any). -i: only shows headers for HTTP transfers now (as documented). Previously it would also show for pieces of the transfer that were HTTP (for example when doing FTP over a HTTP proxy). -i: now shows trailers as well. Previously they were not shown at all. --libcurl: the CURLOPT_HEADER is no longer set, as the header output is now done in the header callback.
2018-05-18checksrc: fix too long lineDaniel Stenberg
follow-up to e05ad5d
2018-05-18docs: mention HAproxy protocol "version 1"Aleks
...as there's also a version 2. Closes #2579
2018-05-14gcc: disable picky gcc-8 function pointer warnings in two placesDaniel Stenberg
Reported-by: Rikard Falkeborn Bug: #2560 Closes #2569
2018-05-14tool: Fix format specifiersRikard Falkeborn
2018-04-27checksrc: force indentation of lines after an elseDaniel Gustafsson
This extends the INDENTATION case to also handle 'else' statements and require proper indentation on the following line. Also fixes the offending cases found in the codebase. Closes #2532
2018-04-21tool_help: clarify --max-time unit of time is secondsJay Satiro
Before: -m, --max-time <time> Maximum time allowed for the transfer After: -m, --max-time <seconds> Maximum time allowed for the transfer
2018-04-18schannel: add support for CURLOPT_CAINFODan McNulty
- Move verify_certificate functionality in schannel.c into a new file called schannel_verify.c. Additionally, some structure defintions from schannel.c have been moved to schannel.h to allow them to be used in schannel_verify.c. - Make verify_certificate functionality for Schannel available on all versions of Windows instead of just Windows CE. verify_certificate will be invoked on Windows CE or when the user specifies CURLOPT_CAINFO and CURLOPT_SSL_VERIFYPEER. - In verify_certificate, create a custom certificate chain engine that exclusively trusts the certificate store backed by the CURLOPT_CAINFO file. - doc updates of --cacert/CAINFO support for schannel - Use CERT_NAME_SEARCH_ALL_NAMES_FLAG when invoking CertGetNameString when available. This implements a TODO in schannel.c to improve handling of multiple SANs in a certificate. In particular, all SANs will now be searched instead of just the first name. - Update tool_operate.c to not search for the curl-ca-bundle.crt file when using Schannel to maintain backward compatibility. Previously, any curl-ca-bundle.crt file found in that search would have been ignored by Schannel. But, with CAINFO support, the file found by that search would have been used as the certificate store and could cause issues for any users that have curl-ca-bundle.crt in the search path. - Update url.c to not set the build time CURL_CA_BUNDLE if the selected SSL backend is Schannel. We allow setting CA location for schannel only when explicitly specified by the user via CURLOPT_CAINFO / --cacert. - Add new test cases 3000 and 3001. These test cases check that the first and last SAN, respectively, matches the connection hostname. New test certificates have been added for these cases. For 3000, the certificate prefix is Server-localhost-firstSAN and for 3001, the certificate prefix is Server-localhost-secondSAN. - Remove TODO 15.2 (Add support for custom server certificate validation), this commit addresses it. Closes https://github.com/curl/curl/pull/1325
2018-04-15all: Refactor malloc+memset to use callocDaniel Gustafsson
When a zeroed out allocation is required, use calloc() rather than malloc() followed by an explicit memset(). The result will be the same, but using calloc() everywhere increases consistency in the codebase and avoids the risk of subtle bugs when code is injected between malloc and memset by accident. Closes https://github.com/curl/curl/pull/2497
2018-04-07tool_operate: Fix retry on FTP 4xx to ignore other protocolsStefan Agner
Only treat response code as FTP response codes in case the protocol type is FTP. This fixes an issue where an HTTP download was treated as FTP in case libcurl returned with 33. This happens when the download has already finished and the server responses 416: HTTP/1.1 416 Requested Range Not Satisfiable This should not be treated as an FTP error. Fixes #2464 Closes #2465
2018-03-17CURLOPT_HAPROXYPROTOCOL: support the HAProxy PROXY protocolLawrence Matthews
Add --haproxy-protocol for the command line tool Closes #2162
2018-03-16cleanup: misc typos in strings and commentsluz.paz
Found via `codespell` Closes #2389
2018-03-08curl tool: accept --compressed also if Brotli is enabled and zlib is not.Patrick Monnerat
2018-02-23spelling fixesViktor Szakats
Detected using the `codespell` tool. Also contains one URL protocol upgrade. Closes https://github.com/curl/curl/pull/2334
2018-02-21lib: CURLOPT_HAPPY_EYEBALLS_TIMEOUT => CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MSJay Satiro
- In keeping with the naming of our other connect timeout options rename CURLOPT_HAPPY_EYEBALLS_TIMEOUT to CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS. This change adds the _MS suffix since the option expects milliseconds. This is more intuitive for our users since other connect timeout options that expect milliseconds use _MS such as CURLOPT_TIMEOUT_MS, CURLOPT_CONNECTTIMEOUT_MS, CURLOPT_ACCEPTTIMEOUT_MS. The tool option already uses an -ms suffix, --happy-eyeballs-timeout-ms. Follow-up to 2427d94 which added the lib and tool option yesterday. Ref: https://github.com/curl/curl/pull/2260
2018-02-20url: Add option CURLOPT_HAPPY_EYEBALLS_TIMEOUTAnders Bakken
- Add new option CURLOPT_HAPPY_EYEBALLS_TIMEOUT to set libcurl's happy eyeball timeout value. - Add new optval macro CURL_HET_DEFAULT to represent the default happy eyeballs timeout value (currently 200 ms). - Add new tool option --happy-eyeballs-timeout-ms to expose CURLOPT_HAPPY_EYEBALLS_TIMEOUT. The -ms suffix is used because the other -timeout options in the tool expect seconds not milliseconds. Closes https://github.com/curl/curl/pull/2260
2018-02-18curl --version: show PSL if the run-time lib has it enabledDaniel Stenberg
... not of the #define was set at build-time!
2018-02-05time-cond: fix reading the file modification time on WindowsMichael Kaufmann
On Windows, stat() may adjust the unix file time by a daylight saving time offset. Avoid this by calling GetFileTime() instead. Fixes #2164 Closes #2204
2018-02-01build: fix termios issue on android cross-compileBen Greear
Bug: https://curl.haxx.se/mail/lib-2018-01/0122.html Signed-off-by: Ben Greear <greearb@candelatech.com>
2018-01-30curl: add --proxy-pinnedpubkeyDaniel Stenberg
To verify a proxy's public key. For when using HTTPS proxies. Fixes #2192 Closes #2268
2018-01-29curl_ctype: private is*() type macros and functionsDaniel Stenberg
... since the libc provided one are locale dependent in a way we don't want. Also, the "native" isalnum() (for example) works differently on different platforms which caused test 1307 failures on macos only. Closes #2269
2018-01-24progress-bar: don't use stderr explicitly, use bar->outDaniel Stenberg
Reported-By: Gisle Vanem Bug: https://github.com/curl/curl/commit/993dd5651a6c853bfe3870f6a69c7b329fa4e8ce#commitcomment-27070080
2018-01-24Fixes for MSDOS etc.Gisle Vanem
djgpp do have 'mkdir(dir, mode)'. Other DOS-compilers does not But djgpp seems the only choice for MSDOS anyway. PellesC do have a 'F_OK' defined in it's <unistd.h>. Update year in Copyright.
2018-01-23progress-bar: get screen width on windowsGisle Vanem
2018-01-22curl: progress bar refresh, get width using ioctl()Daniel Stenberg
Get screen width from the environment variable COLUMNS first, if set. If not, use ioctl(). If nether works, assume 79. Closes #2242 The "refresh" is for the -# output when no total transfer size is known. It will now only use a single updated line even for this case: The "-=O=-" ship moves when data is transferred. The four flying "hashes" move (on a sine wave) on each refresh, independent of data.
2018-01-07mail-rcpt.d: fix short-text descriptionJay Satiro
2017-12-26tool_getparam: Support size modifiers for --max-filesizeGisle Vanem
- Move the size modifier detection code from limit-rate to its own function so that it can also be used with max-filesize. Size modifiers are the suffixes such as G (gigabyte), M (megabyte) etc. For example --max-filesize 1G Ref: https://curl.haxx.se/mail/archive-2017-12/0000.html Closes https://github.com/curl/curl/pull/2179
2017-12-12curl: support >256 bytes warning messsagesDaniel Stenberg
Bug: #2174
2017-12-11Revert "curl: don't set CURLOPT_INTERLEAVEDATA"Daniel Stenberg
This reverts commit 9ffad8eb1329bb35c8988115ac7ed85cf91ef955. It was actually added rather recently in 8e8afa82cbb629 due to a crash that would otherwise happen in the RTSP code. As I don't think we've fixed that behavior yet, we better keep this work-around until we have fixed it better.
2017-12-08curl: remove __EMX__ #ifdefsDaniel Stenberg
These are OS/2-specific things added to the code in the year 2000. They were always ugly. If there's any user left, they still don't need it done this way. Closes #2166
2017-12-08curl: don't set CURLOPT_INTERLEAVEDATADaniel Stenberg
That data is only ever used by the CURLOPT_INTERLEAVEFUNCTION callback and that option isn't set or used by the curl tool! Updates the 9 tests that verify --libcurl Closes #2167
2017-12-07curl: limit -# update frequency for unknown total sizeDaniel Stenberg
Make it use a max 10Hz update frequency for this case as well. Return early if the "point" hasn't moved since last invoke. Reported-by: Elliot Saba Fixes #2158 Closes #2163
2017-11-24metalink: fix memory-leak and NULL pointer dereferenceDaniel Stenberg
Reported by scan-build Closes #2109
2017-11-10cmake: Correctly include curl.rc in Windows builds (#2064)John Starks
Update CMakeLists.txt to add curl.rc to the correct list.
2017-11-06src/Makefile.m32: fix typo in brotli lib customizationViktor Szakats
Ref cc1f4436099decb9d1a7034b2bb773a9f8379d31