platform/upstream/curl.git
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.

11 years agoRevert "vc: remove explicit MSVC6 IDE project file and documentation"
Daniel Stenberg [Thu, 7 Feb 2013 13:58:01 +0000 (14:58 +0100)]
Revert "vc: remove explicit MSVC6 IDE project file and documentation"

This reverts commit 0e66d5878edc3d7ffc445116d194b58bbc7504b9.

11 years agoimap: Changed response tag generation to be completely unique
Steve Holme [Thu, 7 Feb 2013 00:18:23 +0000 (00:18 +0000)]
imap: Changed response tag generation to be completely unique

Updated the automatic response tag generation to follow the examples
given in RC3501, which list a 4 character string such as A001, A002,
etc.

As a unique identifier should be generated for each command the string
generation is based on the connection id and the incrementing command
id.

11 years agoTweak the Android.mk file for its new location
Dan Fandrich [Wed, 6 Feb 2013 22:42:36 +0000 (23:42 +0100)]
Tweak the Android.mk file for its new location

This is untested, but ought to be enough to still allow it
to work automatically when the entire curl source tree is
dropped into a full Android source tree.

11 years agovc: remove explicit MSVC6 IDE project file and documentation
Daniel Stenberg [Wed, 6 Feb 2013 22:28:39 +0000 (23:28 +0100)]
vc: remove explicit MSVC6 IDE project file and documentation

VC6 is _very_ old and we provide working makefiles even for that
compiler. Users who build with the IDE never use that method and project
file anyway and it was just lingering in the root dir.

11 years agoimap: Small variable rename in preparation for upcoming change
Steve Holme [Wed, 6 Feb 2013 22:22:57 +0000 (22:22 +0000)]
imap: Small variable rename in preparation for upcoming change

Renamed a couple of variables and updated some comments in
preparation for upcoming command id / response tag change.

11 years agomsvc: move Makefile.msvc.names into winbuild/
Daniel Stenberg [Wed, 6 Feb 2013 22:14:11 +0000 (23:14 +0100)]
msvc: move Makefile.msvc.names into winbuild/

In an attempt to clear up misc files from the root dir

11 years agobuild: move Android.mk to packages/Android/
Daniel Stenberg [Wed, 6 Feb 2013 22:08:05 +0000 (23:08 +0100)]
build: move Android.mk to packages/Android/

11 years agoemacs files: remove from git and dist
Daniel Stenberg [Wed, 6 Feb 2013 22:04:02 +0000 (23:04 +0100)]
emacs files: remove from git and dist

We don't need them and I doubt many people used them. We also don't have
any configs for other editors and we wouldn't want that.

11 years agoemail: Moved starttls code in separate functions
Steve Holme [Wed, 6 Feb 2013 20:02:36 +0000 (20:02 +0000)]
email: Moved starttls code in separate functions

To help maintain the readability of the code in imap.c, pop3.c and
smtp.c moved the starttls code into state_starttls() functions.

11 years agoFEATURES: More NTLM and SSL changes, added two others, fixed typo
Nick Zitzmann [Wed, 6 Feb 2013 17:34:53 +0000 (10:34 -0700)]
FEATURES: More NTLM and SSL changes, added two others, fixed typo

Added IDN and HTTP data compression as they were left out of the
document until now.

Added notes for qssl, schannel and Secure Transport supporting SSLv2,
Secure Transport supports NTLM, and axTLS does not support SSLv3.

There was also a typo; "AUTH TSL" should be "AUTH TLS".

11 years agocurl-config.in: do not randomly mix tabs and spaces
Kamil Dudka [Wed, 6 Feb 2013 13:10:16 +0000 (14:10 +0100)]
curl-config.in: do not randomly mix tabs and spaces

11 years ago7.29.1: onwards!
Daniel Stenberg [Wed, 6 Feb 2013 13:50:39 +0000 (14:50 +0100)]
7.29.1: onwards!

11 years agoTHANKS: 12 contributors from 7.29.0
Daniel Stenberg [Wed, 6 Feb 2013 10:52:22 +0000 (11:52 +0100)]
THANKS: 12 contributors from 7.29.0

