Daniel Stenberg [Tue, 8 Mar 2011 10:43:42 +0000 (11:43 +0100)]
curl.1: clarify -E
Stress that it is for client certificates and then mention that it also
works for all other SSL-based protocols apart from HTTPS and
FTPS. Namely POP3S, IMAPS and SMTPS for now.
Daniel Stenberg [Sat, 26 Feb 2011 09:59:03 +0000 (10:59 +0100)]
ssh_connect: treat libssh2 return code better
libssh2_knownhost_readfile() returns a negative value on error or
otherwise number of parsed known hosts - this was previously not
documented correctly in the libssh2 man page for the function.
Bug: http://curl.haxx.se/mail/lib-2011-02/0327.html
Reported by: murat
Daniel Stenberg [Tue, 22 Feb 2011 12:28:27 +0000 (13:28 +0100)]
runtests.pl/stopserver: space separate pids
The stopserver function would append pids to kill and could append them
without separating them with space properly. The result would be a very
large number that by (some implementations of) kill would be interpreted
as a negative number and that process group would be wiped...
Julien Chaffraix [Mon, 21 Feb 2011 05:10:36 +0000 (21:10 -0800)]
tests: Cleaned up netrc testing.
Removed the "netrc_debug" keyword replaced with --netrc-file additions.
Removed the debug code from Curl_parsenetrc as it is superseeded by
--netrc-file.
Julien Chaffraix [Mon, 21 Feb 2011 05:10:03 +0000 (21:10 -0800)]
curl: Added --netrc-file.
This enables people to specify a path to the netrc file to use.
The new option override --netrc if both are present. However it
does follow --netrc-optional if specified.
Mike Crowe [Fri, 18 Feb 2011 22:19:14 +0000 (23:19 +0100)]
multi: close connection on timeout
After a request times out, the connection wasn't properly closed and
prevented to get re-used, so subsequent transfers could still mistakenly
get to use the previously aborted connection.
Daniel Stenberg [Thu, 17 Feb 2011 22:51:43 +0000 (23:51 +0100)]
multi: better failed connect treatment
When failing to connect the protocol during the CURLM_STATE_PROTOCONNECT
state, Curl_done() has to be called with the premature flag set TRUE as
for the pingpong protocols this can be important.
When Curl_done() is called with premature == TRUE, it needs to call
Curl_disconnect() with its 'dead_connection' argument set to TRUE as
well so that any protocol handler's disconnect function won't attempt to
use the (control) connection for anything.
This problem caused the pingpong protocols to fail to disconnect when
STARTTLS failed.
Daniel Stenberg [Wed, 9 Feb 2011 14:46:41 +0000 (15:46 +0100)]
SOCKOPTFUNCTION: callback can say already-connected
Introducing a few CURL_SOCKOPT* defines for conveniance. The new
CURL_SOCKOPT_ALREADY_CONNECTED signals to libcurl that the socket is to
be treated as already connected and thus it will skip the connect()
call.
Daniel Stenberg [Mon, 14 Feb 2011 12:42:01 +0000 (13:42 +0100)]
gmtime: remove define
It turns out some systems rely on the gmtime or gmtime_r to be defined
already in the system headers and thus my "precaution" redefining of
them only caused trouble. They are now removed.
Daniel Stenberg [Thu, 10 Feb 2011 21:21:57 +0000 (22:21 +0100)]
--keepalive-time: warn if not supported properly
Since the feature requires support for TCP_KEEPIDLE and TCP_KEEPINTVL to
function as documented, it now warns if that support is missing when the
option is used.
Quinn Slack [Wed, 9 Feb 2011 22:34:30 +0000 (23:34 +0100)]
CURLE_TLSAUTH_FAILED: removed
On second thought, I think CURLE_TLSAUTH_FAILED should be eliminated. It
was only being raised when an internal error occurred while allocating
or setting the GnuTLS SRP client credentials struct. For TLS
authentication failures, the general CURLE_SSL_CONNECT_ERROR seems
appropriate; its error string already includes "passwords" as a possible
cause. Having a separate TLS auth error code might also cause people to
think that a TLS auth failure means the wrong username or password was
entered, when it could also be a sign of a man-in-the-middle attack.
Daniel Stenberg [Wed, 9 Feb 2011 14:36:36 +0000 (15:36 +0100)]
CURLOPT_SOCKOPTFUNCTION: return proper error code
When the callback returns an error, this function must make sure to return
CURLE_ABORTED_BY_CALLBACK properly and not CURLE_OK as before to allow the
callback to properly abort the operation.
Julien Chaffraix [Fri, 28 Jan 2011 16:34:17 +0000 (08:34 -0800)]
netrc: Removed dead code.
The main has not been updated from some time and is out of sync with
the code. The code is now tested by several test cases so no need for
a seperate code path.
Daniel Stenberg [Mon, 7 Feb 2011 14:00:48 +0000 (15:00 +0100)]
Curl_gmtime: added a portable gmtime
Instead of polluting many places with #ifdefs, we create a single place
for this function, and also check return code properly so that a NULL
pointer returned won't cause problems.
Guenter Knauf [Thu, 3 Feb 2011 08:59:00 +0000 (09:59 +0100)]
mk-ca-bundle.vbs: use new cacert url
The official Mozilla page at http://www.mozilla.org/projects/security/certs/
points out a new place as the "proper" place to get Mozilla's CA certs from
so this script is now updated to use that instead.
Daniel Stenberg [Wed, 2 Feb 2011 21:22:15 +0000 (22:22 +0100)]
mk-ca-bundle.pl: use new cacert url
The official Mozilla page at
http://www.mozilla.org/projects/security/certs/ points out a new place
as the "proper" place to get Mozilla's CA certs from so this script is
now updated to use that instead.
The code in the toofast state needs to first recalculate the values
before it uses them again since it may have been a while since it last
did it when it reaches this point.
Dave Reisner [Sun, 30 Jan 2011 03:12:33 +0000 (22:12 -0500)]
transfer: add Curl_meets_timecondition()
This will be used by file_do() and Curl_readwrite() as a unified method
of checking to see if a remote document meets the supplied
CURLOPT_TIMEVAL and CURLOPT_TIMECONDITION.
Pierre Joye [Fri, 28 Jan 2011 21:19:44 +0000 (22:19 +0100)]
Windows build: alternative makefile
This is a separate makefile for MSVC builds. It is deliberately put in
another dir than src/ and lib/ to allow a different build experience
than the previous - at least during a period. Eventually we should
unify.
Daniel Stenberg [Thu, 27 Jan 2011 12:59:11 +0000 (13:59 +0100)]
ares_query_completed_cb: don't touch invalid data
When this callback is called due to the destruction of the ares handle,
the connection pointer passed in as an argument may no longer pointing
to valid data and this function doesn't need to do anything with it
anyway so we make sure it doesn't.
Daniel Stenberg [Tue, 25 Jan 2011 11:06:50 +0000 (12:06 +0100)]
HTTP: memory leak on multiple Location:
The HTTP parser allocated memory on each received Location: header
without properly freeing old data. Starting now, the code only considers
the first Location: header and will blissfully ignore subsequent ones.
Bug: http://curl.haxx.se/bug/view.cgi?id=3165129
Reported by: Martin Lemke
Daniel Stenberg [Wed, 19 Jan 2011 22:14:55 +0000 (23:14 +0100)]
main: make the tlsauth options always present
... to not make the connection between the tool and the libcurl used
tighter than necessary, the tlsauth options are now always present but
if the used libcurl doesn't have TLSAUTH support it will return failure.
Also, replaced strncmp() with strequal to get case insensitive matching.
Kamil Dudka [Tue, 18 Jan 2011 12:53:43 +0000 (13:53 +0100)]
nss: fix a bug in handling of CURLOPT_CAPATH
... and update the curl.1 and curl_easy_setopt.3 man pages such that
they do not suggest to use an OpenSSL utility if curl is not built
against OpenSSL.