]> granicus.if.org Git - curl/log
curl
10 years agopipelining: only output "is not blacklisted" in debug builds
Daniel Stenberg [Fri, 24 Oct 2014 09:12:34 +0000 (11:12 +0200)]
pipelining: only output "is not blacklisted" in debug builds

10 years ago*.3: add/extend "SEE ALSO" sections
Daniel Stenberg [Fri, 24 Oct 2014 07:19:29 +0000 (09:19 +0200)]
*.3: add/extend "SEE ALSO" sections

10 years agocurl_easy_pause.3: minor wording edit
Daniel Stenberg [Fri, 24 Oct 2014 07:16:06 +0000 (09:16 +0200)]
curl_easy_pause.3: minor wording edit

10 years agocurl_getdate.3: provide a "SEE ALSO" section
Daniel Stenberg [Fri, 24 Oct 2014 07:12:17 +0000 (09:12 +0200)]
curl_getdate.3: provide a "SEE ALSO" section

10 years agocurl_global_init.3: minor formatting fix, add version info
Daniel Stenberg [Fri, 24 Oct 2014 07:08:22 +0000 (09:08 +0200)]
curl_global_init.3: minor formatting fix, add version info

10 years agourl.c: use 'CURLcode result'
Daniel Stenberg [Fri, 24 Oct 2014 06:51:04 +0000 (08:51 +0200)]
url.c: use 'CURLcode result'

10 years agocode cleanup: we prefer 'CURLcode result'
Daniel Stenberg [Thu, 23 Oct 2014 20:56:35 +0000 (22:56 +0200)]
code cleanup: we prefer 'CURLcode result'

... for the local variable name in functions holding the return
code. Using the same name universally makes code easier to read and
follow.

Also, unify code for checking for CURLcode errors with:

 if(result) or if(!result)

instead of

 if(result == CURLE_OK), if(CURLE_OK == result) or if(result != CURLE_OK)

10 years agoCurl_add_timecondition: skip superfluous varible assignment
Daniel Stenberg [Thu, 23 Oct 2014 20:48:49 +0000 (22:48 +0200)]
Curl_add_timecondition: skip superfluous varible assignment

Detected by cppcheck.

10 years agoCurl_pp_flushsend: skip superfluous assignment
Daniel Stenberg [Thu, 23 Oct 2014 20:46:10 +0000 (22:46 +0200)]
Curl_pp_flushsend: skip superfluous assignment

Detected by cppcheck.

10 years agoCurl_pp_readresp: remove superfluous assignment
Daniel Stenberg [Thu, 23 Oct 2014 20:42:15 +0000 (22:42 +0200)]
Curl_pp_readresp: remove superfluous assignment

Variable already assigned a few lines up.

Detected by cppcheck.

10 years agoCurl_proxyCONNECT: remove superfluous statement
Daniel Stenberg [Thu, 23 Oct 2014 20:40:23 +0000 (22:40 +0200)]
Curl_proxyCONNECT: remove superfluous statement

The variable is already assigned, skip the duplicate assignment.

Pointed out by cppcheck.

10 years agoAdded MinGW support to build with nghttp2.
Guenter Knauf [Fri, 24 Oct 2014 02:22:04 +0000 (04:22 +0200)]
Added MinGW support to build with nghttp2.

10 years agoAdded VC ssh2 target to main Makefile.
Guenter Knauf [Thu, 23 Oct 2014 17:30:19 +0000 (19:30 +0200)]
Added VC ssh2 target to main Makefile.

10 years agoSome cosmetics and simplifies.
Guenter Knauf [Thu, 23 Oct 2014 14:27:40 +0000 (16:27 +0200)]
Some cosmetics and simplifies.

10 years agoRemove dependency on openssl and cut.
Guenter Knauf [Thu, 23 Oct 2014 13:18:05 +0000 (15:18 +0200)]
Remove dependency on openssl and cut.

