platform/upstream/curl.git
12 years agoruntests: yassl and polarssl are not openssl
Daniel Stenberg [Tue, 3 Apr 2012 22:07:26 +0000 (00:07 +0200)]
runtests: yassl and polarssl are not openssl

Don't set the "has_openssl" variable if yassl or polarssl is found as
they will simply not work as 100% drop-in replacements for some of the
stuff the "OpenSSL" feature is used for.

I spotted this problem when doing test runs with PolarSSL builds.

12 years agoconnect.c: return changed to CURLE_COULDNT_CONNECT when opensocket fails
Lijo Antony [Mon, 2 Apr 2012 22:45:25 +0000 (02:45 +0400)]
connect.c: return changed to CURLE_COULDNT_CONNECT when opensocket fails

Curl_socket returns CURLE_COULDNT_CONNECT when the opensocket callback
returns CURL_SOCKET_BAD. Previous return value CURLE_FAILED_INIT
conveys incorrect information to the user.

12 years agopop3: Reworked the command sending and handling
Steve Holme [Mon, 2 Apr 2012 22:24:00 +0000 (23:24 +0100)]
pop3: Reworked the command sending and handling

Reworked the command sending from two specific LIST and RETR command
functions into a single command based function as well as the two
associated response handlers into a generic command handler.

12 years agocurl tool: add filename_effective token for --write-out
Dave Reisner [Sun, 4 Mar 2012 23:07:03 +0000 (23:07 +0000)]
curl tool: add filename_effective token for --write-out

By modifying the parameter list for ourWriteOut() and passing the
OutStruct that collects data in tool_operate, we get access to the
remote name that we're writing to. Shell scripters should find this
useful when used in conjuntion with the --remote-header-name option.

12 years agosmtp.c: Code policing and tidy up
Steve Holme [Sun, 1 Apr 2012 20:09:38 +0000 (21:09 +0100)]
smtp.c: Code policing and tidy up

12 years agoSSH: public key can now be an empty string
Armel Asselin [Sun, 1 Apr 2012 18:22:37 +0000 (20:22 +0200)]
SSH: public key can now be an empty string

If an empty string is passed to CURLOPT_SSH_PUBLIC_KEYFILE, libcurl will
pass no public key to libssh2 which then tries to compute it from the
private key. This is known to work when libssh2 1.4.0+ is linked against
OpenSSL.

12 years agoOpenSSL: Made cert hostname check conform to RFC 6125
Tatsuhiro Tsujikawa [Sun, 1 Apr 2012 12:58:17 +0000 (21:58 +0900)]
OpenSSL: Made cert hostname check conform to RFC 6125

This change replaces RFC 2818 based hostname check in OpenSSL build with
RFC 6125 [1] based one.

The hostname check in RFC 2818 is ambiguous and each project implements
it in the their own way and they are slightly different. I check curl,
gnutls, Firefox and Chrome and they are all different.

I don't think there is a bug in current implementation of hostname
check. But it is not as strict as the modern browsers do. Currently,
curl allows multiple wildcard character '*' and it matches '.'. (as
described in the comment in ssluse.c).

Firefox implementation is also based on RFC 2818 but it only allows at
most one wildcard character and it must be in the left-most label in the
pattern and the wildcard must not be followed by any character in the
label.[2] Chromium implementation is based on RFC 6125 as my patch does.
Firefox and Chromium both require wildcard in the left-most label in the
presented identifier.

This patch is more strict than the current implementation, so there may
be some cases where old curl works but new one does not. But at the same
time I think it is good practice to follow the modern browsers do and
follow the newer RFC.

[1] http://tools.ietf.org/html/rfc6125#section-6.4.3
[2] https://bugzilla.mozilla.org/show_bug.cgi?id=159483

12 years agoHTTP: reset expected DL/UL sizes on redirects
Daniel Stenberg [Fri, 23 Mar 2012 22:42:37 +0000 (23:42 +0100)]
HTTP: reset expected DL/UL sizes on redirects

With FOLLOWLOCATION enabled. When a 3xx page is downloaded and the
download size was known (like with a Content-Length header), but the
subsequent URL (transfered after the 3xx page) was chunked encoded, then
the previous "known download size" would linger and cause the progress
meter to get incorrect information, ie the former value would remain
being sent in. This could easily result in downloads that were WAY
larger than "expected" and would cause >100% outputs with the curl
command line tool.

