platform/upstream/curl.git
11 years agoDocumentation: Typo in docs/CONTRIBUTE
Alexander Klauer [Fri, 22 Feb 2013 12:06:56 +0000 (13:06 +0100)]
Documentation: Typo in docs/CONTRIBUTE

Fixes a typo get → git in docs/CONTRIBUTE.

11 years agorepository: ignore patch files generated by git
Alexander Klauer [Fri, 22 Feb 2013 12:06:55 +0000 (13:06 +0100)]
repository: ignore patch files generated by git

Ignores the patch files generated by the 'git format-patch' command.

11 years agolibcurl documentation: clarifications and typos
Alexander Klauer [Fri, 22 Feb 2013 12:06:54 +0000 (13:06 +0100)]
libcurl documentation: clarifications and typos

* Elaborates on default values of some curl_easy_setopt() options.
* Reminds the user to cast variadic arguments to curl_easy_setopt() to
  'void *' where curl internally interprets them as such.
* Clarifies the working of the CURLOPT_SEEKFUNCTION option for
  curl_easy_setopt().
* Fixes typo 'forth' → 'fourth'.
* Elaborates on CURL_SOCKET_TIMEOUT.
* Adds some missing periods.
* Notes that the return value of curl_version() must not be passed to
  free().

11 years agolib/url.c: Generic read/write data pointers
Alexander Klauer [Fri, 22 Feb 2013 12:06:53 +0000 (13:06 +0100)]
lib/url.c: Generic read/write data pointers

Always interprets the pointer passed with the CURLOPT_WRITEDATA or
CURLOPT_READDATA options of curl_easy_setopt() as a void pointer in
order to avoid problems in environments where FILE and void pointers
have non-trivial conversion.

11 years agolibcurl documentation: updates HTML index
Alexander Klauer [Fri, 22 Feb 2013 12:06:52 +0000 (13:06 +0100)]
libcurl documentation: updates HTML index

* Adds several links to documentation of library functions which were
  missing.
* Marks documentation of deprecated library functions "(deprecated)".
* Removes spurious .html suffixes.

11 years agoossl_seed: avoid recursive seeding!
Daniel Stenberg [Fri, 22 Feb 2013 21:54:31 +0000 (22:54 +0100)]
ossl_seed: avoid recursive seeding!

11 years agoFixed checking the socket if there is data waiting in the cache
Jiri Hruska [Fri, 15 Feb 2013 15:42:49 +0000 (16:42 +0100)]
Fixed checking the socket if there is data waiting in the cache

Use Curl_pp_moredata() in Curl_pp_multi_statemach() to check if there is
more data to be received, rather than the socket state, as a task could
hang waiting for more data from the socket itself.

11 years agoimap.c: Fixed an incorrect variable reference
Steve Holme [Fri, 22 Feb 2013 19:58:42 +0000 (19:58 +0000)]
imap.c: Fixed an incorrect variable reference

Fixed an incorrect variable reference which was introduced in commit
a1701eea289f as a result of a copy and paste from SMTP/POP3.

11 years agopingpong: Introduce Curl_pp_moredata()
Jiri Hruska [Thu, 14 Feb 2013 18:36:43 +0000 (19:36 +0100)]
pingpong: Introduce Curl_pp_moredata()

A simple function to test whether the PP is not sending and there are
still more data in its receiver cache. This will be later utilized to:

1) Change Curl_pp_multi_statemach() and Curl_pp_easy_statemach() to
   not test socket state and just call user's statemach_act() function
   when there are more data to process, because otherwise the task would
   just hang, waiting for more data from the socket.

2) Allow PP users to read multiple responses by looping as long as there
   are more data available and current phase is not finished.
   (Currently needed for correct processing of IMAP SELECT responses.)

11 years agoFEATURES: why yes, we do support metalink
Nick Zitzmann [Wed, 20 Feb 2013 02:15:32 +0000 (19:15 -0700)]
FEATURES: why yes, we do support metalink

I just noticed Metalink support wasn't listed as a feature of the tool.

11 years agometalink: fix improbable crash parsing metalink filename
Nick Zitzmann [Wed, 20 Feb 2013 02:03:39 +0000 (19:03 -0700)]
metalink: fix improbable crash parsing metalink filename

The this_url pointer wasn't being initialized, so if strdup() would return
null when copying the filename in a metalink file, then hilarity would
ensue during the cleanup phase. This change was brought to you by clang,
which noticed this and raised a warning.