11 years agovms: config-vms.h is removed, no use trying to distribute it
Daniel Stenberg [Wed, 6 Feb 2013 10:11:55 +0000 (11:11 +0100)]
vms: config-vms.h is removed, no use trying to distribute it

11 years agoRELEASE-NOTES: mention the SASL buffer overflow
Daniel Stenberg [Wed, 6 Feb 2013 10:02:18 +0000 (11:02 +0100)]
RELEASE-NOTES: mention the SASL buffer overflow

11 years agoCurl_sasl_create_digest_md5_message: fix buffer overflow
Eldar Zaitov [Wed, 30 Jan 2013 22:22:27 +0000 (23:22 +0100)]
Curl_sasl_create_digest_md5_message: fix buffer overflow

When negotiating SASL DIGEST-MD5 authentication, the function
Curl_sasl_create_digest_md5_message() uses the data provided from the
server without doing the proper length checks and that data is then
appended to a local fixed-size buffer on the stack.

This vulnerability can be exploited by someone who is in control of a
server that a libcurl based program is accessing with POP3, SMTP or
IMAP. For applications that accept user provided URLs, it is also
thinkable that a malicious user would feed an application with a URL to
a server hosting code targetting this flaw.

Bug: http://curl.haxx.se/docs/adv_20130206.html

11 years agoFEATURES: Removed erroneous whitespace
Steve Holme [Wed, 6 Feb 2013 09:29:50 +0000 (09:29 +0000)]
FEATURES: Removed erroneous whitespace

Removed whitespace introduced in commit 5f8f20f5e65b that caused
formatting issues when generating the website docs.

11 years agosetup-vms.h: post VMS patch cleanup - III
Yang Tse [Wed, 6 Feb 2013 03:53:34 +0000 (04:53 +0100)]
setup-vms.h: post VMS patch cleanup - III

- rename post-config-vms.h to setup-vms.h
- move its inclusion into proper location in curl_setup.h

11 years agovms_show: post VMS patch cleanup - II
Yang Tse [Wed, 6 Feb 2013 03:51:55 +0000 (04:51 +0100)]
vms_show: post VMS patch cleanup - II

- remove multiple declarations of vms_show and add comments

11 years agotool_main.c: post VMS patch cleanup - I
Yang Tse [Wed, 6 Feb 2013 03:51:00 +0000 (04:51 +0100)]
tool_main.c: post VMS patch cleanup - I

- remove header inclusion already done in curl_setup_once.h

11 years agoFEATURES: Added SSPI to list of NTLM libraries
Steve Holme [Wed, 6 Feb 2013 00:36:54 +0000 (00:36 +0000)]
FEATURES: Added SSPI to list of NTLM libraries

11 years agoFEATURES: Added Secure Transport and qssl to list of SSL libraries
Steve Holme [Wed, 6 Feb 2013 00:30:08 +0000 (00:30 +0000)]
FEATURES: Added Secure Transport and qssl to list of SSL libraries

11 years agoFEATURES: Added email feature set
Steve Holme [Wed, 6 Feb 2013 00:28:50 +0000 (00:28 +0000)]
FEATURES: Added email feature set

Added SMTP, SMTPS, POP3, POP3S, IMAP and IMAPS features.

11 years agoimap.h: Corrected incorrect comment clarification
Steve Holme [Tue, 5 Feb 2013 23:59:47 +0000 (23:59 +0000)]
imap.h: Corrected incorrect comment clarification

Corrected comment clarification made in commit 167717b8069a.

11 years agoCOPYING: Updated copyright year to include 2013
Steve Holme [Tue, 5 Feb 2013 23:05:50 +0000 (23:05 +0000)]
COPYING: Updated copyright year to include 2013

11 years agoRELEASE-NOTES: synced with 25f351424b3538
Daniel Stenberg [Tue, 5 Feb 2013 22:19:19 +0000 (23:19 +0100)]
RELEASE-NOTES: synced with 25f351424b3538