Test case 599 was created and it was used to repeat the bug and then
verify the fix.

Bug: http://curl.haxx.se/bug/view.cgi?id=3510057
Reported by: Michael Wallner

12 years agosmtp: Add support for DIGEST-MD5 authentication
Gökhan Şengün [Fri, 30 Mar 2012 20:50:56 +0000 (23:50 +0300)]
smtp: Add support for DIGEST-MD5 authentication

12 years agosmtp: Cody tidy up of md5 digest length
Gökhan Şengün [Fri, 30 Mar 2012 20:19:38 +0000 (23:19 +0300)]
smtp: Cody tidy up of md5 digest length

Replaced the hard coded md5 digest length (16) with a preprocessor
constant

12 years agomd5: Add support for calculating the md5 sum of buffers incrementally
Gökhan Şengün [Fri, 30 Mar 2012 20:09:47 +0000 (23:09 +0300)]
md5: Add support for calculating the md5 sum of buffers incrementally

It is now possible to calculate the md5 sum as the stream of buffers
becomes known where as previously it was only possible to calculate the
md5 sum of a pre-prepared buffer.

12 years agoRevert "mk-ca-bundle.pl: use LWP::UserAgent for https"
Daniel Stenberg [Sat, 31 Mar 2012 17:48:15 +0000 (19:48 +0200)]
Revert "mk-ca-bundle.pl: use LWP::UserAgent for https"

This reverts commit 9f0e1689f169b83b8fbdae23e0024cc57dcbc770.

It turned out that "improvement" instead made the fetching of the
certificates unreliable

Bug: http://curl.haxx.se/mail/lib-2012-03/0238.html
Reported by: Tim Heckman

12 years agoDOCS: Added information regarding POP3 commands to CURLOPT_CUSTOMREQUEST
Steve Holme [Sat, 31 Mar 2012 17:47:58 +0000 (18:47 +0100)]
DOCS: Added information regarding POP3 commands to CURLOPT_CUSTOMREQUEST

12 years agopop3: Added support for additional pop3 commands
Steve Holme [Sat, 31 Mar 2012 17:46:22 +0000 (18:46 +0100)]
pop3: Added support for additional pop3 commands

This feature allows the user to specify and use additional POP3
commands such as UIDL and DELE via libcurl's CURLOPT_CUSTOMREQUEST or
curl's -X command line option.

12 years agoCMakeLists.txt: fix Windows LDAP/LDAPS option handling
tetetest tetetest [Fri, 30 Mar 2012 16:59:47 +0000 (18:59 +0200)]
CMakeLists.txt: fix Windows LDAP/LDAPS option handling

bug: http://curl.haxx.se/mail/lib-2012-03/0278.html

12 years agoCMakeLists.txt: fix MS Visual Studio x64 unsigned long long literal suffix
tetetest tetetest [Thu, 29 Mar 2012 19:10:30 +0000 (21:10 +0200)]
CMakeLists.txt: fix MS Visual Studio x64 unsigned long long literal suffix

bug: http://curl.haxx.se/mail/lib-2012-03/0255.html

12 years agoTODO: Corrected POP3 section heading
Steve Holme [Wed, 28 Mar 2012 21:23:17 +0000 (22:23 +0100)]
TODO: Corrected POP3 section heading

12 years agocurl-functions.m4: update detection logic of getaddrinfo() thread-safeness
Yang Tse [Wed, 28 Mar 2012 16:46:08 +0000 (18:46 +0200)]
curl-functions.m4: update detection logic of getaddrinfo() thread-safeness

Take in account that h_errno might be a modifiable lvalue not defined as
a C preprocessor macro

12 years agoTODO: Added SMTP and POP3 specific features
Steve Holme [Tue, 27 Mar 2012 20:58:59 +0000 (21:58 +0100)]
TODO: Added SMTP and POP3 specific features

12 years agotool_cb_dbg.c: fix tool_cb_dbg() to behave properly even for size 0
Olaf Flebbe [Tue, 27 Mar 2012 07:32:19 +0000 (09:32 +0200)]
tool_cb_dbg.c: fix tool_cb_dbg() to behave properly even for size 0