11 years agosmtp.c: fix enumerated type mixed with another type
Yang Tse [Tue, 19 Feb 2013 15:53:13 +0000 (16:53 +0100)]
smtp.c: fix enumerated type mixed with another type

11 years agopolarssl threadlock cleanup
Yang Tse [Tue, 19 Feb 2013 12:11:55 +0000 (13:11 +0100)]
polarssl threadlock cleanup

11 years agodocs: schannel and darwinssl documentation improvements
Nick Zitzmann [Mon, 18 Feb 2013 23:27:30 +0000 (16:27 -0700)]
docs: schannel and darwinssl documentation improvements

Schannel and darwinssl use the certificates built into the
OS to do vert verification instead of bundles. darwinssl
is thread-safe. Corrected typos in the NSS docs.

11 years agoresolver_error: remove wrong error message output
Daniel Stenberg [Mon, 18 Feb 2013 21:52:58 +0000 (22:52 +0100)]
resolver_error: remove wrong error message output

The attempt to use gai_strerror() or alternative function didn't work as
the 'sock_error' field didn't contain the proper error code. But since
this hasn't been reported and thus isn't really a big deal I decided to
just scrap the whole attempt to output the detailed resolver error and
instead remain with just stating that the resolving of the name failed.

11 years agoCurl_resolver_is_resolved: show proper host name on failed resolve
Kim Vandry [Mon, 18 Feb 2013 20:36:34 +0000 (21:36 +0100)]
Curl_resolver_is_resolved: show proper host name on failed resolve

11 years agoCurl_resolver_is_resolved: fix compiler warning
Daniel Stenberg [Mon, 18 Feb 2013 12:40:13 +0000 (13:40 +0100)]
Curl_resolver_is_resolved: fix compiler warning

conversion to 'int' from 'long int' may alter its value

11 years agocompiler warning fix
Daniel Stenberg [Mon, 18 Feb 2013 11:56:03 +0000 (12:56 +0100)]
compiler warning fix

follow-up to commit ed7174c6f66, rename 'wait' to 'block'

11 years agocompiler warning fix: declaration of 'wait' shadows a global declaration
Daniel Stenberg [Sun, 17 Feb 2013 23:14:35 +0000 (00:14 +0100)]
compiler warning fix: declaration of 'wait' shadows a global declaration

It seems older gcc installations (at least) will cause warnings if we
name a variable 'wait'. Now changed to 'block' instead.

Reported by: Jiří Hruška
Bug: http://curl.haxx.se/mail/lib-2013-02/0247.html

11 years agoMacOSX-Framework: Make script work in Xcode 4.0 and later
Nick Zitzmann [Sun, 17 Feb 2013 21:30:38 +0000 (14:30 -0700)]
MacOSX-Framework: Make script work in Xcode 4.0 and later

Apple made a number of changes to Xcode 4. The SDKs were moved, the entire
Developer folder was moved, and PowerPC support was removed. The script
will now adapt to those changes and should be future-proofed against
additional changes in case Apple moves the Developer folder ever again.
Also, the minimum OS X version compiler option was removed, so that the
framework can be built against the latest SDK but still run in older cats.

11 years agodocs: refer to CURLOPT_ACCEPT_ENCODING instead of the old name
Daniel Stenberg [Sat, 16 Feb 2013 13:40:54 +0000 (14:40 +0100)]
docs: refer to CURLOPT_ACCEPT_ENCODING instead of the old name

11 years agoemail: Tidied up result code variables
Steve Holme [Sat, 16 Feb 2013 23:37:50 +0000 (23:37 +0000)]
email: Tidied up result code variables

Tidied up result variables to be consistent in name, declaration order
and default values.

11 years agontlm_core: fix compiler warning when building with clang
Nick Zitzmann [Sat, 16 Feb 2013 21:21:09 +0000 (14:21 -0700)]
ntlm_core: fix compiler warning when building with clang

Fixed a 64-to-32 compiler warning raised when building with
clang and the --with-darwinssl option.

11 years agoGuile-curl: a new libcurl binding
Daniel Stenberg [Sat, 16 Feb 2013 13:26:28 +0000 (14:26 +0100)]
Guile-curl: a new libcurl binding

11 years agopolarsslthreadlock: #include the proper memory and debug includes
Daniel Stenberg [Sat, 16 Feb 2013 12:56:08 +0000 (13:56 +0100)]
polarsslthreadlock: #include the proper memory and debug includes