8 more bug fixes mentioned

11 years agoVMS: fix and generate the VMS build config
John E. Malmberg [Mon, 4 Feb 2013 21:56:44 +0000 (22:56 +0100)]
VMS: fix and generate the VMS build config

config_h.com is a new file that generates a config.h file based on the
curl_config.h.in file and a quick scan of the configure script.  This is
actually a generic procedure that is shared with other VMS packages.

The existing pre-built config-vms.h had over 100 entries that were not
correct and in some cases conflicted with the build options available in
the build_vms.com.

generate_config_vms_h_curl.com is a helper procedure to the
config_h.com.  It covers the cases that the generic config_h.com is not
able to figure out, and accepts input from the build_vms.com procedure.

build_curlbuild_h.com is a new file to generate the curlbuild.h file
that Curl is now using when it is using a curl_config.h file.

post-config-vms.h is a new file that is needed to provide VMS specific
definitions, and most of them need to be set before the system header
files are included.

The VMS build procedure is fixed:

   1. Fixed to link in the correct HP ssl library.
   2. Fixed to detect if HP Kerberos is installed.
   3. Fixed to detect if HP LDAP is installed.
   4. Fixed to detect if gnv$libzshr is installed.
   5. Simplified the input parameter parsing to not use a loop.
   6. Warn that 64 bit pointer option support is not complete
      in comments.
   7. Default to IEEE floating if platform supports it so
      resulting libcurl will be compatible with other
      open source projects on VMS.
   8. Default to LARGEFILE if platform supports it.
   9. Default to enable SSL, LDAP, Kerberos, libz
      if the libraries are present.
   10. Build with exact case global symbols for libcurl.
   11. Generate linker option file needed.
   12. Compiler list option only commonly needed items.
   13. fulllist option for those who really want it.
   14. Create debug symbol file on Alpha, IA64.

11 years agoCurl_proxyCONNECT: return once CONNECT is sent
Daniel Stenberg [Tue, 5 Feb 2013 22:01:50 +0000 (23:01 +0100)]
Curl_proxyCONNECT: return once CONNECT is sent

By doing this unconditionally, we infer a simpler and more defined
behavior. This also has the upside that test 1021 no longer fails for me
even if I run with valgrind.

Also fixed some wrong comments.

11 years agoemail: Reworked comments in the endofresp() functions
Steve Holme [Tue, 5 Feb 2013 21:09:34 +0000 (21:09 +0000)]
email: Reworked comments in the endofresp() functions

Tidied up the comments in the endofresp() functions to be more
meaningful prior to release.

11 years agoschannel: Removed extended error connection setup flag
Marc Hoersken [Tue, 5 Feb 2013 21:02:45 +0000 (22:02 +0100)]
schannel: Removed extended error connection setup flag

According KB975858 this flag may cause problems on Windows 7 and
Windows Server 2008 R2 systems. Extended error information is not
currently used by libcurl and therefore not a requirement.

The flag may improve the SSL-connection shutdown in case of an
error. This means it might be a good improvement in the future.

Fixes bug/issue #1187 - thanks for the report

11 years agosingleipconnect: Update *sockp for all CURLE_OK
Tor Arntsen [Tue, 5 Feb 2013 16:26:07 +0000 (17:26 +0100)]
singleipconnect: Update *sockp for all CURLE_OK

The 56b7c87c7 change left a case where a good sockfd was not copied to
*sockp before returning with CURLE_OK

11 years agocurl_easy_perform: Value stored to 'mcode' is never read
Daniel Stenberg [Tue, 5 Feb 2013 13:09:18 +0000 (14:09 +0100)]
curl_easy_perform: Value stored to 'mcode' is never read

pointed out by clang-analyzer

11 years agosingleipconnect: remove dead assignment
Daniel Stenberg [Tue, 5 Feb 2013 13:07:39 +0000 (14:07 +0100)]
singleipconnect: remove dead assignment

pointed out by clang-analyzer