curl segfault in debug callback triggered with CURLINFO_HEADER_OUT and size 0

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

12 years agotest #1405: support HTTP disabled builds
Yang Tse [Mon, 26 Mar 2012 21:52:15 +0000 (23:52 +0200)]
test #1405: support HTTP disabled builds

12 years agotest #809: Updated error code to match recent pop3 changes
Steve Holme [Mon, 26 Mar 2012 20:08:16 +0000 (21:08 +0100)]
test #809: Updated error code to match recent pop3 changes

12 years agossh.c: code cleanup, Curl_safefree() already nullifies pointer
Yang Tse [Sun, 25 Mar 2012 16:10:09 +0000 (18:10 +0200)]
ssh.c: code cleanup, Curl_safefree() already nullifies pointer

12 years agofix some compiler warnings
Yang Tse [Sun, 25 Mar 2012 15:51:59 +0000 (17:51 +0200)]
fix some compiler warnings

12 years agopop3.c: Corrected problem with state() introduced in 01690ed2bce5
Steve Holme [Sun, 25 Mar 2012 11:47:39 +0000 (12:47 +0100)]
pop3.c: Corrected problem with state() introduced in 01690ed2bce5

12 years agopop.c: Small code tidy up
Steve Holme [Sun, 25 Mar 2012 10:28:59 +0000 (11:28 +0100)]
pop.c: Small code tidy up

12 years agopop3: Removed the need for the single message LIST command handler
Steve Holme [Sun, 25 Mar 2012 10:21:59 +0000 (11:21 +0100)]
pop3: Removed the need for the single message LIST command handler

Simplified the code to remove the need for a separate "LIST <msg id>"
command handler and state machine and instead use the LIST command
handler for both operations.

12 years agopop3.c: Code policing and tidy up
Steve Holme [Sat, 24 Mar 2012 12:28:11 +0000 (12:28 +0000)]
pop3.c: Code policing and tidy up

Corrected character and line spacing and re-ordered list and retr
functions based on the order of their state machines.

12 years agoemail: Moved server greeting responses into separate functions
Steve Holme [Sat, 24 Mar 2012 11:55:34 +0000 (11:55 +0000)]
email: Moved server greeting responses into separate functions

Moved the server greeting response handling code from the statemach_act
functions to separate response functions. This makes the code simpler
to follow and provides consistency with the other responses that are
handled here.

12 years agopop3.c: Fixed body data being written when CURLOPT_NOBODY is specified
Steve Holme [Sat, 24 Mar 2012 00:09:38 +0000 (00:09 +0000)]
pop3.c: Fixed body data being written when CURLOPT_NOBODY is specified

Body data would be forwarded to the client application in both the RETR
and LIST commands even if CURLOPT_NOBODY was specified.

12 years agodocs: clarify -z/--time-cond with filename (mention mtime)
Rodrigo Silva (MestreLion) [Fri, 23 Mar 2012 13:01:19 +0000 (10:01 -0300)]
docs: clarify -z/--time-cond with filename (mention mtime)

Original wording could lead users in thinking it tries to
somehow parse the filename for a date expression (like
news_2012_03_05.html). It never mentions that it actually
reads the mtime of the file in filesystem.

12 years agotests #1316 #1319 #1320 #1321: add missing keywords
Yang Tse [Fri, 23 Mar 2012 17:31:29 +0000 (18:31 +0100)]
tests #1316 #1319 #1320 #1321: add missing keywords

12 years agotest #598: add missing keywords
Yang Tse [Fri, 23 Mar 2012 17:15:34 +0000 (18:15 +0100)]
test #598: add missing keywords

12 years agoversion: start working on 7.25.1-DEV
Yang Tse [Fri, 23 Mar 2012 15:59:03 +0000 (16:59 +0100)]
version: start working on 7.25.1-DEV

12 years agoconfigure: check for gethostbyname in the watt lib
Benjamin Johnson [Thu, 22 Mar 2012 22:33:33 +0000 (23:33 +0100)]
configure: check for gethostbyname in the watt lib

This allows building of libcurl on DOS using DJGPP 2.04 and Watt-32
sockets. I know there's already Makefile.djgpp, but I find this more
convenient since I'm used to using the ./configure script from other
platforms

