platform/upstream/curl.git
12 years agoftpserver.pl: three new custom FTP server commands to disable data channel
Yang Tse [Thu, 27 Oct 2011 19:46:24 +0000 (21:46 +0200)]
ftpserver.pl: three new custom FTP server commands to disable data channel

NODATACONN421: applies only to active FTP mode, instructs server to not
establish data connection back to client and reply with FTP 421.

NODATACONN425: applies only to active FTP mode, instructs server to not
establish data connection back to client and reply with FTP 425.

NODATACONN: applies to both active and passive FTP modes, instructs server
to not establish nor accept a data channel and fool client into believing
that the data channel connection is possible.

Some polishing probably required.

12 years agomulti.c: OOM handling fix
Yang Tse [Thu, 27 Oct 2011 15:08:02 +0000 (17:08 +0200)]
multi.c: OOM handling fix

Fix curl_multi_cleanup() segfault when using weird cleanup sequence.

12 years agomulti: start ftp state machine when switching to DO_MORE
Daniel Stenberg [Thu, 27 Oct 2011 10:46:29 +0000 (12:46 +0200)]
multi: start ftp state machine when switching to DO_MORE

This extends the fix from commit d7934b8bd491

When the multi state is changed within the multi_runsingle from DOING to
DO_MORE, we didn't immediately start the FTP state machine again. That
then left the FTP state in FTP_STOP. When curl_multi_fdset() was
subsequently called, the ftp_domore_getsock() function would return the
wrong fd info.

Reported by: Gokhan Sengun

12 years agolibcurl-multi.3: update the list of areas still blocking
Daniel Stenberg [Thu, 27 Oct 2011 07:22:15 +0000 (09:22 +0200)]
libcurl-multi.3: update the list of areas still blocking

12 years agotest 589: active FTP upload using multi timeout and EPRT disabled server
Yang Tse [Wed, 26 Oct 2011 16:55:35 +0000 (18:55 +0200)]
test 589: active FTP upload using multi timeout and EPRT disabled server

12 years agomulti tests: OOM handling fixes - commit 629d2e34 follow-up
Yang Tse [Wed, 26 Oct 2011 16:46:32 +0000 (18:46 +0200)]
multi tests: OOM handling fixes - commit 629d2e34 follow-up

12 years ago- Prepare the ILE/RPG binding and OS400 documentation for the upcoming release
Patrick Monnerat [Wed, 26 Oct 2011 12:48:20 +0000 (14:48 +0200)]
- Prepare the ILE/RPG binding and OS400 documentation for the upcoming release

12 years agoRELEASE-NOTES: synced with 4464583a6ed
Daniel Stenberg [Tue, 25 Oct 2011 21:28:30 +0000 (23:28 +0200)]
RELEASE-NOTES: synced with 4464583a6ed

5 more bug fixes, 4 additional contributors

12 years agoruntests.pl: running server checks
Yang Tse [Tue, 25 Oct 2011 21:19:36 +0000 (23:19 +0200)]
runtests.pl: running server checks

When running torture tests, verify before each test case that required
pingpong servers which are supposed to be alive are actually responsive.
If found not responsive then restart them.

12 years agodist: add test 587
Daniel Stenberg [Mon, 24 Oct 2011 21:09:59 +0000 (23:09 +0200)]
dist: add test 587

I created test 587 in commit 840eff44f2b but forgot to add the file to
the tarball. Added now.

12 years agotest 588: verify active FTP with multi interface without EPRT
Daniel Stenberg [Mon, 24 Oct 2011 21:08:16 +0000 (23:08 +0200)]
test 588: verify active FTP with multi interface without EPRT

This is using the verbatim 525 test code but it disables EPRT in the
server and this should work just as well anyway.

12 years agoFTP server: allow EPRT by default
Daniel Stenberg [Mon, 24 Oct 2011 20:54:53 +0000 (22:54 +0200)]
FTP server: allow EPRT by default

EPRT is now supported by default by the server. To disable it, use the
generic REPLY instruction in the <servercmd> tag. Test 116 now has it
disabled. All other existing active FTP port tests strip out the port
commands from the logs already so the change of the server isn't that
noticable.