Pointed out by Steve Holme

11 years agoemail: Removed unnecessary forward declaration
Steve Holme [Sat, 16 Feb 2013 10:28:32 +0000 (10:28 +0000)]
email: Removed unnecessary forward declaration

Due to the reordering of functions in commit 586f5d361474 the forward
declaration to state_upgrade_tls() are no longer required.

11 years agopop3.c: Added reference to RFC-5034
Steve Holme [Sat, 16 Feb 2013 10:18:01 +0000 (10:18 +0000)]
pop3.c: Added reference to RFC-5034

11 years agoPolarSSL: Change to cURL coding style
Willem Sparreboom [Wed, 13 Feb 2013 10:26:16 +0000 (11:26 +0100)]
PolarSSL: Change to cURL coding style

Repaired all curl/lib/checksrc.pl warnings in the previous four patches

11 years agoPolarSSL: WIN32 threading support for entropy
Willem Sparreboom [Mon, 28 Jan 2013 17:55:52 +0000 (18:55 +0100)]
PolarSSL: WIN32 threading support for entropy

Added WIN32 threading support for PolarSSL entropy if
--enable-threaded-resolver config flag is set and process.h can be found.

11 years agoPolarSSL: pthread support for entropy
Willem Sparreboom [Mon, 28 Jan 2013 17:31:22 +0000 (18:31 +0100)]
PolarSSL: pthread support for entropy

Added pthread support for polarssl entropy if --enable-threaded-resolver
config flag is set and pthread.h can be found.

11 years agoPolarSSL: changes to entropy/ctr_drbg/HAVEGE_RANDOM
Willem Sparreboom [Mon, 28 Jan 2013 15:03:40 +0000 (16:03 +0100)]
PolarSSL: changes to entropy/ctr_drbg/HAVEGE_RANDOM

Add non-threaded entropy and ctr_drbg and removed HAVEGE_RANDOM define

11 years agoPolarSSL: added human readable error strings
Willem Sparreboom [Mon, 28 Jan 2013 14:46:07 +0000 (15:46 +0100)]
PolarSSL: added human readable error strings

Print out human readable error strings for PolarSSL related errors

11 years agopop3: Removed unnecessary state changes on failure
Steve Holme [Fri, 15 Feb 2013 18:33:28 +0000 (18:33 +0000)]
pop3: Removed unnecessary state changes on failure

11 years agoimap: Removed unnecessary state change on failure
Steve Holme [Fri, 15 Feb 2013 18:33:10 +0000 (18:33 +0000)]
imap: Removed unnecessary state change on failure

11 years agometalink_cleanup: yet another follow-up fix
Daniel Stenberg [Fri, 15 Feb 2013 12:45:28 +0000 (13:45 +0100)]
metalink_cleanup: yet another follow-up fix

11 years agometalink_cleanup: define it without argument
Daniel Stenberg [Fri, 15 Feb 2013 10:19:59 +0000 (11:19 +0100)]
metalink_cleanup: define it without argument

Since the function takes no argument, the macro shouldn't take one as
some compilers will error out on that.

11 years agorename "easy" statemachines: call them block instead
Daniel Stenberg [Fri, 15 Feb 2013 10:03:42 +0000 (11:03 +0100)]
rename "easy" statemachines: call them block instead

... since they're not used by the easy interface really, I wanted to
remove the association. Also, I unified the pingpong statemachine driver
into a single function with a 'wait' argument: Curl_pp_statemach.

11 years agocurl_setup_once.h: definition of HAVE_CLOSE_S defines sclose() to close_s()
Gisle Vanem [Fri, 15 Feb 2013 01:11:57 +0000 (02:11 +0100)]
curl_setup_once.h: definition of HAVE_CLOSE_S defines sclose() to close_s()

11 years agoconfig-dos.h: define HAVE_CLOSE_S for MSDOS/Watt-32
Gisle Vanem [Fri, 15 Feb 2013 01:11:18 +0000 (02:11 +0100)]
config-dos.h: define HAVE_CLOSE_S for MSDOS/Watt-32

11 years agoconfig-dos.h: define strerror() to strerror_s_() for High-C
Gisle Vanem [Fri, 15 Feb 2013 00:51:19 +0000 (01:51 +0100)]
config-dos.h: define strerror() to strerror_s_() for High-C

