Commit Graph

22757 Commits

Author SHA1 Message Date
Jay Satiro a0f3eaf25d examples/cacertinmem: ignore cert-already-exists error
- Ignore X509_R_CERT_ALREADY_IN_HASH_TABLE errors in the CTX callback
  since it's possible the cert may have already been loaded by libcurl.

- Remove the EXAMPLE code in the CURLOPT_SSL_CTX_FUNCTION.3 doc.
  Instead have it direct the reader to this cacertinmem.c example.

- Fix the CA certificate to use the right CA for example.com, Digicert.

Bug: https://curl.haxx.se/mail/lib-2017-12/0057.html
Reported-by: Thomas van Hesteren

Closes https://github.com/curl/curl/pull/2182
2017-12-26 02:08:35 -05:00
Gisle Vanem 859ac36021 tool_getparam: Support size modifiers for --max-filesize
- 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-26 02:01:48 -05:00
Steve Holme b399b04902 build: Fixed incorrect script termination from commit ad1dc10e61 2017-12-22 20:21:40 +00:00
Steve Holme a9b774a773 Makefile.vc: Added our standard copyright header 2017-12-22 18:49:37 +00:00
Steve Holme 22fddb85ac winbuild: Added support for VC15 2017-12-22 18:44:35 +00:00
Steve Holme ad1dc10e61 build: Added Visual Studio 2017 project files 2017-12-22 17:58:41 +00:00
Steve Holme d409640d66 build-wolfssl.bat: Added support for VC15 2017-12-22 16:08:54 +00:00
Steve Holme a4e88317dd build-openssl.bat: Added support for VC15 2017-12-22 15:44:19 +00:00
Dimitrios Apostolou c97648b550 curl/system.h: fix compilation with gcc on AIX PPC and IA64 HP-UX
Closes https://github.com/curl/curl/pull/2186
2017-12-22 03:04:36 -05:00
Mattias Fornander b437557896 examples/rtsp: fix error handling macros
Closes https://github.com/curl/curl/pull/2185
2017-12-22 02:59:08 -05:00
Patrick Monnerat f009bbe1f6 curl_easy_reset: release mime-related data.
Move curl_mime_initpart() and curl_mime_cleanpart() calls to lower-level
functions dealing with UserDefined structure contents.
This avoids memory leakages on curl-generated part mime headers.
New test 2073 checks this using the cli tool --next option: it
triggers a valgrind error if bug is present.

Bug: https://curl.haxx.se/mail/lib-2017-12/0060.html
Reported-by: Martin Galvan
2017-12-20 19:33:50 +01:00
Patrick Monnerat 4acc9d3d1a content_encoding: rework zlib_inflate
- When zlib version is < 1.2.0.4, process gzip trailer before considering
extra data as an error.
- Inflate with Z_BLOCK instead of Z_SYNC_FLUSH to maximize correct data
and minimize corrupt data output.
- Do not try to restart deflate decompression in raw mode if output has
started or if the leading data is not available anymore.
- New test 232 checks inflating raw-deflated content.

Closes #2068
2017-12-20 16:02:42 +01:00
Patrick Monnerat e639d4ca4d brotli: allow compiling with version 0.6.0.
Some error codes were not yet defined in brotli 0.6.0: do not issue code
for them in this case.
2017-12-20 15:30:35 +01:00
Daniel Stenberg 9c6a6be882
CURLOPT_READFUNCTION.3: refer to argument with correct name
Bug: #2175