12 years agoftp.c: some OOM handling fixes
Yang Tse [Mon, 24 Oct 2011 18:42:01 +0000 (20:42 +0200)]
ftp.c: some OOM handling fixes

12 years agoftpserver.pl: ensure integral number usage for passive mode string
Yang Tse [Mon, 24 Oct 2011 18:40:25 +0000 (20:40 +0200)]
ftpserver.pl: ensure integral number usage for passive mode string

12 years agolarge headers: have curl accept >16K headers
Daniel Stenberg [Mon, 24 Oct 2011 15:28:41 +0000 (17:28 +0200)]
large headers: have curl accept >16K headers

As commit 5850cc4808ab clarifies, libcurl can deliver header lines that
are longer than CURL_MAX_WRITE_SIZE, only body data is limited to that
size. The curl tool has check (when built debug-enabled) that made the
wrong checks and this new test 1205 verifies that larger headers work.

12 years agocurl_easy_setopt.3: headers can be CURL_MAX_HTTP_HEADER bytes
Daniel Stenberg [Mon, 24 Oct 2011 14:43:53 +0000 (16:43 +0200)]
curl_easy_setopt.3: headers can be CURL_MAX_HTTP_HEADER bytes

Mention this maximum header size for the header callback cases

12 years agoMerge pull request #25 from trtom/master
Daniel Stenberg [Mon, 24 Oct 2011 11:11:43 +0000 (04:11 -0700)]
Merge pull request #25 from trtom/master

make sure the static build uses the static build option!

12 years agocurl_easy_setopt.3: fix typo
Daniel Stenberg [Sun, 23 Oct 2011 22:13:47 +0000 (00:13 +0200)]
curl_easy_setopt.3: fix typo

shoot, Dan Fandrich already had this pointed out...

12 years agocurl_easy_setopt: Added pop3 to CURLOPT_URL.
Steve Holme [Fri, 21 Oct 2011 21:59:50 +0000 (22:59 +0100)]
curl_easy_setopt: Added pop3 to CURLOPT_URL.

Added pop3 username and password example as well as an explanation of
how path part of the URL is used under pop3.

Additionally have corrected a couple of typos.

12 years agotool_operate.c: OOM handling fix
Yang Tse [Sat, 22 Oct 2011 12:46:49 +0000 (14:46 +0200)]
tool_operate.c: OOM handling fix

Move curl_easy_perform source code geneartion out of curl_easy_perform's loop
for proper OOM handling and source code geneartion.

12 years agocurl_multi_fdset: correct fdset with FTP PORT use
Daniel Stenberg [Fri, 21 Oct 2011 21:36:54 +0000 (23:36 +0200)]
curl_multi_fdset: correct fdset with FTP PORT use

After a PORT has been issued, and the multi handle would switch to the
CURLM_STATE_DO_MORE state (which is unique for FTP), libcurl would
return the wrong fdset to wait for when curl_multi_fdset() is
called. The code would blindly assume that it was waiting for a connect
of the second connection, while that isn't true immediately after the
PORT command.

Also, the function multi.c:domore_getsock() was highly FTP-centric and
therefore ugly to keep in protocol-agnostic code. I solved this problem
by introducing a new function pointer in the Curl_handler struct called
domore_getsock() which is only called during the DOMORE state for
protocols that set that pointer.

The new ftp.c:ftp_domore_getsock() function now returns fdset info about
the control connection's command/response handling while such a state is
in use, and goes over to waiting for a writable second connection first
once the commands are done.

The original problem could be seen by running test 525 and checking the
time stamps in the FTP server log. I can verify that this fix at least
fixes this problem.

Bug: http://curl.haxx.se/mail/lib-2011-10/0250.html
Reported by: Gokhan Sengun

12 years agoAdded some missing test case XML tags and keywords
Dan Fandrich [Fri, 21 Oct 2011 20:30:22 +0000 (13:30 -0700)]
Added some missing test case XML tags and keywords