Prefer usage of Perl modules for sha1 calculation since there
might be systems where openssl is not installed or not in path.
If openssl is used for sha1 calculation then dont rely on cut
since it is usually not available on other systems than Linux.

10 years agoRELEASE-NOTES: synced with e116d0a62
Daniel Stenberg [Thu, 23 Oct 2014 13:12:42 +0000 (15:12 +0200)]
RELEASE-NOTES: synced with e116d0a62

10 years agoCURLOPT_RESOLVE.3: add an example
Daniel Stenberg [Thu, 23 Oct 2014 12:34:41 +0000 (14:34 +0200)]
CURLOPT_RESOLVE.3: add an example

10 years agognutls: removed dead code
Daniel Stenberg [Thu, 23 Oct 2014 08:01:58 +0000 (10:01 +0200)]
gnutls: removed dead code

Bug: http://curl.haxx.se/bug/view.cgi?id=1437
Reported-by: Julien
10 years agoCurl_rand: Uninitialized variable: r
Daniel Stenberg [Thu, 23 Oct 2014 08:00:39 +0000 (10:00 +0200)]
Curl_rand: Uninitialized variable: r

This is not actually used uninitialized but we silence warnings.

Bug: http://curl.haxx.se/bug/view.cgi?id=1437
Reported-by: Julien
10 years agoopts: provide more and updated examples
Daniel Stenberg [Tue, 21 Oct 2014 11:40:38 +0000 (13:40 +0200)]
opts: provide more and updated examples

10 years agoCURLOPT_RANGE.3: works for SFTP as well
Daniel Stenberg [Tue, 21 Oct 2014 11:06:22 +0000 (13:06 +0200)]
CURLOPT_RANGE.3: works for SFTP as well

... and added a small example

10 years agocurl.1: edited for clarity
Daniel Stenberg [Tue, 21 Oct 2014 09:57:13 +0000 (11:57 +0200)]
curl.1: edited for clarity

10 years agoCURLOPT_SSLVERSION.3: provide an example
Daniel Stenberg [Tue, 21 Oct 2014 09:10:03 +0000 (11:10 +0200)]
CURLOPT_SSLVERSION.3: provide an example

10 years agodocs/libcurl/ABI: more markdown friendly
Daniel Stenberg [Tue, 21 Oct 2014 08:43:12 +0000 (10:43 +0200)]
docs/libcurl/ABI: more markdown friendly

10 years agodocs: edited lots of libcurl docs for clarity
Daniel Stenberg [Tue, 21 Oct 2014 08:26:40 +0000 (10:26 +0200)]
docs: edited lots of libcurl docs for clarity

10 years agoopts: added examples
Daniel Stenberg [Tue, 21 Oct 2014 06:58:03 +0000 (08:58 +0200)]
opts: added examples

10 years agoHISTORY: two glimpses in 2014
Daniel Stenberg [Tue, 21 Oct 2014 06:57:48 +0000 (08:57 +0200)]
HISTORY: two glimpses in 2014

10 years agonss: reset SSL handshake state machine
Kamil Dudka [Mon, 20 Oct 2014 16:18:57 +0000 (18:18 +0200)]
nss: reset SSL handshake state machine

... when the handshake succeeds

This fixes a connection failure when FTPS handle is reused.

10 years agocmake: generate pkg-config and curl-config
Peter Wu [Tue, 14 Oct 2014 09:38:17 +0000 (11:38 +0200)]
cmake: generate pkg-config and curl-config

Initial work to generate a pkg-config and curl-config script. Static
linking (`curl-config --static-libs` and `pkg-config --shared --libs
libcurl`) is broken and therefore disabled.

CONFIGURE_OPTIONS does not make sense for CMake, use an empty string
for now.

At least `curl-config --features` and `curl-config --protocols` work
which is needed by runtests.pl.

Signed-off-by: Peter Wu <peter@lekensteyn.nl>
10 years agocmake: use LIBCURL_VERSION from curlver.h
Peter Wu [Tue, 14 Oct 2014 09:38:16 +0000 (11:38 +0200)]
cmake: use LIBCURL_VERSION from curlver.h