[ci skip]
2017-12-13 08:18:10 +01:00
Daniel Stenberg 02f207a76b
rand: add a clang-analyzer work-around
scan-build would warn on a potential access of an uninitialized
buffer. I deem it a false positive and had to add this somewhat ugly
work-around to silence it.
2017-12-13 00:45:42 +01:00
Daniel Stenberg 13ce373a5b
krb5: fix a potential access of uninitialized memory
A scan-build warning.
2017-12-13 00:36:39 +01:00
Daniel Stenberg 41982b6ac9
conncache: fix a return code [regression]
This broke in 07cb27c98e. Make sure to return 'result' properly. Pointed
out by scan-build!
2017-12-12 23:54:35 +01:00
Daniel Stenberg 5d0ba70e17
curl: support >256 bytes warning messsages
Bug: #2174
2017-12-12 19:59:29 +01:00
Michael Kaufmann 188a43a8fd libssh: fix a syntax error in configure.ac
Follow-up to c92d2e1

Closes #2172
2017-12-12 17:46:24 +01:00
Daniel Stenberg 7ef0c2d861
examples/smtp-mail.c: use separate defines for options and mail
... to make it clearer that the options want address-only, while the
headers in an email can also have the real name.

Assisted-by: Sean MacLennan
2017-12-12 15:28:05 +01:00
Daniel Stenberg 621b24505f
THANKS: added missing names
... as I reran the contrithanks script after the mailmap name fixups.
2017-12-12 08:46:29 +01:00
Daniel Stenberg cc0cca1baf
mailmap: added/clarified several names 2017-12-12 08:37:13 +01:00
Daniel Stenberg 9d7a59c8fa
setopt: less *or equal* than INT_MAX/1000 should be fine
... for the CURLOPT_TIMEOUT, CURLOPT_CONNECTTIMEOUT and
CURLOPT_SERVER_RESPONSE_TIMEOUT range checks.

Reported-by: Dominik Hölzl
Bug: https://curl.haxx.se/mail/lib-2017-12/0037.html

Closes #2173
2017-12-12 08:02:17 +01:00
dmitrykos 2437dbbf12
vtls: replaced getenv() with curl_getenv()
Fixed undefined symbol of getenv() which does not exist when compiling
for Windows 10 App (CURL_WINDOWS_APP). Replaced getenv() with
curl_getenv() which is aware of getenv() absence when CURL_WINDOWS_APP
is defined.

Closes #2171
2017-12-12 08:02:07 +01:00
Daniel Stenberg ef5633d4b3
RELEASE-NOTES: synced with 3b9ea70ee 2017-12-11 13:52:49 +01:00
Daniel Stenberg 3b9ea70ee7
TODO: Expose tried IP addresses that failed
Suggested-by: Rainer Canavan

Closes #2126
2017-12-11 13:41:03 +01:00
Daniel Stenberg 48c184a604
curl.1: mention http:// and https:// as valid proxy prefixes 2017-12-11 13:24:42 +01:00
Daniel Stenberg 76db03dd9a
curl.1: documented two missing valid exit codes 2017-12-11 13:11:47 +01:00
Daniel Stenberg 63e58b8b40
CURLOPT_DNS_LOCAL_IP4.3: fixed the seel also to not self-reference 2017-12-11 00:00:17 +01:00
Daniel Stenberg 671f0b506c
Revert "curl: don't set CURLOPT_INTERLEAVEDATA"
This reverts commit 9ffad8eb13.

It was actually added rather recently in 8e8afa82cb 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-11 00:00:17 +01:00
Michael Kaufmann 4b6f3cff7c tests: mark data files as non-executable in git 2017-12-10 22:36:42 +01:00
Michael Kaufmann 98c572ed3c tests: update .gitignore for libtests 2017-12-10 22:35:16 +01:00
Daniel Stenberg e959f16c5f
multi_done: prune DNS cache
Prune the DNS cache immediately after the dns entry is unlocked in
multi_done. Timed out entries will then get discarded in a more orderly
fashion.

Test506 is updated

Reported-by: Oleg Pudeyev