12 years agoTHANKS: 8 new contributors from 7.25.0
Daniel Stenberg [Thu, 22 Mar 2012 21:22:08 +0000 (22:22 +0100)]
THANKS: 8 new contributors from 7.25.0

12 years agoRELEASE-NOTES: synced with b8b2cf612b2
Daniel Stenberg [Thu, 22 Mar 2012 18:40:25 +0000 (19:40 +0100)]
RELEASE-NOTES: synced with b8b2cf612b2

12 years agotests #1400 #1401: add missing keywords
Yang Tse [Thu, 22 Mar 2012 17:32:19 +0000 (18:32 +0100)]
tests #1400 #1401: add missing keywords

12 years agohttp_proxy.h: fix builds with proxy or http disabled
Yang Tse [Thu, 22 Mar 2012 16:27:14 +0000 (17:27 +0100)]
http_proxy.h: fix builds with proxy or http disabled

12 years agoparsedate.c: fix a numeric overflow
Yang Tse [Thu, 22 Mar 2012 14:53:03 +0000 (15:53 +0100)]
parsedate.c: fix a numeric overflow

12 years agocookies: strip the numerical ipv6 host properly
Andrei Cipu [Thu, 22 Mar 2012 07:52:45 +0000 (08:52 +0100)]
cookies: strip the numerical ipv6 host properly

The commit e650dbde86d4 that stripped off [brackets] from ipv6-only host
headers for the sake of cookie parsing wrongly incremented the host
pointer which would cause a bad free() call later on.

12 years agotest #598: add to Makefile.am
Yang Tse [Thu, 22 Mar 2012 03:59:16 +0000 (04:59 +0100)]
test #598: add to Makefile.am

12 years agotest #598: OOM handling fixes
Yang Tse [Thu, 22 Mar 2012 03:58:38 +0000 (04:58 +0100)]
test #598: OOM handling fixes

12 years agofix several compiler warnings
Yang Tse [Thu, 22 Mar 2012 01:40:19 +0000 (02:40 +0100)]
fix several compiler warnings

12 years agoCONNECT: fix multi interface regression
Daniel Stenberg [Wed, 21 Mar 2012 22:22:39 +0000 (23:22 +0100)]
CONNECT: fix multi interface regression

The refactoring of HTTP CONNECT handling in commit 41b0237834232 that
made it protocol independent broke it for the multi interface. This fix
now introduce a better state handling and moved some logic to the
http_proxy.c source file.

Reported by: Yang Tse
Bug: http://curl.haxx.se/mail/lib-2012-03/0162.html

12 years agoSWS: refuse to serve CONNECT unless running as proxy
Daniel Stenberg [Wed, 21 Mar 2012 22:21:52 +0000 (23:21 +0100)]
SWS: refuse to serve CONNECT unless running as proxy

12 years agocurl-functions.m4: update detection logic of getaddrinfo() thread-safeness
Yang Tse [Wed, 21 Mar 2012 00:02:58 +0000 (01:02 +0100)]
curl-functions.m4: update detection logic of getaddrinfo() thread-safeness

Take in account that POSIX standard Issue 7 drops h_errno support. Now, we also
consider getaddrinfo() to be thread-safe when (_POSIX_C_SOURCE >= 200809L) or
(_XOPEN_SOURCE >= 700) independently of whether h_errno exists or not.

12 years agofix several compiler warnings
Yang Tse [Tue, 20 Mar 2012 17:28:24 +0000 (18:28 +0100)]
fix several compiler warnings

12 years agotests 140X: fix --libcurl generated source file reading mode for MSYS builds
Yang Tse [Sun, 18 Mar 2012 04:56:07 +0000 (05:56 +0100)]
tests 140X: fix --libcurl generated source file reading mode for MSYS builds

12 years agotool_easysrc.c: fix --libcurl option output file text translation mode
Yang Tse [Sun, 18 Mar 2012 04:54:10 +0000 (05:54 +0100)]
tool_easysrc.c: fix --libcurl option output file text translation mode

Use fopen() with "w" mode instead of "wt" to fix cygwin builds.

12 years agobuild: remove tool_cb_skt.[ch] references
Yang Tse [Sun, 18 Mar 2012 04:35:30 +0000 (05:35 +0100)]
build: remove tool_cb_skt.[ch] references