This matches the behavior from autotools. The auxiliary major, minor
and patch components are not needed anymore and therefore removed.

Signed-off-by: Peter Wu <peter@lekensteyn.nl>
10 years agocmake: add SUPPORT_FEATURES and SUPPORT_PROTOCOLS
Peter Wu [Tue, 14 Oct 2014 09:38:15 +0000 (11:38 +0200)]
cmake: add SUPPORT_FEATURES and SUPPORT_PROTOCOLS

For compatibility with autoconf, it will be used later for curl-config
and pkg-config. Not all features and or protocols can be enabled as
these are missing additional checks (see new TODOs).

SUPPORT_PROTOCOLS is partially scripted (grep for SUPPORT_PROTOCOLS=)
and manually verified/modified. SUPPORT_FEATURES is manually added.

Signed-off-by: Peter Wu <peter@lekensteyn.nl>
10 years agocmake: add CMake/Macros.cmake to the release tarball
Daniel Stenberg [Fri, 17 Oct 2014 20:55:21 +0000 (22:55 +0200)]
cmake: add CMake/Macros.cmake to the release tarball

10 years agotest545: make it not use a trailing zero
Daniel Stenberg [Thu, 16 Oct 2014 21:39:28 +0000 (23:39 +0200)]
test545: make it not use a trailing zero

CURLOPT_COPYPOSTFIELDS with a given CURLOPT_POSTFIELDSIZE does not
require a trailing zero of the data and by making sure this test doesn't
use one we know it works (combined with valgrind).

10 years agontlm: Fixed empty type-2 decoded message info text
Steve Holme [Thu, 16 Oct 2014 19:28:30 +0000 (20:28 +0100)]
ntlm: Fixed empty type-2 decoded message info text

Updated the info text when the base-64 decode of the type-2 message
returns a null buffer to be more specific.

10 years agontlm: Fixed empty/bad base-64 decoded buffer return codes
Steve Holme [Thu, 16 Oct 2014 19:25:15 +0000 (20:25 +0100)]
ntlm: Fixed empty/bad base-64 decoded buffer return codes

10 years agontlm: Avoid unnecessary buffer allocation for SSPI based type-2 token
Steve Holme [Thu, 16 Oct 2014 19:22:20 +0000 (20:22 +0100)]
ntlm: Avoid unnecessary buffer allocation for SSPI based type-2 token

10 years agohttpcustomheader.c: make use of more CURLOPT_HTTPHEADER features
Daniel Stenberg [Thu, 16 Oct 2014 09:37:52 +0000 (11:37 +0200)]
httpcustomheader.c: make use of more CURLOPT_HTTPHEADER features

... and only do a single request for clarity.

10 years agosasl_sspi: Fixed some typos
Steve Holme [Wed, 15 Oct 2014 20:48:59 +0000 (21:48 +0100)]
sasl_sspi: Fixed some typos

10 years agosasl_sspi: Fixed Kerberos response buffer not being allocated when using SSO
Steve Holme [Wed, 15 Oct 2014 20:20:25 +0000 (21:20 +0100)]
sasl_sspi: Fixed Kerberos response buffer not being allocated when using SSO

10 years agomk-ca-bundle: added SHA-384 signature algorithm
Bruno Thomsen [Wed, 15 Oct 2014 10:48:27 +0000 (12:48 +0200)]
mk-ca-bundle: added SHA-384 signature algorithm

Certificates based on SHA-1 are being phased out[1].
So we should expect a rise in certificates based on SHA-2.
Adding SHA-384 as a valid signature algorithm.

[1] https://blog.mozilla.org/security/2014/09/23/phasing-out-certificates-with-sha-1-based-signature-algorithms/