12 years agofile.c: OOM handling fix
Yang Tse [Fri, 21 Oct 2011 14:40:02 +0000 (16:40 +0200)]
file.c: OOM handling fix

file_disconnect() free's resources for multi API

12 years agomulti.c: fix segfault
Yang Tse [Fri, 21 Oct 2011 14:37:13 +0000 (16:37 +0200)]
multi.c: fix segfault

12 years agoruntests.pl: fix printing of multivalued error codes
Yang Tse [Fri, 21 Oct 2011 14:34:37 +0000 (16:34 +0200)]
runtests.pl: fix printing of multivalued error codes

12 years agomulti tests: OOM handling fixes
Yang Tse [Fri, 21 Oct 2011 14:26:18 +0000 (16:26 +0200)]
multi tests: OOM handling fixes

Additionally, improved error checking and logging.

12 years agoFixed compilation when HTTP or cookies are disabled
Dan Fandrich [Fri, 21 Oct 2011 00:54:18 +0000 (17:54 -0700)]
Fixed compilation when HTTP or cookies are disabled

12 years agoKNOWN_BUGS: #74 fixed
Daniel Stenberg [Thu, 20 Oct 2011 11:11:10 +0000 (13:11 +0200)]
KNOWN_BUGS: #74 fixed

Multiple auths in the same WWW-Authenticate header

Fixed in commit 7d81e3f7193b8c

12 years agoCurl_http_input_auth: handle multiple auths in WWW-Authenticate
Daniel Stenberg [Thu, 20 Oct 2011 11:05:09 +0000 (13:05 +0200)]
Curl_http_input_auth: handle multiple auths in WWW-Authenticate

The fix is pretty much the one Nick Zitzmann provided, just edited to do
the right indent levels and with test case 1204 added to verify the fix.

Bug: http://curl.haxx.se/mail/lib-2011-10/0190.html
Reported by: Nick Zitzmann

12 years agoCurl_smtp_escape_eob: first byte is index 0...
Daniel Stenberg [Thu, 20 Oct 2011 10:58:26 +0000 (12:58 +0200)]
Curl_smtp_escape_eob: first byte is index 0...

Fix a bug with with commit 2621dd42a4d that happened due to my last
second pre-commit cleanup of the change without proper testing
afterwards!

12 years agoCURLM_CALL_MULTI_PERFORM: remove mention
Daniel Stenberg [Thu, 20 Oct 2011 06:48:15 +0000 (08:48 +0200)]
CURLM_CALL_MULTI_PERFORM: remove mention

This return code has not been used since 7.20.0 so we can stop
mentioning it for current libcurl.

12 years agoSilenced a compiler warning about an unused variable
Dan Fandrich [Thu, 20 Oct 2011 04:18:52 +0000 (21:18 -0700)]
Silenced a compiler warning about an unused variable

12 years agogtls: only call gnutls_transport_set_lowat with <gnutls-2.12.0
Tim Harder [Wed, 19 Oct 2011 08:08:56 +0000 (10:08 +0200)]
gtls: only call gnutls_transport_set_lowat with <gnutls-2.12.0

The default lowat level for gnutls-2.12* is set to zero to avoid
unnecessary system calls and the gnutls_transport_set_lowat function has
been totally removed in >=gnutls-3 which causes build failures.

Therefore, the function shouldn't be used except for versions that
require it, <gnutls-2.12.0.

12 years agoCurl_smtp_escape_eob: fix EOB escaping
Daniel Stenberg [Wed, 19 Oct 2011 22:13:09 +0000 (00:13 +0200)]
Curl_smtp_escape_eob: fix EOB escaping

As the EOB string can come byte by byte over a series of writes we must
match byte-wise.

Bug: http://curl.haxx.se/mail/lib-2011-10/0172.html

12 years agoRELEASE-NOTES: synced with ecbb08cea3cd6
Daniel Stenberg [Tue, 18 Oct 2011 20:34:32 +0000 (22:34 +0200)]
RELEASE-NOTES: synced with ecbb08cea3cd6