11 years agoconfig-dos.h: define HAVE_TERMIOS_H only for djgpp
Gisle Vanem [Fri, 15 Feb 2013 00:38:39 +0000 (01:38 +0100)]
config-dos.h: define HAVE_TERMIOS_H only for djgpp

11 years agosmtp.c: Fixed a trailing whitespace
Steve Holme [Thu, 14 Feb 2013 20:06:03 +0000 (20:06 +0000)]
smtp.c: Fixed a trailing whitespace

Remove tailing whitespace introduced in commit 7ed689d24a4e.

11 years agopop3: Fixed blocking SSL connect when connecting via POP3S
Steve Holme [Thu, 14 Feb 2013 18:20:52 +0000 (18:20 +0000)]
pop3: Fixed blocking SSL connect when connecting via POP3S

A call to Curl_ssl_connect() was accidentally left in when the SSL/TLS
connection layer was reworked in 7.29. Not only would this cause the
connection to block but had the additional overhead of calling the
non-blocking connect a little bit later.

11 years agosmtp: Refactored the smtp_state_auth_resp() function
Steve Holme [Thu, 14 Feb 2013 18:15:07 +0000 (18:15 +0000)]
smtp: Refactored the smtp_state_auth_resp() function

Renamed smtp_state_auth_resp() function to match the implementations in
IMAP and POP3.

11 years agoremove ifdefs
Daniel Stenberg [Thu, 14 Feb 2013 10:41:57 +0000 (11:41 +0100)]
remove ifdefs

Clarify the code by reducing ifdefs

11 years agostrlcat: remove function
Daniel Stenberg [Wed, 13 Feb 2013 12:18:43 +0000 (13:18 +0100)]
strlcat: remove function

This function was only used twice, both in places where performance
isn't crucial (socks + if2ip). Removing the use of this function removes
the need to have our private version for systems without it == reduced
amount of code.

Also, in the SOCKS case it is clearly better to fail gracefully rather
than to truncate the results.

This work was triggered by a bug report on the strcal prototype in
strequal.h.

strlcat was added in commit db70cd28 in February 2001!

Bug: http://curl.haxx.se/bug/view.cgi?id=1192
Reported by: Jeremy Huddleston

11 years agoCurl_FormBoundary: made static
Daniel Stenberg [Thu, 14 Feb 2013 09:32:04 +0000 (10:32 +0100)]
Curl_FormBoundary: made static

As Curl_FormBoundary() is no longer used outside of this file (since
commit ad7291c1a9d), it is now renamed to formboundary() and is made
static.

11 years agoossl_seed: fix the last resort PRNG seeding
Daniel Stenberg [Wed, 13 Feb 2013 23:06:19 +0000 (00:06 +0100)]
ossl_seed: fix the last resort PRNG seeding

Instead of just abusing the pseudo-randomizer from Curl_FormBoundary(),
this now uses Curl_ossl_random() to get entropy.

11 years agoemail: Tidy up before additional IMAP work
Steve Holme [Wed, 13 Feb 2013 20:12:21 +0000 (20:12 +0000)]
email: Tidy up before additional IMAP work

Replaced two explicit comparisons of CURLE_OK with boolean alternatives.

General tidy up of comments.

11 years agosmtp: Removed duplicate pingpong structure initialisation
Steve Holme [Wed, 13 Feb 2013 18:22:20 +0000 (18:22 +0000)]
smtp: Removed duplicate pingpong structure initialisation

The smtp_connect() function was setting the member variables of the
pingpong structure twice, once before calling Curl_pp_init() and once
after!

11 years agomove msvc IDE related files to 'vs' directory tree
Yang Tse [Wed, 13 Feb 2013 16:02:38 +0000 (17:02 +0100)]
move msvc IDE related files to 'vs' directory tree

Use 'vs' directory tree given that 'vc' intended one clashes
with an already existing build target in file Makefile.dist.

11 years agoinstall-sh: updated to support multiple source files as arguments
Daniel Stenberg [Wed, 13 Feb 2013 14:41:59 +0000 (15:41 +0100)]
install-sh: updated to support multiple source files as arguments

Version 7.29.0 uses Makefiles generated with a newer version of the
autotools than the previous 7.28.1. These Makefiles try to install
e.g. header files by calling install-sh with multiple source files as
arguments. The bundled install-sh is to old and does not support this.

The problem only occurs, if install-sh is actually being used, ie. the
platform install executable is to old or not usable. Example: Solaris
10.