Signed-off-by: Bruno Thomsen <bth@kamstrup.dk>
10 years agoOS400: fix bugs in curl_*escape_ccsid() and reduce variables scope
Patrick Monnerat [Tue, 14 Oct 2014 13:43:25 +0000 (15:43 +0200)]
OS400: fix bugs in curl_*escape_ccsid() and reduce variables scope

10 years agoImplement pinned public key in GSKit backend
Patrick Monnerat [Tue, 14 Oct 2014 12:58:26 +0000 (14:58 +0200)]
Implement pinned public key in GSKit backend

10 years agoCURLOPT_TLSAUTH_*.3: fix reference typos
Daniel Stenberg [Tue, 14 Oct 2014 08:23:27 +0000 (10:23 +0200)]
CURLOPT_TLSAUTH_*.3: fix reference typos

10 years agocleanups: reduce variable scope
Daniel Stenberg [Tue, 14 Oct 2014 07:44:06 +0000 (09:44 +0200)]
cleanups: reduce variable scope

cppcheck pointed these out.

10 years agosingleipconnect: remove dead assignment never used
Daniel Stenberg [Tue, 14 Oct 2014 07:16:16 +0000 (09:16 +0200)]
singleipconnect: remove dead assignment never used

cppcheck pointed this out.

10 years agopinning: minor code style policing
Daniel Stenberg [Mon, 13 Oct 2014 20:22:49 +0000 (22:22 +0200)]
pinning: minor code style policing

10 years agoFactorize pinned public key code into generic file handling and backend specific
Patrick Monnerat [Mon, 13 Oct 2014 16:34:51 +0000 (18:34 +0200)]
Factorize pinned public key code into generic file handling and backend specific

10 years agovtls: remove QsoSSL
Patrick Monnerat [Mon, 13 Oct 2014 14:33:47 +0000 (16:33 +0200)]
vtls: remove QsoSSL

10 years agogskit: supply dummy randomization function
Patrick Monnerat [Mon, 13 Oct 2014 13:02:58 +0000 (15:02 +0200)]
gskit: supply dummy randomization function