12 years agosingleipconnect: unstick the ipv6-connection boolean
Daniel Stenberg [Mon, 17 Oct 2011 20:01:09 +0000 (22:01 +0200)]
singleipconnect: unstick the ipv6-connection boolean

Previously the bit was set before the connection was found working so if
it would first fail to an ipv6 address and then connect fine to a IPv4
address the variable would still be TRUE.

Reported by: Thomas L. Shinnick
Bug: http://curl.haxx.se/bug/view.cgi?id=3421912

12 years agonss: avoid a SIGSEGV with immature version of NSS
Kamil Dudka [Tue, 6 Sep 2011 16:17:38 +0000 (18:17 +0200)]
nss: avoid a SIGSEGV with immature version of NSS

Bug: https://bugzilla.redhat.com/733685

12 years agonss: big cleanup in nss_load_cert() and cert_stuff()
Kamil Dudka [Fri, 26 Aug 2011 13:43:48 +0000 (15:43 +0200)]
nss: big cleanup in nss_load_cert() and cert_stuff()

12 years agonss: refactor fmt_nickname() -> dup_nickname()
Kamil Dudka [Fri, 26 Aug 2011 12:53:26 +0000 (14:53 +0200)]
nss: refactor fmt_nickname() -> dup_nickname()

Do not use artificial nicknames for certificates from files.

12 years agonss: select client certificates by DER
Kamil Dudka [Fri, 26 Aug 2011 12:38:18 +0000 (14:38 +0200)]
nss: select client certificates by DER

... instead of nicknames, which are not unique.

12 years ago--epsv: fix typo
Daniel Stenberg [Sun, 16 Oct 2011 22:04:43 +0000 (00:04 +0200)]
--epsv: fix typo

Reported by: Thomas L. Shinnick

12 years ago--show-error: position indepdenent
Daniel Stenberg [Sun, 16 Oct 2011 21:39:59 +0000 (23:39 +0200)]
--show-error: position indepdenent

Previously we required that -S/--show-error was used _after_
-s/--silent. This was slightly confusing since we strive to make
arguments as position independent as possible.

Now, you can use them in any order and the result should still be the
same.

Bug: http://curl.haxx.se/bug/view.cgi?id=3424286
Reported by: Andreas Olsson

12 years agocurl_multi_fdset: clarify the max_fd == -1 case
Daniel Stenberg [Sun, 16 Oct 2011 21:38:48 +0000 (23:38 +0200)]
curl_multi_fdset: clarify the max_fd == -1 case

Elaborate what max_fd == -1 means

Remove the reference to CURLM_CALL_MULTI_PERFORM as modern libcurl
versions don't ever return that.

12 years agoformdata: ack read callback abort
Daniel Stenberg [Sat, 15 Oct 2011 23:07:29 +0000 (01:07 +0200)]
formdata: ack read callback abort

When doing a multipart formpost with a read callback, and that callback
returns CURL_READFUNC_ABORT, that return code must be properly
propagated back and handled accordingly. Previously it would be handled
as a zero byte read which would cause a hang!

Added test case 587 to verify. It uses the lib554.c source code with a
small ifdef.

Reported by: Anton Bychkov
Bug: http://curl.haxx.se/mail/lib-2011-10/0097.html

12 years agoTODO: have form functions use CURL handle argument
Daniel Stenberg [Sat, 15 Oct 2011 23:06:48 +0000 (01:06 +0200)]
TODO: have form functions use CURL handle argument

12 years agotypecheck: allow NULL to unset CURLOPT_ERRORBUFFER
Dave Reisner [Tue, 11 Oct 2011 01:24:40 +0000 (03:24 +0200)]
typecheck: allow NULL to unset CURLOPT_ERRORBUFFER

There might be situations where a user would want to unset this option.
Avoid forcing him/her to cast the NULL argument to (char *) in order to
get past the compile time typecheck.

12 years agosingleipconnect: don't clobber errno
Daniel Stenberg [Sat, 15 Oct 2011 21:44:28 +0000 (23:44 +0200)]
singleipconnect: don't clobber errno

Save the errno value immediately after a connect() failure so that it
won't get reset to something else before we read it.