The files install-sh and mkinstalldirs are now updated with the automake
1.11.3 versions. A better fix might be to completely remove them from
git and force the files to be added/created during buildconf.

Bug: http://curl.haxx.se/bug/view.cgi?id=1195
Reported by: Rainer Jung

11 years agomove msvc IDE related files to 'vc' directory tree
Yang Tse [Mon, 11 Feb 2013 18:11:14 +0000 (19:11 +0100)]
move msvc IDE related files to 'vc' directory tree

11 years agomsvc IDE 'vc' directory tree preparation
Yang Tse [Mon, 11 Feb 2013 18:00:38 +0000 (19:00 +0100)]
msvc IDE 'vc' directory tree preparation

11 years agoimap: Corrected a whitespace issue from previous commit
Steve Holme [Tue, 12 Feb 2013 23:05:14 +0000 (23:05 +0000)]
imap: Corrected a whitespace issue from previous commit

Fixed a small whitespace issue that crept in there in commit
508cdf4da4d7.

11 years agoemail: Another post optimisation of endofresp() tidy up
Steve Holme [Tue, 12 Feb 2013 23:00:34 +0000 (23:00 +0000)]
email: Another post optimisation of endofresp() tidy up

11 years agosasl: Fixed null pointer reference when decoding empty digest challenge
Steve Holme [Tue, 12 Feb 2013 22:20:44 +0000 (22:20 +0000)]
sasl: Fixed null pointer reference when decoding empty digest challenge

Fixed a null pointer reference when an empty challenge is passed to the
Curl_sasl_create_digest_md5_message() function.

Bug: http://sourceforge.net/p/curl/bugs/1193/
Reported by: Saran Neti

11 years agoemail: Post optimisation of endofresp() tidy up
Steve Holme [Tue, 12 Feb 2013 21:01:50 +0000 (21:01 +0000)]
email: Post optimisation of endofresp() tidy up

Removed unnecessary end of line check and return.

11 years agodarwinssl: Fix send glitchiness with data > 32 or so KB
Nick Zitzmann [Tue, 12 Feb 2013 20:02:36 +0000 (13:02 -0700)]
darwinssl: Fix send glitchiness with data > 32 or so KB

An ambiguity in the SSLWrite() documentation lead to a bad inference in the
code where we assumed SSLWrite() returned the amount of bytes written to
the socket, when that is not actually true; it returns the amount of data
that is buffered for writing to the socket if it returns errSSLWouldBlock.
Now darwinssl_send() returns CURLE_AGAIN if data is buffered but not written.

Reference URL: http://curl.haxx.se/mail/lib-2013-02/0145.html

11 years agopingpong.h: Fixed line length over 78 characters from b56c9eb48e3c
Steve Holme [Tue, 12 Feb 2013 19:28:23 +0000 (19:28 +0000)]
pingpong.h: Fixed line length over 78 characters from b56c9eb48e3c

11 years agopingpong: Optimised the endofresp() function
Steve Holme [Tue, 12 Feb 2013 18:08:48 +0000 (18:08 +0000)]
pingpong: Optimised the endofresp() function

Reworked the pp->endofresp() function so that the conndata, line and
line length are passed down to it just as with Curl_client_write()
rather than each implementation of the function having to query
these values.

Additionally changed the int return type to bool as this is more
representative of the function's usage.

11 years agoemail: Post STARTLS capability code tidy up (Part Three)
Steve Holme [Mon, 11 Feb 2013 23:13:50 +0000 (23:13 +0000)]
email: Post STARTLS capability code tidy up (Part Three)

Corrected the order of the upgrade_tls() functions and moved the handler
upgrade and getsock() functions out from the middle of the state related
functions.

11 years agoemail: Post STARTLS capability code tidy up (Part Two)
Steve Holme [Mon, 11 Feb 2013 22:41:08 +0000 (22:41 +0000)]
email: Post STARTLS capability code tidy up (Part Two)

Corrected the order of the pop3_state_capa() / imap_state_capability()
and the pop3_state_capa_resp() / imap_state_capability_resp() functions
to match the execution order.

11 years agoSOCKS: fix socks proxy when noproxy matched
ulion [Sun, 10 Feb 2013 00:16:24 +0000 (08:16 +0800)]
SOCKS: fix socks proxy when noproxy matched

Test 1212 added to verify

Bug: http://curl.haxx.se/bug/view.cgi?id=1190