12 years agoRELEASE-NOTES: synced with ad77420ac761b
Daniel Stenberg [Sat, 17 Mar 2012 23:26:56 +0000 (00:26 +0100)]
RELEASE-NOTES: synced with ad77420ac761b

3 more bugs, 1 more contributor

12 years agolwip: basic checks and macros for compatiblity
Daniel Stenberg [Sat, 17 Mar 2012 22:02:21 +0000 (23:02 +0100)]
lwip: basic checks and macros for compatiblity

12 years agotool_setopt.c: more OOM handling fixes
Yang Tse [Sat, 17 Mar 2012 19:55:15 +0000 (20:55 +0100)]
tool_setopt.c: more OOM handling fixes

12 years agocmake: list_spaces_append_once fails with spaces in filename
Daniel Stenberg [Sun, 4 Mar 2012 22:43:29 +0000 (23:43 +0100)]
cmake: list_spaces_append_once fails with spaces in filename

Windows standard libraries are located in C:/Program Files/Microsoft
SDKs/[...]. They are already included in the default MSVC
LIBPATH. Hence, find_library(WSOCK32_LIBRARY wsock32) and
find_library(WS2_32_LIBRARY ws2_32) are not needed. They return the full
path to the libraries including spaces. Of course,
list_spaces_append_once will mangle the result and the build fails.

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

12 years agohttp_proxy.c: fix OOM handling
Yang Tse [Fri, 16 Mar 2012 19:11:22 +0000 (20:11 +0100)]
http_proxy.c: fix OOM handling

12 years agotool_setopt.c: fix OOM handling
Yang Tse [Fri, 16 Mar 2012 19:10:08 +0000 (20:10 +0100)]
tool_setopt.c: fix OOM handling

12 years agofix several compiler warnings
Yang Tse [Fri, 16 Mar 2012 19:06:18 +0000 (20:06 +0100)]
fix several compiler warnings

12 years agofix some compiler warnings
Yang Tse [Fri, 16 Mar 2012 18:06:34 +0000 (19:06 +0100)]
fix some compiler warnings

12 years agoresolve with c-ares: don't resolve IPv6 when not working
Maxim Prohorov [Tue, 13 Mar 2012 21:52:39 +0000 (22:52 +0100)]
resolve with c-ares: don't resolve IPv6 when not working

If the Curl_ipv6works() function says no, there is no reason to try AAAA
names even if libcurl was built with IPv6 support enabled.

Bug: http://curl.haxx.se/mail/lib-2012-03/0045.html

12 years agosmtp.c: Changed the curl error code for EHLO and HELO responses
Steve Holme [Fri, 24 Feb 2012 14:36:53 +0000 (14:36 +0000)]
smtp.c: Changed the curl error code for EHLO and HELO responses

Changed the returned curl error codes for EHLO and HELO responses from
CURLE_LOGIN_DENIED to CURLE_REMOTE_ACCESS_DENIED as a negative response
from these commands represents no service as opposed to a login error.

12 years agoRELEASE-NOTES: synced with e650dbde86
Daniel Stenberg [Sat, 10 Mar 2012 21:29:30 +0000 (22:29 +0100)]
RELEASE-NOTES: synced with e650dbde86

New: 12 bugs, 3 changes, 6 contributors and updated counters at the top

12 years agoCurl_http: strip off [brackets] from ipv6-only host headers
Andrei Cipu [Sat, 10 Mar 2012 15:48:59 +0000 (16:48 +0100)]
Curl_http: strip off [brackets] from ipv6-only host headers

Since the host name is passed in to the cookie engine it will not work
correctly if the brackets are left in the name.

Bug:http://curl.haxx.se/mail/lib-2012-03/0036.html

12 years agoCURLSSH_OPT_AUTH: documented it has no effect
Armel Asselin [Sat, 10 Mar 2012 15:15:23 +0000 (16:15 +0100)]
CURLSSH_OPT_AUTH: documented it has no effect

12 years agomk-ca-bundle.pl: use LWP::UserAgent with proper https verify behavior.
John Joseph Bachir [Thu, 8 Mar 2012 23:11:41 +0000 (18:11 -0500)]
mk-ca-bundle.pl: use LWP::UserAgent with proper https verify behavior.

An alternative would be:

1. specify HTTPS_CA_DIR and/or HTTPS_CA_FILE
2. ensure that Net::SSL is being used, and IO::Socket::SSL is NOT being
   used

This question and answer explain:
http://stackoverflow.com/questions/74358/

12 years agoaccess the CA source file using HTTPS
John Joseph Bachir [Thu, 8 Mar 2012 23:07:01 +0000 (18:07 -0500)]
access the CA source file using HTTPS

12 years agoincludes: remove inclusion of unused file http_proxy.h
Daniel Stenberg [Thu, 8 Mar 2012 23:05:24 +0000 (00:05 +0100)]
includes: remove inclusion of unused file http_proxy.h

12 years agoCONNECT: made generically not per-protocol
Daniel Stenberg [Thu, 8 Mar 2012 22:31:38 +0000 (23:31 +0100)]
CONNECT: made generically not per-protocol

Curl_protocol_connect() now does the tunneling through the HTTP proxy if
requested instead of letting each protocol specific connection function
do it.

12 years agossh_connect: tunnel through HTTP proxy if requested
Daniel Stenberg [Thu, 8 Mar 2012 20:47:54 +0000 (21:47 +0100)]
ssh_connect: tunnel through HTTP proxy if requested

12 years agoLWIP: don't consider HAVE_ERRNO_H to be winsock
Daniel Stenberg [Thu, 8 Mar 2012 20:25:35 +0000 (21:25 +0100)]
LWIP: don't consider HAVE_ERRNO_H to be winsock

The check for Winsock definition was a bit too broad

Bug: http://curl.haxx.se/mail/lib-2012-03/0046.html

12 years agocurl-config: only provide libraries with --libs
Dave Reisner [Mon, 27 Feb 2012 18:51:41 +0000 (19:51 +0100)]
curl-config: only provide libraries with --libs

In line with the manpage, curl-config --libs should only provide the necessary
library flags for the linker in order to compile software with libcurl. Also
with this change, we match what the pkg-config file provides.

12 years agoCONTRIB: Please don't send pull requests
Daniel Stenberg [Mon, 5 Mar 2012 22:42:07 +0000 (23:42 +0100)]
CONTRIB: Please don't send pull requests

12 years agolibcurl docs: version corrections
Daniel Stenberg [Sat, 25 Feb 2012 18:34:08 +0000 (19:34 +0100)]
libcurl docs: version corrections

Correct some inconsistencies in which version some things were added.

Bug: http://curl.haxx.se/bug/view.cgi?id=3494091
Reported by: "curlybugs"

12 years agoCONNECT: fix ipv6 address in the Request-Line
Daniel Stenberg [Fri, 24 Feb 2012 22:33:14 +0000 (23:33 +0100)]
CONNECT: fix ipv6 address in the Request-Line

Commit 466150bc64d fixed the Host: header with CONNECT, but I then
forgot the preceeding request-line. Now this too uses [brackets]
properly if a ipv6 numerical address was given.

Bug: http://curl.haxx.se/bug/view.cgi?id=3493129
Reported by: "Blacat"

12 years agoSMTP: Added support for returning SMTP response codes
Steve Holme [Wed, 22 Feb 2012 10:44:34 +0000 (10:44 +0000)]
SMTP: Added support for returning SMTP response codes

Set the conn->data->info.httpcode variable in smtp_statemach_act() to
allow Curl_getinfo() to return the SMTP response code via the
CURLINFO_RESPONSE_CODE action.

12 years agocurl.1: updated --libcurl
Daniel Stenberg [Thu, 23 Feb 2012 22:25:58 +0000 (23:25 +0100)]
curl.1: updated --libcurl

With Colin Hogben's recent work, --libcurl now also works with -F and
more. Remove the previous caveat.

12 years agotest: --libcurl fixes
Daniel Stenberg [Thu, 23 Feb 2012 22:13:42 +0000 (23:13 +0100)]
test: --libcurl fixes