Bug: http://curl.haxx.se/mail/lib-2011-10/0066.html
Reported by: Frank Van Uffelen and Fabian Hiernaux

12 years agodocs: --xattr
Michal Marek [Thu, 13 Oct 2011 08:51:17 +0000 (10:51 +0200)]
docs: --xattr

12 years agofile.c: fix compiler warning
Yang Tse [Fri, 14 Oct 2011 16:23:16 +0000 (18:23 +0200)]
file.c: fix compiler warning

12 years agourl.c: fix endless loop upon transport connection timeout
Yang Tse [Fri, 14 Oct 2011 15:34:42 +0000 (17:34 +0200)]
url.c: fix endless loop upon transport connection timeout

Jerry Wu detected and provided detailed info about this issue.

12 years agosws.c: HTTP and GOPHER test server-side connection closing adjustment
Yang Tse [Fri, 14 Oct 2011 15:33:05 +0000 (17:33 +0200)]
sws.c: HTTP and GOPHER test server-side connection closing adjustment

When, for a given test, server is instructed to close connection after
server reply we now wait a very small amount of time (50ms) before doing
so. This is done to allow client to, at least partially, read server
reply before getting an ECONNRESET.

The above is required to make test cases 1070, 1200, 1201 and 1202 pass
with Cygwin 1.5.X on W2K.

GOPHER test server closes connection after _every_ server-reply, as such,
at some point it could require a bigger time or using shutdown() before
a server-side initiated disconnection.

12 years agocurl_gethostname.c: fix signed/unsigned comparison and avoid a double copy
Yang Tse [Thu, 13 Oct 2011 21:00:24 +0000 (23:00 +0200)]
curl_gethostname.c: fix signed/unsigned comparison and avoid a double copy

both introduced in 42be24af

12 years agocurl_ntlm_msgs.c: fix variable shadowing declaration introduced in 185ed340
Yang Tse [Thu, 13 Oct 2011 19:09:17 +0000 (21:09 +0200)]
curl_ntlm_msgs.c: fix variable shadowing declaration introduced in 185ed340

12 years agotftp.c: TFTP timeout and unexpected block adjustments
Marcin Adamski [Thu, 13 Oct 2011 17:45:36 +0000 (19:45 +0200)]
tftp.c: TFTP timeout and unexpected block adjustments

Set ACK timeout to 5 seconds.

If we are waiting for block X and receive block Y that is the expected one, we
should send ACK and increase X (which is already implemented). Otherwise drop
the packet and don't increase retry counter.

12 years agomulti.c: OOM handling fixes
Yang Tse [Thu, 13 Oct 2011 16:04:56 +0000 (18:04 +0200)]
multi.c: OOM handling fixes

Prevent modification of easy handle being added with curl_multi_add_handle()
unless this function actually suceeds.

Run Curl_posttransfer() to allow restoring of SIGPIPE handler when
Curl_connect() fails early in multi_runsingle().

12 years agourl.c: make line shorter than 80 chars
Yang Tse [Wed, 12 Oct 2011 23:52:56 +0000 (01:52 +0200)]
url.c: make line shorter than 80 chars

12 years agoOOM handling/cleanup slight adjustments
Yang Tse [Wed, 12 Oct 2011 19:32:10 +0000 (21:32 +0200)]
OOM handling/cleanup slight adjustments

12 years agoOOM handling/cleanup slight adjustments
Yang Tse [Tue, 11 Oct 2011 17:41:30 +0000 (19:41 +0200)]
OOM handling/cleanup slight adjustments

12 years agolib540.c: OOM handling fixes making test 540 pass torture testing
Yang Tse [Mon, 10 Oct 2011 10:27:17 +0000 (12:27 +0200)]
lib540.c: OOM handling fixes making test 540 pass torture testing

12 years agoRELEASE-NOTES: Fixed a couple of typos
Dan Fandrich [Sun, 9 Oct 2011 06:12:07 +0000 (23:12 -0700)]
RELEASE-NOTES: Fixed a couple of typos