10 years agovtls/*: deprecate have_curlssl_md5sum and set-up default md5sum implementation
Patrick Monnerat [Mon, 13 Oct 2014 12:39:50 +0000 (14:39 +0200)]
vtls/*: deprecate have_curlssl_md5sum and set-up default md5sum implementation

10 years agotests: move TESTCASES to Makefile.inc, add show for cmake
Peter Wu [Sun, 12 Oct 2014 22:00:39 +0000 (00:00 +0200)]
tests: move TESTCASES to Makefile.inc, add show for cmake

This change allows runtests.pl to be run from the CMake builddir:

    export srcdir=/tmp/curl/tests;
    perl -I$srcdir $srcdir/runtests.pl -l

In order to make this possible, all test cases have been moved from
Makefile.am to Makefile.inc.

Signed-off-by: Peter Wu <peter@lekensteyn.nl>
10 years agocmake: enable IPv6 by default if available
Peter Wu [Mon, 13 Oct 2014 09:19:36 +0000 (11:19 +0200)]
cmake: enable IPv6 by default if available

ENABLE_IPV6 depends on HAVE_GETADDRINFO or you will get a
Curl_getaddrinfo_ex error. Enable IPv6 by default, disabling it if
struct sockaddr_in6 is not found in netinet/in.h.

Note that HAVE_GETADDRINFO_THREADSAFE is still not set as it needs more
platform checks even though POSIX requires a thread-safe getaddrinfo.

Verified on Arch Linux x86_64 with glibc 2.20-2 and Linux 3.16-rc7.

Signed-off-by: Peter Wu <peter@lekensteyn.nl>
10 years agocmake: build tool_hugehelp (ENABLE_MANUAL)
Peter Wu [Sun, 12 Oct 2014 09:27:07 +0000 (11:27 +0200)]
cmake: build tool_hugehelp (ENABLE_MANUAL)

Rather than always outputting an empty manual page for the '-M' option,
generate a full manual page as done by autotools. For simplicity in
CMake, always generate the gzipped page as it will not be used anyway
when zlib is not available.

Signed-off-by: Peter Wu <peter@lekensteyn.nl>
10 years agotests/http_pipe.py: Python 3 support
Peter Wu [Fri, 10 Oct 2014 14:15:42 +0000 (16:15 +0200)]
tests/http_pipe.py: Python 3 support

The 2to3 tool converted socketserver (which I manually fixed up with an
import fallback) and the print(e) line. The xrange option was converted
to range, but it seems better to use the '*' operator here for
simplicity.

Signed-off-by: Peter Wu <peter@lekensteyn.nl>
10 years agoSECURITY: slightly nicer markdown format
Daniel Stenberg [Fri, 10 Oct 2014 08:50:23 +0000 (10:50 +0200)]
SECURITY: slightly nicer markdown format

10 years agoRELEASE-PROCEDURE: better markdown, more content
Daniel Stenberg [Fri, 10 Oct 2014 08:39:01 +0000 (10:39 +0200)]
RELEASE-PROCEDURE: better markdown, more content

10 years agoRELEASE-NOTES: synced with 6637b237e6eb
Daniel Stenberg [Thu, 9 Oct 2014 21:55:17 +0000 (23:55 +0200)]
RELEASE-NOTES: synced with 6637b237e6eb

... and bumped the planned release version.

10 years agovtls: have vtls.h include the backend header files
Daniel Stenberg [Thu, 9 Oct 2014 20:34:34 +0000 (22:34 +0200)]
vtls: have vtls.h include the backend header files

It turned out some features were not enabled in the build since for
example url.c #ifdefs on features that are defined on a per-backend
basis but vtls.h didn't include the backend headers.

CURLOPT_CERTINFO was one such feature that was accidentally disabled.

10 years agotest2036: verify -O with no slash at all in the URL
Daniel Stenberg [Thu, 9 Oct 2014 14:50:26 +0000 (16:50 +0200)]
test2036: verify -O with no slash at all in the URL

Similar to test 76 but that test's URL has a slash just no file name
part.

10 years agoget_url_file_name: make no slash equal empty string
Daniel Stenberg [Thu, 9 Oct 2014 14:42:17 +0000 (16:42 +0200)]
get_url_file_name: make no slash equal empty string

10 years agoget_url_file_name: never return a NULL string *and* OK
Daniel Stenberg [Thu, 9 Oct 2014 14:37:11 +0000 (16:37 +0200)]
get_url_file_name: never return a NULL string *and* OK

Change 987a4a73 assumes that as it simplifies life in the calling
function.

Reported-by: Fabian Keil
10 years agoCmake: Build with GSSAPI (MIT or Heimdal)
Jakub Zakrzewski [Thu, 25 Sep 2014 13:03:00 +0000 (15:03 +0200)]
Cmake: Build with GSSAPI (MIT or Heimdal)

It tries hard to recognise SDK's on different platforms. On windows MIT
Kerberos installs SDK with other things and puts path into registry.
Heimdal have separate zip archive. On linux pkg-config is tried, then
krb5-config script and finally old-style libs and headers detection.

Command line args:
* CMAKE_USE_GSSAPI - enables GSSAPI detection
* GSS_ROOT_DIR - if set, should point to the root of GSSAPI installation
                 (the one with include and lib directories)

10 years agoCmake: Got rid of setup_curl_dependencies
Jakub Zakrzewski [Fri, 22 Aug 2014 15:02:59 +0000 (17:02 +0200)]
Cmake: Got rid of setup_curl_dependencies

There is no need for such function. Include_directories propagate by
themselves and having a function with one simple link statement makes
little sense.

10 years agoCmake: Avoid cycle directory dependencies.
Jakub Zakrzewski [Fri, 22 Aug 2014 14:59:30 +0000 (16:59 +0200)]
Cmake: Avoid cycle directory dependencies.

Because we prepended libraries to list, CMake had troubles resolving
link directory order as it detected some cycles. Appending to list ensures
that dependencies will preceed dependees.

10 years agoCmake: Fix library list provided to cURL tests.
Jakub Zakrzewski [Thu, 21 Aug 2014 11:37:07 +0000 (13:37 +0200)]
Cmake: Fix library list provided to cURL tests.

The list must be set after those nice CMake tests as we mess with
CMAKE_REQUIRED_LIBRARIES there.

10 years agoCmake: Check for OpenSSL before OpenLDAP.
Jakub Zakrzewski [Thu, 21 Aug 2014 11:15:59 +0000 (13:15 +0200)]
Cmake: Check for OpenSSL before OpenLDAP.

OpenLDAP might have been build with OpenSSL. Checking for OpenLDAP first
may result in undefined symbols. Of course, the found OpenSSL libraries
must also be linked whenever OpenLDAP is.

10 years agocurl_multi_fdset.3: improved the formatting slightly
Daniel Stenberg [Thu, 9 Oct 2014 11:41:13 +0000 (13:41 +0200)]
curl_multi_fdset.3: improved the formatting slightly

10 years agocurl_multi_fdset: explain the fd_set arguments
Daniel Stenberg [Thu, 9 Oct 2014 11:17:27 +0000 (13:17 +0200)]
curl_multi_fdset: explain the fd_set arguments

10 years agonss: do not fail if a CRL is already cached
Kamil Dudka [Wed, 8 Oct 2014 15:13:59 +0000 (17:13 +0200)]
nss: do not fail if a CRL is already cached

This fixes a copy-paste mistake from commit 2968f957.

10 years agoOS400: upgrade interface for pinned public key (no implementation yet)
Patrick Monnerat [Wed, 8 Oct 2014 13:47:04 +0000 (15:47 +0200)]
OS400: upgrade interface for pinned public key (no implementation yet)

10 years agoFormAdd: precaution against memdup() of NULL pointer
Daniel Stenberg [Wed, 8 Oct 2014 11:53:41 +0000 (13:53 +0200)]
FormAdd: precaution against memdup() of NULL pointer

Coverity CID 252518. This function is in general far too complicated for
its own good and really should be broken down into several smaller
funcitons instead - but I'm adding this protection here now since it
seems there's a risk the code flow can end up here and dereference a
NULL pointer.

10 years agooperate: avoid NULL dereference
Daniel Stenberg [Wed, 8 Oct 2014 11:18:55 +0000 (13:18 +0200)]
operate: avoid NULL dereference

Coverity CID 1241948. dumpeasysrc() would get called with
config->current set to NULL which could be dereferenced by a warnf()
call.

10 years agodo_sec_send: remove dead code
Daniel Stenberg [Wed, 8 Oct 2014 10:48:06 +0000 (12:48 +0200)]
do_sec_send: remove dead code

Coverity CID 1241951. The condition 'len >= 0' would always be true at
that point and thus not necessary to check for.

10 years agokrb5_encode: remove unused argument
Daniel Stenberg [Wed, 8 Oct 2014 10:25:07 +0000 (12:25 +0200)]
krb5_encode: remove unused argument

Coverity CID 1241957. Removed the unused argument. As this struct and
pointer now are used only for krb5, there's no need to keep unused
function arguments around.

10 years agooperate_do: skip superfluous check for NULL pointer
Daniel Stenberg [Wed, 8 Oct 2014 10:21:39 +0000 (12:21 +0200)]
operate_do: skip superfluous check for NULL pointer

Coverity CID 1243583. get_url_file_name() cannot fail and return a NULL
file name pointer so skip the check for that - it tricks coverity into
believing it can happen and it then warns later on when we use 'outfile'
without checking for NULL.

10 years agocurl_easy_getinfo.3: spell-fix
Daniel Stenberg [Tue, 7 Oct 2014 13:48:37 +0000 (15:48 +0200)]
curl_easy_getinfo.3: spell-fix

Reported-By: Luan Cestari
10 years agoGnuTLS: Implement public key pinning
moparisthebest [Wed, 1 Oct 2014 06:14:49 +0000 (02:14 -0400)]
GnuTLS: Implement public key pinning

10 years agoSSL: implement public key pinning
moparisthebest [Wed, 1 Oct 2014 02:31:17 +0000 (22:31 -0400)]
SSL: implement public key pinning

Option --pinnedpubkey takes a path to a public key in DER format and
only connect if it matches (currently only implemented with OpenSSL).

Provides CURLOPT_PINNEDPUBLICKEY for curl_easy_setopt().

Extract a public RSA key from a website like so:
openssl s_client -connect google.com:443 2>&1 < /dev/null | \
sed -n '/-----BEGIN/,/-----END/p' | openssl x509 -noout -pubkey \
| openssl rsa -pubin -outform DER > google.com.der

10 years agomulti_runsingle: fix possible memory leak
Daniel Stenberg [Tue, 7 Oct 2014 11:57:13 +0000 (13:57 +0200)]
multi_runsingle: fix possible memory leak

Coverity CID 1202837. 'newurl' can in fact be allocated even when
Curl_retry_request() returns failure so free it if need be.

10 years agoares::Curl_resolver_cancel: skip checking for NULL conn
Daniel Stenberg [Tue, 7 Oct 2014 11:33:43 +0000 (13:33 +0200)]
ares::Curl_resolver_cancel: skip checking for NULL conn

Coverity CID 1243581. 'conn' will never be NULL here, and if it would be
the subsequent statement would dereference it!

10 years agoparseconfig: skip a NULL check
Daniel Stenberg [Tue, 7 Oct 2014 08:29:06 +0000 (10:29 +0200)]
parseconfig: skip a NULL check

Coverity CID 1154198. This NULL check implies that the pointer _can_ be
NULL at this point, which it can't. Thus it is dead code. It tricks
static analyzers to warn about dereferencing the pointer since the code
seems to imply it can be NULL.

10 years agomulti-uv.c: call curl_multi_info_read() better
Waldek Kozba [Tue, 7 Oct 2014 07:59:59 +0000 (09:59 +0200)]
multi-uv.c: call curl_multi_info_read() better

Improves it for low-latency cases (like the communication with
localhost)

10 years agotool_go_sleep: use (void) to spell out we ignore the return value
Daniel Stenberg [Mon, 6 Oct 2014 06:53:12 +0000 (08:53 +0200)]
tool_go_sleep: use (void) to spell out we ignore the return value

Coverity CID 1222080.

10 years agossh_statemach_act: split out assignment from check
Daniel Stenberg [Mon, 6 Oct 2014 06:49:43 +0000 (08:49 +0200)]
ssh_statemach_act: split out assignment from check

just a minor code style thing to make the code clearer

10 years agocurl_schannel.c: Fixed possible memory or handle leak
Marc Hoersken [Sat, 4 Oct 2014 16:24:23 +0000 (18:24 +0200)]
curl_schannel.c: Fixed possible memory or handle leak

First try to fix possible memory leaks, in this case:
Only connssl->ctxt xor onnssl->cred being initialized.

10 years agogetparameter: remove dead code
Daniel Stenberg [Sat, 4 Oct 2014 14:14:39 +0000 (16:14 +0200)]
getparameter: remove dead code

Coverity CID 1061126. 'parse' will always be non-NULL here.

10 years agogetparameter: comment a switch FALLTHROUGH
Daniel Stenberg [Sat, 4 Oct 2014 14:12:06 +0000 (16:12 +0200)]
getparameter: comment a switch FALLTHROUGH

Coverity CID 1061118. Point out that it is on purpose.

10 years agochoose_mech: fix return code
Daniel Stenberg [Sat, 4 Oct 2014 13:37:42 +0000 (15:37 +0200)]
choose_mech: fix return code

Coverity CID 1241950. The pointer is never NULL but it might point to
NULL.

10 years agoCurl_sec_read_msg: spell out that we ignore return code
Daniel Stenberg [Sat, 4 Oct 2014 13:21:39 +0000 (15:21 +0200)]
Curl_sec_read_msg: spell out that we ignore return code

Coverity CID 1241947. Since if sscanf() fails, the previously set value
remains set.

10 years agononblock: call with (void) to show we ignore the return code
Daniel Stenberg [Sat, 4 Oct 2014 13:14:27 +0000 (15:14 +0200)]
nonblock: call with (void) to show we ignore the return code

Coverity pointed out several of these.

10 years agoparse_proxy: remove dead code.
Daniel Stenberg [Fri, 3 Oct 2014 21:51:19 +0000 (23:51 +0200)]
parse_proxy: remove dead code.

Coverity CID 982331.

10 years agoCurl_debug: document switch fallthroughs
Daniel Stenberg [Fri, 3 Oct 2014 21:49:39 +0000 (23:49 +0200)]
Curl_debug: document switch fallthroughs

10 years agocurl_multi_remove_handle: remove dead code
Daniel Stenberg [Fri, 3 Oct 2014 21:46:10 +0000 (23:46 +0200)]
curl_multi_remove_handle: remove dead code

Coverify CID 1157776. Removed a superfluous if() that always evaluated
true (and an else clause that never ran), and then re-indented the
function accordingly.

10 years agoCurl_pipeline_server_blacklisted: handle a NULL server name
Daniel Stenberg [Fri, 3 Oct 2014 21:40:57 +0000 (23:40 +0200)]
Curl_pipeline_server_blacklisted: handle a NULL server name

Coverity CID 1215284. The server name is extracted with
Curl_copy_header_value() and passed in to this function, and
copy_header_value can actually can fail and return NULL.

10 years agossh: comment "fallthrough" in switch statement
Daniel Stenberg [Fri, 3 Oct 2014 21:30:05 +0000 (23:30 +0200)]
ssh: comment "fallthrough" in switch statement

10 years agossh: improve key file search
Jeremy Lin [Tue, 16 Sep 2014 04:16:46 +0000 (21:16 -0700)]
ssh: improve key file search

For private keys, use the first match from: user-specified key file
(if provided), ~/.ssh/id_rsa, ~/.ssh/id_dsa, ./id_rsa, ./id_dsa

Note that the previous code only looked for id_dsa files. id_rsa is
now generally preferred, as it supports larger key sizes.

For public keys, use the user-specified key file, if provided.
Otherwise, try to extract the public key from the private key file.
This means that passing --pubkey is typically no longer required,
and makes the key-handling behavior more like OpenSSH.

10 years agoCURLOPT_HTTPHEADER.3: libcurl doesn't copy the whole list
Daniel Stenberg [Fri, 3 Oct 2014 11:35:40 +0000 (13:35 +0200)]
CURLOPT_HTTPHEADER.3: libcurl doesn't copy the whole list

10 years agodetect_proxy: fix possible single-byte memory leak
Daniel Stenberg [Thu, 2 Oct 2014 21:31:01 +0000 (23:31 +0200)]
detect_proxy: fix possible single-byte memory leak

Coverity CID 1202836. If the proxy environment variable returned an empty
string, it would be leaked. While an empty string is not really a proxy, other
logic in this function already allows a blank string to be returned so allow
that here to avoid the leak.

10 years agomulti_runsingle: fix memory leak
Daniel Stenberg [Thu, 2 Oct 2014 21:22:01 +0000 (23:22 +0200)]
multi_runsingle: fix memory leak

Coverity CID 1202837. There's a potential risk that 'newurl' gets
overwritten when it was already pointing to allocated memory.

10 years agopop3_perform_authentication: fix memory leak
Daniel Stenberg [Thu, 2 Oct 2014 21:07:06 +0000 (23:07 +0200)]
pop3_perform_authentication: fix memory leak

Coverity CID 1215287. There's a potential risk for a memory leak in
here, and moving the free call to be unconditional seems like a cheap
price to remove the risk.