Fixes #2169
Closes #2170
2017-12-10 14:51:47 +01:00
Daniel Stenberg 06a0a26fb6
mailmap: fixup two old git Author "aliases" 2017-12-10 11:23:20 +01:00
Jay Satiro 7ab4e7adb9 openssl: Disable file buffering for Win32 SSLKEYLOGFILE
Prior to this change SSLKEYLOGFILE used line buffering on WIN32 just
like it does for other platforms. However, the Windows CRT does not
actually support line buffering (_IOLBF) and will use full buffering
(_IOFBF) instead. We can't use full buffering because multiple processes
may be writing to the file and that could lead to corruption, and since
full buffering is the only buffering available this commit disables
buffering for Windows SSLKEYLOGFILE entirely (_IONBF).

Ref: https://github.com/curl/curl/pull/1346#issuecomment-350530901
2017-12-10 02:48:41 -05:00
Daniel Stenberg b1b94305d8
RESOLVE: output verbose text when trying to set a duplicate name
... to help users understand what is or isn't done!
2017-12-10 00:41:57 +01:00
Daniel Stenberg bbea75ad69
CURLOPT_DNS_CACHE_TIMEOUT.3: see also CURLOPT_RESOLVE 2017-12-09 23:34:07 +01:00
John DeHelian a4a56ec93e
sftp: allow quoted commands to use relative paths
Closes #1900
2017-12-09 13:38:38 +01:00
richardthe3rd 9fb5a943f5 CURLOPT_PRIVATE.3: fix grammar
- Change "never does nothing" double-negative to "never does anything".

Closes https://github.com/curl/curl/pull/2168
2017-12-08 18:55:33 -05:00
Daniel Stenberg 179ee78e86
curl: remove __EMX__ #ifdefs
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-08 23:45:16 +01:00
Jay Satiro 9dfb194833 openssl: improve data-pending check for https proxy
- Allow proxy_ssl to be checked for pending data even when connssl does
  not yet have an SSL handle.

This change is for posterity. Currently there doesn't seem to be a code
path that will cause a pending data check when proxyssl could have
pending data and the connssl handle doesn't yet exist [1].

[1]: Recall that an https proxy connection starts out in connssl but if
the destination is also https then the proxy SSL backend data is moved
from connssl to proxyssl, which means connssl handle is temporarily
empty until an SSL handle for the destination can be created.

Ref: https://github.com/curl/curl/commit/f4a6238#commitcomment-24396542

Closes https://github.com/curl/curl/pull/1916
2017-12-08 17:43:36 -05:00
Daniel Stenberg 9ffad8eb13
curl: don't set CURLOPT_INTERLEAVEDATA
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-08 23:40:54 +01:00
Daniel Stenberg 912324024b
curl.h: remove incorrect comment about ERRORBUFFER
... error messages are _not_ sent to stderr if this is not set.
2017-12-08 16:56:06 +01:00
Michael Felt ebaab4d17d
configure: add AX_CODE_COVERAGE only if using gcc
Fixes #2076
Closes #2125
2017-12-08 15:26:44 +01:00
Daniel Stenberg b5881d1fbd
curl: limit -# update frequency for unknown total size
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-12-07 17:33:46 +01:00
Daniel Stenberg 546e7db78c
BINDINGS: another PostgreSQL client
...the former link is dead.

Reported-by: Frank Gevaerts
2017-12-07 11:10:22 +01:00
Zachary Seguin 55e609890f
CONNECT: keep close connection flag in http_connect_state struct
Fixes #2088
Closes #2157
2017-12-07 09:48:33 +01:00
Per Malmberg c103cac3c8
include: get netinet/in.h before linux/tcp.h
... to allow build on older Linux dists (specifically CentOS 4.8 on gcc
4.8.5)

Closes #2160
2017-12-07 08:15:44 +01:00
Daniel Stenberg 00cda0f9b3
openldap: fix checksrc nits 2017-12-06 14:58:26 +01:00
Stepan Broz ff07f07cc8
openldap: add commented out debug possibilities
... to aid debugging openldap library using its built-in debug messages.

Closes #2159
2017-12-06 14:51:04 +01:00