12 years agotelnet.c: fix compiler warning
Yang Tse [Fri, 7 Oct 2011 23:27:03 +0000 (01:27 +0200)]
telnet.c: fix compiler warning

12 years agolibcurl: some OOM handling fixes
Yang Tse [Fri, 7 Oct 2011 18:50:57 +0000 (20:50 +0200)]
libcurl: some OOM handling fixes

12 years agomulti.c: OOM handling fixes making torture tests 560 580 581 pass
Yang Tse [Thu, 6 Oct 2011 18:30:34 +0000 (20:30 +0200)]
multi.c: OOM handling fixes making torture tests 560 580 581 pass

12 years agotest harness: non-stunnel https server integration overhaul
Yang Tse [Thu, 6 Oct 2011 18:26:42 +0000 (20:26 +0200)]
test harness: non-stunnel https server integration overhaul

12 years agocurl tool: reviewed code moved to tool_*.[ch] files
Yang Tse [Thu, 6 Oct 2011 15:39:00 +0000 (17:39 +0200)]
curl tool: reviewed code moved to tool_*.[ch] files

12 years agobuildconf: warn about autoconf 2.67 and 2.68 generating bad/unusable scripts
Yang Tse [Thu, 6 Oct 2011 10:57:12 +0000 (12:57 +0200)]
buildconf: warn about autoconf 2.67 and 2.68 generating bad/unusable scripts

12 years agocurl tool: fix compiler warning
Yang Tse [Wed, 5 Oct 2011 20:27:29 +0000 (22:27 +0200)]
curl tool: fix compiler warning

12 years agocurl tool: OOM handling fixes
Yang Tse [Wed, 5 Oct 2011 20:01:42 +0000 (22:01 +0200)]
curl tool: OOM handling fixes

12 years agocurl tool: reviewed code moved to tool_*.[ch] files
Yang Tse [Wed, 5 Oct 2011 18:16:16 +0000 (20:16 +0200)]
curl tool: reviewed code moved to tool_*.[ch] files

12 years agocurl tool: OOM handling fixes
Yang Tse [Wed, 5 Oct 2011 17:33:46 +0000 (19:33 +0200)]
curl tool: OOM handling fixes

12 years agocurl tool: OOM handling fixes
Yang Tse [Wed, 5 Oct 2011 14:41:04 +0000 (16:41 +0200)]
curl tool: OOM handling fixes

12 years agocurl tool: OOM handling fixes
Yang Tse [Wed, 5 Oct 2011 13:06:26 +0000 (15:06 +0200)]
curl tool: OOM handling fixes

12 years agocurl tool: header inclusion adjustment
Yang Tse [Wed, 5 Oct 2011 10:40:30 +0000 (12:40 +0200)]
curl tool: header inclusion adjustment

12 years agocurl tool: symbol check adjustment
Yang Tse [Wed, 5 Oct 2011 00:58:18 +0000 (02:58 +0200)]
curl tool: symbol check adjustment

12 years agocurl tool: header inclusion adjustment
Yang Tse [Tue, 4 Oct 2011 23:19:58 +0000 (01:19 +0200)]
curl tool: header inclusion adjustment

12 years agocurl tool: code moved to tool_*.[ch] files
Yang Tse [Tue, 4 Oct 2011 22:03:20 +0000 (00:03 +0200)]
curl tool: code moved to tool_*.[ch] files

12 years agocurl_share_cleanup: avoid compiler warning
Daniel Stenberg [Tue, 4 Oct 2011 14:34:45 +0000 (16:34 +0200)]
curl_share_cleanup: avoid compiler warning

Move the variable declaration to within the #ifdef

12 years agostruct Curl_share: provide sslsession unconditionally
Daniel Stenberg [Tue, 4 Oct 2011 14:33:07 +0000 (16:33 +0200)]
struct Curl_share: provide sslsession unconditionally

It makes much nicer and less convuluted code everywhere if this struct
member is always present even when libcurl is built without SSL support.

This reverts parts of commit 15e3e451702396e