11 years agoCURLMOPT_MAXCONNECTS: restore functionality
Linus Nielsen Feltzing [Tue, 5 Feb 2013 08:07:27 +0000 (09:07 +0100)]
CURLMOPT_MAXCONNECTS: restore functionality

When a connection is no longer used, it is kept in the cache. If the
cache is full, the oldest idle connection is closed. If no connection is
idle, the current one is closed instead.

11 years agoRELEASE-NOTES: Updated following recent changes to the email protocols
Steve Holme [Tue, 5 Feb 2013 00:11:24 +0000 (00:11 +0000)]
RELEASE-NOTES: Updated following recent changes to the email protocols

Added recent additions and fixes following the changes to imap, pop3
and smtp. Additionally added another contributor that helped to test
the imap sasl changes.

11 years agoemail: Provided extra comments following recent pop3/imap fixes
Steve Holme [Mon, 4 Feb 2013 23:51:36 +0000 (23:51 +0000)]
email: Provided extra comments following recent pop3/imap fixes

Provided additional clarification about the logic of the authenticate()
functions following commit 6b6bdc83bd36 and b4270a9af1d0.

11 years agowinbuild: include version info for .dll .exe
Andrei Kurushin [Mon, 4 Feb 2013 23:08:01 +0000 (00:08 +0100)]
winbuild: include version info for .dll .exe

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

11 years agoFAQ: clarify 5.13 How do I stop an ongoing transfer
Daniel Stenberg [Mon, 4 Feb 2013 21:46:51 +0000 (22:46 +0100)]
FAQ: clarify 5.13 How do I stop an ongoing transfer

Rich Gray provided good feedback and we now clarify that you can in fact
stop a multi transfer at any point you like by removing the easy handle.

11 years agocmake: Fix mingw build
Matt Arsenault [Mon, 4 Feb 2013 21:35:09 +0000 (22:35 +0100)]
cmake: Fix mingw build

11 years agocmake: updated OpenSSL build
Sergei Nikulov [Thu, 17 Jan 2013 09:44:05 +0000 (13:44 +0400)]
cmake: updated OpenSSL build

11 years agopop3.c: Updated variable names to use shorter / more readable variant
Steve Holme [Mon, 4 Feb 2013 20:33:30 +0000 (20:33 +0000)]
pop3.c: Updated variable names to use shorter / more readable variant

Tidied up code from commit 6b6bdc83bdUpdated where a few instances of
the pop3c struct variable used the longer conndata struct rather than
matching what other code in pop3_authenticate() used.

11 years agoupdated copyright years.
Guenter Knauf [Mon, 4 Feb 2013 03:50:31 +0000 (04:50 +0100)]
updated copyright years.

11 years agoconfigure: update the copyright years for the output.
Guenter Knauf [Mon, 4 Feb 2013 03:47:26 +0000 (04:47 +0100)]
configure: update the copyright years for the output.

11 years agoimap: Fixed no known authentication mechanism when fallback is required
Steve Holme [Sun, 3 Feb 2013 23:58:03 +0000 (23:58 +0000)]
imap: Fixed no known authentication mechanism when fallback is required

Fixed an issue where (lib)curl is compiled without support for a
supported challenge-response based SASL authentication mechanism, such
as CRAM-MD5 or NTLM, the server doesn't support the LOGIN or PLAIN
mechanisms and (lib)curl doesn't fallback to Clear Text authentication.

Note: In order to fallback to Clear Text authentication properly this
fix adds support for the LOGINDISABLED server capability.
imap: Fixed no known authentication mechanism when fallback is required

Fixed an issue where (lib)curl is compiled without support for a
supported challenge-response based SASL authentication mechanism, such
as CRAM-MD5 or NTLM, the server doesn't support the LOGIN or PLAIN
mechanisms and (lib)curl doesn't fallback to Clear Text authentication.

Note: In order to fallback to Clear Text authentication properly this
fix adds support for the LOGINDISABLED server capability.

Related bug: http://curl.haxx.se/mail/lib-2013-02/0004.html
Reported by: Stanislav Ivochkin