11 years agontlm: Updated comments for the addition of SASL support to IMAP in v7.29
Steve Holme [Mon, 11 Feb 2013 14:26:18 +0000 (14:26 +0000)]
ntlm: Updated comments for the addition of SASL support to IMAP in v7.29

11 years agoRELEASE-NOTES: Updated following the recent imap/pop3/smtp changes
Steve Holme [Sun, 10 Feb 2013 22:32:47 +0000 (22:32 +0000)]
RELEASE-NOTES: Updated following the recent imap/pop3/smtp changes

11 years agoFix NULL pointer reference when closing an unused multi handle.
Linus Nielsen Feltzing [Sun, 10 Feb 2013 21:57:58 +0000 (22:57 +0100)]
Fix NULL pointer reference when closing an unused multi handle.

11 years agoemail: Post STARTLS capability code tidy up (Part One)
Steve Holme [Sun, 10 Feb 2013 21:18:30 +0000 (21:18 +0000)]
email: Post STARTLS capability code tidy up (Part One)

Corrected the order of the CAPA / CAPABILITY state machine constants to
match the execution order.

11 years agoimap: Fixed memory leak following commit f6010d9a0359
Steve Holme [Sun, 10 Feb 2013 20:32:36 +0000 (20:32 +0000)]
imap: Fixed memory leak following commit f6010d9a0359

11 years agosmtp: Added support for the STARTTLS capability (Part Two)
Steve Holme [Sun, 10 Feb 2013 19:59:42 +0000 (19:59 +0000)]
smtp: Added support for the STARTTLS capability (Part Two)

Added honoring of the tls_supported flag when starting a TLS upgrade
rather than unconditionally attempting it. If the use_ssl flag is set
to CURLUSESSL_TRY and the server doesn't support TLS upgrades then the
connection will continue to authenticate. If this flag is set to
CURLUSESSL_ALL then the connection will complete with a failure as it
did previously.

11 years agopop3: Added support for the STLS capability (Part Three)
Steve Holme [Sun, 10 Feb 2013 19:56:54 +0000 (19:56 +0000)]
pop3: Added support for the STLS capability (Part Three)

Added honoring of the tls_supported flag when starting a TLS upgrade
rather than unconditionally attempting it. If the use_ssl flag is set
to CURLUSESSL_TRY and the server doesn't support TLS upgrades then the
connection will continue to authenticate. If this flag is set to
CURLUSESSL_ALL then the connection will complete with a failure as it
did previously.

11 years agoimap: Added support for the STARTTLS capability (Part Three)
Steve Holme [Sun, 10 Feb 2013 19:53:49 +0000 (19:53 +0000)]
imap: Added support for the STARTTLS capability (Part Three)

Added honoring of the tls_supported flag when starting a TLS upgrade
rather than unconditionally attempting it. If the use_ssl flag is set
to CURLUSESSL_TRY and the server doesn't support TLS upgrades then the
connection will continue to authenticate. If this flag is set to
CURLUSESSL_ALL then the connection will complete with a failure as it
did previously.

11 years agohtmltitle: fix suggested build command
Alessandro Ghedini [Sun, 10 Feb 2013 17:47:14 +0000 (18:47 +0100)]
htmltitle: fix suggested build command

11 years agopop3: Added support for the STLS capability (Part Two)
Steve Holme [Sun, 10 Feb 2013 15:45:01 +0000 (15:45 +0000)]
pop3: Added support for the STLS capability (Part Two)

Added sending of initial CAPA command before STLS is sent. This allows
for the detection of the capability before trying to upgrade the
connection.

11 years agoimap: Added support for the STARTTLS capability (Part Two)
Steve Holme [Sun, 10 Feb 2013 15:41:56 +0000 (15:41 +0000)]
imap: Added support for the STARTTLS capability (Part Two)

Added sending of initial CAPABILITY command before STARTTLS is sent.
This allows for the detection of the capability before trying to
upgrade the connection.

11 years agosmtp: Added support for the STLS capability (Part One)
Steve Holme [Sun, 10 Feb 2013 12:19:10 +0000 (12:19 +0000)]
smtp: Added support for the STLS capability (Part One)

Introduced detection of the STARTTLS capability, in order to add support
for TLS upgrades without unconditionally sending the STARTTLS command.

11 years agopop3: Added support for the STLS capability (Part One)
Steve Holme [Sun, 10 Feb 2013 12:16:27 +0000 (12:16 +0000)]
pop3: Added support for the STLS capability (Part One)