12 years agoftp: improved the failed PORT host name resolved error message
Daniel Stenberg [Tue, 4 Oct 2011 14:24:50 +0000 (16:24 +0200)]
ftp: improved the failed PORT host name resolved error message

12 years agocodepolicing
Daniel Stenberg [Mon, 3 Oct 2011 21:04:32 +0000 (23:04 +0200)]
codepolicing

12 years agosspi build fix
Daniel Stenberg [Mon, 3 Oct 2011 21:03:59 +0000 (23:03 +0200)]
sspi build fix

define away Curl_ntlm_sspi_cleanup() when no windows SSPI build

12 years agosmtp: Added support for NTLM authentication
Steve Holme [Sat, 1 Oct 2011 13:46:14 +0000 (14:46 +0100)]
smtp: Added support for NTLM authentication

Modified smtp_endofresp() to detect NTLM from the server specified list
of supported authentication mechanisms.

Modified smtp_authenticate() to start the sending of the NTLM data.

Added smtp_auth_ntlm_type1_message() which creates a NTLM type-1
message. This function is used by authenticate() to start the sending
of data and by smtp_state_auth_ntlm_resp() when the AUTH command
doesn't contain the type-1 message as part of the initial response.
This lack of initial response can happen if an OOM error occurs or the
type-1 message is longer than 504 characters. As the main AUTH command
is limited to 512 character the data has to be transmitted in two
parts; one containing the AUTH NTLM and the second containing the
type-1 message.

Added smtp_state_auth_ntlm_type2msg_resp() which handles the incoming
type-2 message and sends an outgoing type-3 message. This type-2
message is sent by the server in response to our type-1 message.

Modified smtp_state_auth_resp() to handle the response to: the AUTH
NTLM without the initial response and the type-2 response.

Modified smtp_disconnect() to cleanup the NTLM SSPI stack.

12 years agoCurl_ntlm_create_typeX_message: Added the outlen parameter
Steve Holme [Sat, 1 Oct 2011 12:03:40 +0000 (13:03 +0100)]
Curl_ntlm_create_typeX_message: Added the outlen parameter

Added the output message length as a parameter to both
Curl_ntlm_create_type1_message() and Curl_ntlm_create_type3_message()
for use by future functions that require it.

Updated curl_ntlm.c to cater for the extra parameter on these two
functions.

12 years agosmtp: General tidy up ready for adding NTLM support
Steve Holme [Sat, 1 Oct 2011 11:35:36 +0000 (12:35 +0100)]
smtp: General tidy up ready for adding NTLM support

Changed the name of variable l, in several functions, which represents
the length of strings being sent to the server, to len which is more
meaningful and consistent with other code in smtp.c and elsewhere.

Reworked smtp_authenticate() to be simpler and easier to follow.
Variables and now initialised in their definitions and if no username
and password are specified the function sets the state to SMTP_STOP and
returns immediately, rather than being part of a huge if statement.

12 years agocurl tool: reviewed code moved to tool_*.[ch] files
Yang Tse [Mon, 3 Oct 2011 20:59:38 +0000 (22:59 +0200)]
curl tool: reviewed code moved to tool_*.[ch] files

12 years agosmtp_mail: fixed another memory leak
Steve Holme [Fri, 30 Sep 2011 09:11:56 +0000 (10:11 +0100)]
smtp_mail: fixed another memory leak

... introduced in 7f304ab84f560c