The line endings broke when I saved the three recent patches (my fault,
not Colin's) to 'git am' them.

Adjusted the stripping of the test program for comparing to also exclude
the SSH key file name as that will differ and use a local path name.

12 years agoAdd helper script convsrctest.pl to manipulate --libcurl tests.
Colin Hogben [Thu, 23 Feb 2012 09:53:26 +0000 (09:53 +0000)]
Add helper script convsrctest.pl to manipulate --libcurl tests.

The intention is to take the output of curl's --libcurl option,
as exercised in test 14xx, and generate a corresponding test15xx
in which the generated code is compiled and run.  This will verify
that the generated code behaves equivalently to the original
invocation of the curl command.

The script is not yet integrated into the configure / makefile
machinery.

12 years agoAdd tests for curl's --libcurl output.
Colin Hogben [Thu, 23 Feb 2012 09:48:46 +0000 (09:48 +0000)]
Add tests for curl's --libcurl output.

These tests check the output of the --libcurl option of curl,
including the improved option handling added in a related patch.

12 years agoGenerate lists and use symbols in --libcurl code output.
Colin Hogben [Thu, 23 Feb 2012 09:43:37 +0000 (09:43 +0000)]
Generate lists and use symbols in --libcurl code output.

This patch improves the output of curl's --libcurl option by
generating code which builds curl_httppost and curl_slist lists, and
uses symbolic names for enum and flag values.  Variants of the
my_setopt macro in tool_setopt.h are added in order to pass extra type
information to the code-generation step in tool_setopt.c.

If curl is configured with --disable-libcurl-option then the macros
call curl_easy_setopt directly.

12 years agosmtp.c: Fixed an issue with writing postdata
Steve Holme [Mon, 20 Feb 2012 12:18:22 +0000 (12:18 +0000)]
smtp.c: Fixed an issue with writing postdata

Fixed a problem in smtp_done() when writing out the postdata as
Curl_write() would periodically return zero bytes written.

12 years agoCURLOPT_MAIL_AUTH: added in 7.25.0
Daniel Stenberg [Tue, 21 Feb 2012 21:29:31 +0000 (22:29 +0100)]
CURLOPT_MAIL_AUTH: added in 7.25.0

Brought in commit 0cf0ab6f300

12 years agopop3 test server: send terminating ".CRLF" only
Daniel Stenberg [Tue, 21 Feb 2012 21:24:44 +0000 (22:24 +0100)]
pop3 test server: send terminating ".CRLF" only

With commit 035ef06bda7 applied, the test pop3 server needs to send
".\r\n" as the body terminating sequence and there needs to be a final
CRLF in the actual body in the test data file.

12 years agopop3.c: Fixed drop of final CRLF in EOB checking
Steve Holme [Sat, 18 Feb 2012 22:57:13 +0000 (22:57 +0000)]
pop3.c: Fixed drop of final CRLF in EOB checking

Curl_pop3_write() would drop the final CRLF of a message as it was
considered part of the EOB as opposed to part of the message. Whilst
the EOB sequence needs to be searched for by the function only the
final 3 characters should be removed as per RFC-1939 section 3.

Reported by: Rich Gray
Bug: http://curl.haxx.se/mail/lib-2012-02/0051.html

12 years agosmtp.c: Fixed an issue with the EOB checking
Steve Holme [Fri, 17 Feb 2012 18:24:52 +0000 (18:24 +0000)]
smtp.c: Fixed an issue with the EOB checking

Curl_smtp_escape_eob() would leave off final CRLFs from emails ending
in multiple blank lines additionally leaving the smtpc->eob variable
with the character count in, which would cause problems for additional
emails when sent through multiple calls to curl_easy_perform() after a
CURLOPT_CONNECT_ONLY.

12 years agoCURLE_FTP_PRET_FAILED: listed twice
Daniel Stenberg [Fri, 17 Feb 2012 13:40:07 +0000 (14:40 +0100)]
CURLE_FTP_PRET_FAILED: listed twice

Make sure it is mentioned once and with the correct description

12 years ago--mail-auth documented
Daniel Stenberg [Thu, 16 Feb 2012 12:24:48 +0000 (13:24 +0100)]
--mail-auth documented

12 years agoSMTP: Code policing and tidy up
Steve Holme [Thu, 16 Feb 2012 10:43:17 +0000 (10:43 +0000)]
SMTP: Code policing and tidy up

12 years agocurl: Added support for --mail-auth
Steve Holme [Thu, 16 Feb 2012 12:19:47 +0000 (13:19 +0100)]
curl: Added support for --mail-auth

Added an extra command-line argument to support the optional AUTH
parameter in SMTPs MAIL FROM command.

12 years agodocs: mention that NTLM works with NSS, too
Kamil Dudka [Thu, 16 Feb 2012 11:20:57 +0000 (12:20 +0100)]
docs: mention that NTLM works with NSS, too

12 years agoDOCS: Added information for CURLOPT_MAIL_AUTH.
Steve Holme [Sat, 7 Jan 2012 14:10:40 +0000 (14:10 +0000)]
DOCS: Added information for CURLOPT_MAIL_AUTH.

Added information relating to the new CURLOPT_MAIL_AUTH parameter and
reworked CURLOPT_MAIL_FROM and CURLOPT_MAIL_RCPT to be a clearer.

Fixed inconsistencies of "vocalisation of the abbreviation" versus
"vocalisation of the first word" for all abbreviations.

Corrected a typo in CURLOPT_NOPROXY.

12 years agosmtp.c: Fixed use of angled brackets in AUTH parameter.
Steve Holme [Sat, 7 Jan 2012 13:42:28 +0000 (13:42 +0000)]
smtp.c: Fixed use of angled brackets in AUTH parameter.

Fixed the use of angled brackets "<>" in the optional AUTH parameter as
per RFC-2554 section 5. The address should not include them but an
empty address should be replaced by them.

12 years agosmtp_mail: Added support to MAIL FROM for the optional AUTH parameter
Steve Holme [Wed, 5 Oct 2011 21:22:29 +0000 (22:22 +0100)]
smtp_mail: Added support to MAIL FROM for the optional AUTH parameter

Added a new CURLOPT_MAIL_AUTH option that allows the calling program to
set the optional AUTH parameter in the MAIL FROM command.

When this option is specified and an authentication mechanism is used
to communicate with the mail server then the AUTH parameter will be
included in the MAIL FROM command. This is particularly useful when the
calling program is acting as a relay in a trusted environment and
performing server to server communication, as it allows the relaying
server to specify the address of the mailbox that was used to
authenticate and send the original email.

12 years agocyassl: update to CyaSSL 2.0.x API
toddouska [Tue, 27 Dec 2011 20:17:37 +0000 (12:17 -0800)]
cyassl: update to CyaSSL 2.0.x API

Modify configure.ac to test for new CyaSSL Init function and remove
default install path to system.  Change to CyaSSL OpenSSL header and
proper Init in code as well.

Note that this no longer detects or works with CyaSSL before v2

12 years agoLIBCURL_VERSION_NUM: 0x071900
Daniel Stenberg [Tue, 14 Feb 2012 18:24:03 +0000 (19:24 +0100)]
LIBCURL_VERSION_NUM: 0x071900

I accidentally left the lowest bits 01 before

12 years agoSMTP: Fixed error when using CURLOPT_CONNECT_ONLY
Steve Holme [Tue, 14 Feb 2012 14:21:21 +0000 (14:21 +0000)]
SMTP: Fixed error when using CURLOPT_CONNECT_ONLY

Fixed incorrect behavior in smtp_done() which would cause the end of
block data to be sent to the SMTP server if libcurl was operating in
connect only mode. This would cause the server to return an error as
data would not be expected which in turn caused libcurl to return
CURLE_RECV_ERROR.

12 years agos/7.24.1/7.25.0
Daniel Stenberg [Mon, 13 Feb 2012 22:57:18 +0000 (23:57 +0100)]
s/7.24.1/7.25.0

We will go straight to 7.25.0 due to the new additions

12 years agocurlver.h: bumped to 7.25.0
Daniel Stenberg [Mon, 13 Feb 2012 22:28:26 +0000 (23:28 +0100)]
curlver.h: bumped to 7.25.0

and updated the end year in the generic copyright string

12 years agoRELEASE-NOTES: synced with 2b26eb985
Daniel Stenberg [Mon, 13 Feb 2012 22:26:48 +0000 (23:26 +0100)]
RELEASE-NOTES: synced with 2b26eb985

9 bug fixes, 4 changes and numerous contributors

Bumped release version and option counters

12 years agoconfigure: add option disable --libcurl output
Colin Hogben [Sun, 5 Feb 2012 17:44:22 +0000 (17:44 +0000)]
configure: add option disable --libcurl output