Introduced detection of the STLS capability, in order to add support
for TLS upgrades without unconditionally sending the STLS command.

11 years agoimap: Added support for the STARTTLS capability (Part One)
Steve Holme [Sun, 10 Feb 2013 12:13:55 +0000 (12:13 +0000)]
imap: Added support for the STARTTLS capability (Part One)

Introduced detection of the STARTTLS capability, in order to add support
for TLS upgrades without unconditionally sending the STARTTLS command.

11 years agoRELEASE-NOTES: synced with 92f7606f29b704
Steve Holme [Sun, 10 Feb 2013 11:41:42 +0000 (11:41 +0000)]
RELEASE-NOTES: synced with 92f7606f29b704

11 years agosmtp: Fixed an issue when processing EHLO failure responses (Part 3)
Steve Holme [Sat, 9 Feb 2013 19:01:15 +0000 (19:01 +0000)]
smtp: Fixed an issue when processing EHLO failure responses (Part 3)

Follow up fix to commit 62bd21746443 to cater for servers that don't
respond with a 250 in their EHLO responses. Additionally updated the
SMTP tests to respond with a 250 response code as per RFC5321.

11 years agopop3: Fixed SASL authentication capability detection
Steve Holme [Sat, 9 Feb 2013 17:17:02 +0000 (17:17 +0000)]
pop3: Fixed SASL authentication capability detection

Fixed the SASL capability detection to include the space character
before the authentication mechanism list. Otherwise a capability such
as SASLSOMETHING would be interpreted as enabling SASL and potentially
trying to identify SOMETHING as a mechanism.

11 years agopop3: Fixed incorrect return value from pop3_endofresp()
Steve Holme [Sat, 9 Feb 2013 15:23:30 +0000 (15:23 +0000)]
pop3: Fixed incorrect return value from pop3_endofresp()

Corrected an incorrect return value when -ERR is received from the
server - introduced in commit b5bb61ee697b (June 2012).

11 years agosmtp: Fixed an issue when processing EHLO failure responses (Part 2)
Steve Holme [Sat, 9 Feb 2013 14:32:20 +0000 (14:32 +0000)]
smtp: Fixed an issue when processing EHLO failure responses (Part 2)

Follow up fix to commit 23d17190ee32 as EHLO capabilities can exist
within a positive response line.

11 years agosmtp: Fixed an issue with missing capabilities after the AUTH line
Steve Holme [Sat, 9 Feb 2013 14:26:22 +0000 (14:26 +0000)]
smtp: Fixed an issue with missing capabilities after the AUTH line

Follow up to commit 40f9bb787f05 to fix missing capabilities after an
AUTH line.

11 years agodarwinssl: Make certificate errors less techy
Nick Zitzmann [Sat, 9 Feb 2013 01:34:11 +0000 (18:34 -0700)]
darwinssl: Make certificate errors less techy

Previously if a problem was found with one of the server's certificates,
we'd log an OSStatus for the end user to look up. Now we explain what
was wrong with the site's certificate chain. Also un-did part of the
previous commit where the code wouldn't catch errSSLServerAuthCompleted
if built under Leopard.

11 years agoUpdated dependency libs.
Guenter Knauf [Sat, 9 Feb 2013 00:35:11 +0000 (01:35 +0100)]
Updated dependency libs.

11 years agoimap: Corrected some comments
Steve Holme [Sat, 9 Feb 2013 00:26:40 +0000 (00:26 +0000)]
imap: Corrected some comments

11 years agosmtp: Fixed an issue when processing EHLO failure responses
Steve Holme [Sat, 9 Feb 2013 00:22:25 +0000 (00:22 +0000)]
smtp: Fixed an issue when processing EHLO failure responses

Fixed a small issue where smtp_endofresp() would look for capabilities
in the description part of a failure response. In theory a server
shouldn't respond with SIZE or AUTH in an EHLO command's failure
response but if it did then capabilities would be unnecessarily set
before eventually failing.

11 years agopop3: Reworked pop3_endofresp() to simplify it little
Steve Holme [Fri, 8 Feb 2013 23:07:20 +0000 (23:07 +0000)]
pop3: Reworked pop3_endofresp() to simplify it little

Reworked pop3_endofresp() to simplify it and provide consistency between
imap and smtp.

11 years agoimap: Renamed state variables in imap_authenticate()
Steve Holme [Fri, 8 Feb 2013 21:40:54 +0000 (21:40 +0000)]
imap: Renamed state variables in imap_authenticate()