12 years agom4: Use x in order to avoid variable 'x' set but not used [-Werror=unused-but-set...
Dominique Leuenberger [Mon, 3 Oct 2011 15:53:43 +0000 (17:53 +0200)]
m4: Use x in order to avoid variable 'x' set but not used [-Werror=unused-but-set-variable]

This error could be caused by configure scripts being run with -Werror
-Wall, which would lead to libcurl being detected as unusable.

12 years agoshare: don't use SSL unless enabled
Daniel Stenberg [Mon, 3 Oct 2011 20:32:36 +0000 (22:32 +0200)]
share: don't use SSL unless enabled

Don't even declare the struct members for disabled features

Introducing the CURLSHE_NOT_BUILT_IN return code for the share interface
when trying to set a sharing option that has been disabled (or not
enabled) in the library.

12 years agomulti: progress function abort must close connection
Daniel Stenberg [Sun, 2 Oct 2011 17:28:39 +0000 (19:28 +0200)]
multi: progress function abort must close connection

When the progress function returns to cancel the request, we must mark
the connection to get closed and it must do to the DONE state.

do_init() must be called as early as possible so that state variables
for new connections are reset early. We could otherwise see that the old
values were still there when a connection was to be disconnected very
early and it would make it behave wrongly.

Bug: http://curl.haxx.se/mail/lib-2011-10/0006.html
Reported by: Vladimir Grishchenko

12 years agotutorial: clarify the handle sharing when treaded
Daniel Stenberg [Fri, 30 Sep 2011 21:42:47 +0000 (23:42 +0200)]
tutorial: clarify the handle sharing when treaded

Previously there was wording that made people uncertain of the exact
rules.

Feedback by: Julien Royer and Georg Lippitsch
URL: http://curl.haxx.se/mail/lib-2011-09/0357.html

12 years agomulti_runsingle: change state on callback abort
Daniel Stenberg [Fri, 30 Sep 2011 20:59:50 +0000 (22:59 +0200)]
multi_runsingle: change state on callback abort

Reported by: Marcin Adamski
Bug: http://curl.haxx.se/mail/lib-2011-09/0329.html

12 years agocurl tool: fix some more OOM handling
Yang Tse [Fri, 30 Sep 2011 18:56:56 +0000 (20:56 +0200)]
curl tool: fix some more OOM handling

12 years agoFix SSL disabled builds broken with 'SSL session sharing' commit 5793bc37
Yang Tse [Fri, 30 Sep 2011 19:09:59 +0000 (21:09 +0200)]
Fix SSL disabled builds broken with 'SSL session sharing' commit 5793bc37

12 years agosmtp_mail: fix memory leak
Daniel Stenberg [Thu, 29 Sep 2011 21:45:36 +0000 (23:45 +0200)]
smtp_mail: fix memory leak

... introduced in 7f304ab84f560c

12 years agosmtp_mail: Added support to MAIL FROM for the optional SIZE parameter
Steve Holme [Mon, 26 Sep 2011 13:07:54 +0000 (14:07 +0100)]
smtp_mail: Added support to MAIL FROM for the optional SIZE parameter

The size of the email can now be set via CURLOPT_INFILESIZE. This
allows the email to be rejected by the server, if supported, and the
maximum size has been configured on the server.

12 years agocurlverh.h: next release will be 7.23.0
Daniel Stenberg [Thu, 29 Sep 2011 06:52:47 +0000 (08:52 +0200)]
curlverh.h: next release will be 7.23.0

12 years agoRELEASE-NOTES: synced with 5898a6a09b211fc7e2
Daniel Stenberg [Thu, 29 Sep 2011 06:51:52 +0000 (08:51 +0200)]
RELEASE-NOTES: synced with 5898a6a09b211fc7e2

Bumped next release version to become 7.23.0 for the changes

12 years agocurl_easy_setopt: Added scp and sftp to the URL section
Dan Fandrich [Thu, 29 Sep 2011 04:33:42 +0000 (21:33 -0700)]
curl_easy_setopt: Added scp and sftp to the URL section

12 years agocurl_easy_setopt: A brief tidy up
Steve Holme [Thu, 22 Sep 2011 18:47:45 +0000 (19:47 +0100)]
curl_easy_setopt: A brief tidy up

Slight rewording of the CURLOPT_URL SMTP sub-section.

Corrected the incorrect use of hyphens on the three uses of
"zero-terminated" with "zero terminated" to match the rest of the
document.

Corrected the use of an out of place hyphen in CURLOPT_NOPROXY section.

12 years agoconfigure openssl version check: handle lack of L suffix
Daniel Stenberg [Wed, 28 Sep 2011 21:09:46 +0000 (23:09 +0200)]
configure openssl version check: handle lack of L suffix

It seems some versions of the OpenSSL version defines don't come with L
appended to the number, so let's deal with that nicely.