Renamed the authstate1 and authstate2 variables in imap_authenticate()
as the old name was a left over from when there was only one state
variable which was named due to a clash with the state() function.

Additionally this provides consistency with the smtp module.

11 years agosmtp: Reworked smtp_endofresp() to allow for extra capability detection
Steve Holme [Fri, 8 Feb 2013 21:19:34 +0000 (21:19 +0000)]
smtp: Reworked smtp_endofresp() to allow for extra capability detection

11 years agosmtp: Renamed smtp_state_auth_passwd_resp() function
Steve Holme [Fri, 8 Feb 2013 20:54:03 +0000 (20:54 +0000)]
smtp: Renamed smtp_state_auth_passwd_resp() function

Renamed the login password response function to better describe it's
purpose as well as for consistency with the imap and pop3 modules.

11 years agontlm: fix memory leak
Gisle Vanem [Fri, 8 Feb 2013 14:50:23 +0000 (15:50 +0100)]
ntlm: fix memory leak

Running tests\libtest\libntlmconnect.exe reveals a 1 byte (!) leak in
./lib/curl_ntlm_msgs.c:

perl ..\memanalyze.pl c:memdebug.curl
Leak detected: memory still allocated: 1 bytes
At 9771e8, there's 1 bytes.
allocated by curl_ntlm_msgs.c:399

Snippet from curl_ntlm_msgs.c:
   /* setup ntlm identity's domain and length */
   dup_domain.tchar_ptr = malloc(sizeof(TCHAR) * (domlen + 1));

(my domlen == 0).

'dup_domain.tbyte_ptr' looks to be freed in Curl_ntlm_sspi_cleanup() via
'ntlm->identity.Domain'. But I see no freeing of 'dup_domain.tchar_ptr'.

11 years agoDONE: consider callback-aborted transfers premature
Daniel Stenberg [Fri, 8 Feb 2013 12:48:56 +0000 (13:48 +0100)]
DONE: consider callback-aborted transfers premature

This bug report properly identified that when doing SMTP and aborting
the transfer with a callback, it must be considered aborted prematurely
by the code to avoid QUIT etc to be attempted as that would cause a
hang.

The new test case 1507 verifies this behavior.

Reported by: Patricia Muscalu
Bug: http://curl.haxx.se/bug/view.cgi?id=1184

11 years agoFAQ: refreshed some phrases
Daniel Stenberg [Fri, 8 Feb 2013 08:58:23 +0000 (09:58 +0100)]
FAQ: refreshed some phrases

11 years agodarwinssl: Fix build under Leopard
Nick Zitzmann [Fri, 8 Feb 2013 01:45:07 +0000 (18:45 -0700)]
darwinssl: Fix build under Leopard

It turns out that Leopard (OS X 10.5) doesn't have constants for the ECDH
ciphers in its headers, so the cases for them have been taken out of the
build when building under Leopard. Also added a standard function for
getting a string description of a SecCertificateRef.

11 years agoRELEASE-NOTES: Added new imap features
Steve Holme [Thu, 7 Feb 2013 21:20:11 +0000 (21:20 +0000)]
RELEASE-NOTES: Added new imap features

11 years agoimap: Added support for SASL-IR extension (Part 2)
Steve Holme [Thu, 7 Feb 2013 21:06:53 +0000 (21:06 +0000)]
imap: Added support for SASL-IR extension (Part 2)

Modified imap_authenticate() to add support for sending the initial
response with the AUTHENTICATE command, as per RFC4959.

11 years agosmtp: Updated SMTP_AUTH_PASSWD state constant
Steve Holme [Thu, 7 Feb 2013 20:37:11 +0000 (20:37 +0000)]
smtp: Updated SMTP_AUTH_PASSWD state constant

Changed the SMTP_AUTH_PASSWD state constant to SMTP_AUTH_LOGIN_PASSWD to
better describe the state as the second part of an AUTH LOGIN command,
as well as for consistency with the imap and pop3 modules.

11 years agoimap: Added support for SASL-IR extension (Part 1)
Steve Holme [Thu, 7 Feb 2013 20:02:06 +0000 (20:02 +0000)]
imap: Added support for SASL-IR extension (Part 1)

Introduced detection of the SASL-IR capability, in order to add support
for sending the initial response with the AUTHENTICATE command, as per
RFC4959.