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

12 years agocurl tool: allow negative numbers as option values
Alessandro Ghedini [Sun, 12 Feb 2012 13:49:32 +0000 (14:49 +0100)]
curl tool: allow negative numbers as option values

Fix the str2num() function to not check if the input string starts with a
digit, since strtol() supports numbers prepended with '-' (and '+') too.
This makes the --max-redirs option work as documented.

12 years agoparse_proxy: simply memory handling
Daniel Stenberg [Fri, 10 Feb 2012 16:00:55 +0000 (17:00 +0100)]
parse_proxy: simply memory handling

... by making sure that the string is always freed after the invoke as
parse_proxy will always copy the data and this way there's a single
free() instead of multiple ones.

12 years agoparse_proxy: bail out on zero-length proxy names!
Daniel Stenberg [Fri, 10 Feb 2012 15:26:20 +0000 (16:26 +0100)]
parse_proxy: bail out on zero-length proxy names!

The proxy parser function strips off trailing slashes off the proxy name
which could lead to a mistaken zero length proxy name which would be
treated as no proxy at all by subsequent functions!

This is now detected and an error is returned. Verified by the new test
1329.

Reported by: Chandrakant Bagul
Bug: http://curl.haxx.se/mail/lib-2012-02/0000.html

12 years agonss: add support for the CURLSSLOPT_ALLOW_BEAST option
Kamil Dudka [Wed, 8 Feb 2012 12:36:36 +0000 (13:36 +0100)]
nss: add support for the CURLSSLOPT_ALLOW_BEAST option

... and fix some typos from the 62d15f1 commit.

12 years agoconfigure: don't modify LD_LIBRARY_PATH for cross compiles
Rob Ward [Thu, 9 Feb 2012 14:45:22 +0000 (14:45 +0000)]
configure: don't modify LD_LIBRARY_PATH for cross compiles

12 years ago--ssl-allow-beast added
Daniel Stenberg [Mon, 6 Feb 2012 21:25:04 +0000 (22:25 +0100)]
--ssl-allow-beast added

This new option tells curl to not work around a security flaw in the
SSL3 and TLS1.0 protocols. It uses the new libcurl option
CURLOPT_SSL_OPTIONS with the CURLSSLOPT_ALLOW_BEAST bit set.

12 years agoCURLOPT_SSL_OPTIONS: added
Daniel Stenberg [Mon, 6 Feb 2012 21:12:06 +0000 (22:12 +0100)]
CURLOPT_SSL_OPTIONS: added

Allow an appliction to set libcurl specific SSL options. The first and
only options supported right now is CURLSSLOPT_ALLOW_BEAST.

It will make libcurl to disable any work-arounds the underlying SSL
library may have to address a known security flaw in the SSL3 and TLS1.0
protocol versions.

This is a reaction to us unconditionally removing that behavior after
this security advisory:

http://curl.haxx.se/docs/adv_20120124B.html

... it did however cause a lot of programs to fail because of old
servers not liking this work-around. Now programs can opt to decrease
the security in order to interoperate with old servers better.

12 years agocurl: use new library-side TCP_KEEPALIVE options
Dave Reisner [Thu, 9 Feb 2012 18:04:08 +0000 (19:04 +0100)]
curl: use new library-side TCP_KEEPALIVE options

Use the new library CURLOPT_TCP_KEEPALIVE rather than disabling this via
the sockopt callback. If --keepalive-time is used, apply the value to
CURLOPT_TCP_KEEPIDLE and CURLOPT_TCP_KEEPINTVL.

12 years agoadd library support for tuning TCP_KEEPALIVE
Dave Reisner [Tue, 24 Jan 2012 01:28:06 +0000 (01:28 +0000)]
add library support for tuning TCP_KEEPALIVE

This adds three new options to control the behavior of TCP keepalives:

- CURLOPT_TCP_KEEPALIVE: enable/disable probes
- CURLOPT_TCP_KEEPIDLE: idle time before sending first probe
- CURLOPT_TCP_KEEPINTVL: delay between successive probes

While not all operating systems support the TCP_KEEPIDLE and
TCP_KEEPINTVL knobs, the library will still allow these options to be
set by clients, silently ignoring the values.

12 years agocurl_easy_reset: reset the referer string
Daniel Stenberg [Mon, 6 Feb 2012 21:59:49 +0000 (22:59 +0100)]
curl_easy_reset: reset the referer string

When CURLOPT_REFERER has been used, curl_easy_reset() did not properly
clear it.

Verified with the new test 598

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

12 years agocurl tool: allow glob-loops to abort again upon critical errors
Yang Tse [Tue, 7 Feb 2012 21:06:03 +0000 (22:06 +0100)]
curl tool: allow glob-loops to abort again upon critical errors

This prevents clobbering of non recoverable error return codes while
retaining intended functionality of commit 65103efe

12 years agocurl tool: don't abort glob-loop due to failures
Daniel Stenberg [Mon, 6 Feb 2012 09:46:25 +0000 (10:46 +0100)]
curl tool: don't abort glob-loop due to failures

We want to continue to the next URL to try even on failures returned
from libcurl. This makes -f with ranges still get subsequent URLs even
if occasional ones return error. This was a regression as it used to
work and broke in the 7.23.0 release.

Added test case 1328 to verify the fix.

Bug: http://curl.haxx.se/bug/view.cgi?id=3481223
Reported by: Juan Barreto

12 years agoCONNECT: send correct Host: with IPv6 numerical address
Daniel Stenberg [Tue, 31 Jan 2012 21:52:10 +0000 (22:52 +0100)]
CONNECT: send correct Host: with IPv6 numerical address

When the target host was given as a IPv6 numerical address, it was not
properly put within square brackets for the Host: header in the CONNECT
request. The "normal" request did fine.

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

12 years agoExplicitly link to the nettle/gcrypt libraries
Martin Storsjo [Thu, 26 Jan 2012 23:50:35 +0000 (00:50 +0100)]
Explicitly link to the nettle/gcrypt libraries

When support for nettle was added in 64f328c787ab, I overlooked
the fact that AC_CHECK_LIB doesn't add the tested lib to LIBS
if the check succeeded, if a custom success code block was present.
(The previous version of the check had an empty block for
successful checks, adding the lib to LIBS implicitly.)

Therefore, explicitly add either nettle or gcrypt to LIBS, after
deciding which one to use. Even if they can be linked in
transitively, it is safer to actually link explicitly to them.

This fixes building with gnutls with linkers that don't allow
linking transitively, such as for windows.

12 years agomore resilient connection times among IP addresses
Pierre Ynard [Mon, 23 Jan 2012 09:45:24 +0000 (10:45 +0100)]
more resilient connection times among IP addresses

When connecting to a domain with multiple IP addresses, allow different,
decreasing connection timeout values. This should guarantee some
connections attempts with sufficiently long timeouts, while still
providing fallback.

12 years agoremove write-only variable
Pierre Ynard [Mon, 23 Jan 2012 09:44:53 +0000 (10:44 +0100)]
remove write-only variable

12 years agoMerge branch 'master' of github.com:bagder/curl
Pierre Joye [Thu, 26 Jan 2012 15:39:53 +0000 (16:39 +0100)]
Merge branch 'master' of github.com:bagder/curl

12 years ago- fix IPV6 and IDN options
Pierre Joye [Thu, 26 Jan 2012 15:39:26 +0000 (16:39 +0100)]
- fix IPV6 and IDN options

12 years agoTODO-RELEASE: added item #308
Yang Tse [Wed, 25 Jan 2012 22:34:38 +0000 (23:34 +0100)]
TODO-RELEASE: added item #308

12 years agoTHANKS: imported contributors from 7.24.0 RELEASE-NOTES
Daniel Stenberg [Wed, 25 Jan 2012 12:52:38 +0000 (13:52 +0100)]
THANKS: imported contributors from 7.24.0 RELEASE-NOTES

12 years agotest harness: update stunnel.pem Diffie-Hellman parameters from 512 to 1024 bit
Yang Tse [Wed, 25 Jan 2012 10:50:44 +0000 (11:50 +0100)]
test harness: update stunnel.pem Diffie-Hellman parameters from 512 to 1024 bit

12 years agoversion: start working on 7.24.1-DEV
Yang Tse [Wed, 25 Jan 2012 10:27:39 +0000 (11:27 +0100)]
version: start working on 7.24.1-DEV

12 years agocurl_easy_setopt.3: Fixed SEEKDATA & CLOSESOCKETDATA descriptions
Dan Fandrich [Wed, 25 Jan 2012 05:31:57 +0000 (21:31 -0800)]
curl_easy_setopt.3: Fixed SEEKDATA & CLOSESOCKETDATA descriptions

12 years agoRELEASE-NOTES: synced with 70f71bb99f7ed9
Daniel Stenberg [Tue, 24 Jan 2012 07:37:40 +0000 (08:37 +0100)]
RELEASE-NOTES: synced with 70f71bb99f7ed9

Synced and prepared for 7.24.0 release. Two security problems, one bug fix,
two more contributors.

12 years agognutls: enforced use of SSLv3
Daniel Stenberg [Mon, 23 Jan 2012 22:53:06 +0000 (23:53 +0100)]
gnutls: enforced use of SSLv3

With advice from Nikos Mavrogiannopoulos, changed the priority string to
add "actual priorities" and favour ARCFOUR. This makes libcurl work
better when enforcing SSLv3 with GnuTLS. Both in the sense that the
libmicrohttpd test is now working again but also that it mitigates a
weakness in the older SSL/TLS protocols.

Bug: http://curl.haxx.se/mail/lib-2012-01/0225.html
Reported by: Christian Grothoff

12 years agotests: test CRLF in URLs
Daniel Stenberg [Wed, 11 Jan 2012 14:46:19 +0000 (15:46 +0100)]
tests: test CRLF in URLs

Related to the security vulnerability: CVE-2012-0036

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

12 years agoURL sanitize: reject URLs containing bad data
Daniel Stenberg [Fri, 23 Dec 2011 12:24:16 +0000 (13:24 +0100)]
URL sanitize: reject URLs containing bad data

Protocols (IMAP, POP3 and SMTP) that use the path part of a URL in a
decoded manner now use the new Curl_urldecode() function to reject URLs
with embedded control codes (anything that is or decodes to a byte value
less than 32).

URLs containing such codes could easily otherwise be used to do harm and
allow users to do unintended actions with otherwise innocent tools and
applications. Like for example using a URL like
pop3://pop3.example.com/1%0d%0aDELE%201 when the app wants a URL to get
a mail and instead this would delete one.

This flaw is considered a security vulnerability: CVE-2012-0036

Security advisory at: http://curl.haxx.se/docs/adv_20120124.html

Reported by: Dan Fandrich

12 years agoOpenSSL: don't disable security work-around
Daniel Stenberg [Thu, 19 Jan 2012 09:38:14 +0000 (10:38 +0100)]
OpenSSL: don't disable security work-around

OpenSSL added a work-around for a SSL 3.0/TLS 1.0 CBC vulnerability
(http://www.openssl.org/~bodo/tls-cbc.txt). In 0.9.6e they added a bit
to SSL_OP_ALL that _disables_ that work-around despite the fact that
SSL_OP_ALL is documented to do "rather harmless" workarounds.

The libcurl code uses the SSL_OP_ALL define and thus logically always
disables the OpenSSL fix.

In order to keep the secure work-around workding, the
SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS bit must not be set and this change
makes sure of this.

Reported by: product-security at Apple

12 years agoRELEASE-NOTES: synced with 6e2fd2c9ea
Daniel Stenberg [Sun, 22 Jan 2012 22:44:51 +0000 (23:44 +0100)]
RELEASE-NOTES: synced with 6e2fd2c9ea

3 more bugfixes, 3 more contributors

12 years agoCURLOPT_ACCEPTTIMEOUT_MS: spellfix
Daniel Stenberg [Sat, 21 Jan 2012 23:00:55 +0000 (00:00 +0100)]
CURLOPT_ACCEPTTIMEOUT_MS: spellfix

12 years agoexamples: updated README with two new example programs
Dan Fandrich [Sat, 21 Jan 2012 06:44:47 +0000 (22:44 -0800)]
examples: updated README with two new example programs

12 years agoURL parse: user name with ipv6 numerical address
Daniel Stenberg [Fri, 20 Jan 2012 22:32:43 +0000 (23:32 +0100)]
URL parse: user name with ipv6 numerical address

Using a URL with embedded user name and password didn't work if the host
was given as a numerical IPv6 string, like ftp://user:password@[::1]/

Reported by: Brandon Wang
Bug: http://curl.haxx.se/mail/archive-2012-01/0047.html

12 years agotelnet.c: fix OOM triggered segfault
Yang Tse [Thu, 19 Jan 2012 23:11:15 +0000 (00:11 +0100)]
telnet.c: fix OOM triggered segfault

12 years agotesttrace.c: fix compiler warning
Yang Tse [Thu, 19 Jan 2012 21:54:57 +0000 (22:54 +0100)]
testtrace.c: fix compiler warning

12 years agoOpenSSL: follow-up for commit a20daf90e3
Yang Tse [Thu, 19 Jan 2012 21:28:04 +0000 (22:28 +0100)]
OpenSSL: follow-up for commit a20daf90e3

avoid checking preprocessor definition official value

12 years ago- s, use, enable, for options name, avoiding conflicts with the names used in the...
Pierre Joye [Thu, 19 Jan 2012 13:08:24 +0000 (14:08 +0100)]
- s, use, enable, for options name, avoiding conflicts with the names used in the makefile

12 years agocurl.1: improve --stderr wording
Daniel Stenberg [Thu, 19 Jan 2012 12:39:25 +0000 (13:39 +0100)]
curl.1: improve --stderr wording

As is pointed out in this bug report, there can indeed be situation
where --stderr has a point even when the "real" stderr can be
redirected. Remove the superfluous and wrong comment.

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

12 years agoKNOWN_BUGS: can't receive zero bytes file properly
Daniel Stenberg [Wed, 18 Jan 2012 22:31:39 +0000 (23:31 +0100)]
KNOWN_BUGS: can't receive zero bytes file properly

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

12 years agossl session caching: fix compiler warnings
Yang Tse [Wed, 18 Jan 2012 22:39:30 +0000 (23:39 +0100)]
ssl session caching: fix compiler warnings

12 years agopolarssl: show cipher suite name correctly with 1.1.0
Daniel Stenberg [Wed, 18 Jan 2012 22:19:37 +0000 (23:19 +0100)]
polarssl: show cipher suite name correctly with 1.1.0

Apparently ssl_get_ciphersuite() is needed to get the name of the used
cipher suite.

12 years agopolarssl: show error code correctly
Daniel Stenberg [Wed, 18 Jan 2012 22:19:01 +0000 (23:19 +0100)]
polarssl: show error code correctly

The value was turned negative when it shouldn't have been

12 years agopolarssl: havege_rand is not present in version 1.1.0
Daniel Stenberg [Wed, 18 Jan 2012 22:17:54 +0000 (23:17 +0100)]
polarssl: havege_rand is not present in version 1.1.0

... it is now named havege_random!

Reported by: Robert Schumann
Bug: http://curl.haxx.se/mail/lib-2012-01/0178.html

12 years agoRELEASE-NOTES: synced with 5d70a61b94604
Daniel Stenberg [Wed, 18 Jan 2012 21:33:45 +0000 (22:33 +0100)]
RELEASE-NOTES: synced with 5d70a61b94604

5 more bug fixes, 1 more contributor

12 years agoAdd two tests for telnet: URLs
Colin Hogben [Wed, 18 Jan 2012 21:19:57 +0000 (22:19 +0100)]
Add two tests for telnet: URLs

Add simple telnet tests which (ab)use the http server.
The second test checks for an input file handling bug.

12 years agoRemove bogus optimisation of telnet upload.
Colin Hogben [Wed, 4 Jan 2012 11:24:49 +0000 (11:24 +0000)]
Remove bogus optimisation of telnet upload.

Remove wrongly implemented optimisation of telnet upload, apparently
intended to allow the library to avoid manually polling for input.

12 years agoUse correct file descriptor for telnet upload.
Colin Hogben [Wed, 4 Jan 2012 11:21:38 +0000 (11:21 +0000)]
Use correct file descriptor for telnet upload.

Fix a bug where input was read from stdin even when a different FILE *
had been configured via CURLOPT_READDATA

12 years agoOpenLDAP: fix LDAP connection phase memory leak
Yang Tse [Wed, 18 Jan 2012 15:06:29 +0000 (16:06 +0100)]
OpenLDAP: fix LDAP connection phase memory leak

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

12 years agoOpenSSL: fix PKCS#12 certificate parsing related memory leak
Johannes Bauer [Wed, 18 Jan 2012 12:39:12 +0000 (13:39 +0100)]
OpenSSL: fix PKCS#12 certificate parsing related memory leak

Leak triggered when CURLOPT_SSLCERTTYPE and CURLOPT_SSLKEYTYPE set to P12
and both CURLOPT_SSLCERT and CURLOPT_SSLKEY point to the same PKCS#12 file.

12 years agoOpenSSL: SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG option is no longer enabled
Yang Tse [Wed, 18 Jan 2012 03:33:49 +0000 (04:33 +0100)]
OpenSSL: SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG option is no longer enabled

SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG option enabling allowed successfull
interoperability with web server Netscape Enterprise Server 2.0.1 released
back in 1996 more than 15 years ago.

Due to CVE-2010-4180, option SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG has
become ineffective as of OpenSSL 0.9.8q and 1.0.0c. In order to mitigate
CVE-2010-4180 when using previous OpenSSL versions we no longer enable
this option regardless of OpenSSL version and SSL_OP_ALL definition.

12 years agotests: enable time tracing on tests 500, 573 and 585
Yang Tse [Tue, 17 Jan 2012 20:33:17 +0000 (21:33 +0100)]
tests: enable time tracing on tests 500, 573 and 585

12 years agotests: testtrace.[ch] provides debug callback for libtest usage
Yang Tse [Tue, 17 Jan 2012 20:32:05 +0000 (21:32 +0100)]
tests: testtrace.[ch] provides debug callback for libtest usage

Allows tests from the libtest subdir to generate log traces
similar to those of curl with --tracetime and --trace-ascii
options but with output going to stderr.

12 years agosws.c: fix proxy mode secondary connection monitoring condition
Yang Tse [Tue, 17 Jan 2012 11:28:28 +0000 (12:28 +0100)]
sws.c: fix proxy mode secondary connection monitoring condition

12 years agoadd LF termination to infof() trace string
Yang Tse [Mon, 16 Jan 2012 20:14:05 +0000 (21:14 +0100)]
add LF termination to infof() trace string

12 years agosws.c: improve proxy mode torture testing support - followup to 18c6c8a5
Yang Tse [Mon, 16 Jan 2012 18:00:57 +0000 (19:00 +0100)]
sws.c: improve proxy mode torture testing support - followup to 18c6c8a5

12 years agourl2file: new simple example
Daniel Stenberg [Mon, 16 Jan 2012 13:45:00 +0000 (14:45 +0100)]
url2file: new simple example

Just showing how to download the contents of a given URL into a local
file.

Based on a suggestion and example code by Georg Potthast

12 years agoimap.c: a dead simple imap example
Daniel Stenberg [Mon, 16 Jan 2012 12:47:51 +0000 (13:47 +0100)]
imap.c: a dead simple imap example

Just to show that IMAP is used just like other protocols

12 years agosws.c: improve proxy mode torture testing support - followup to c731fc58
Yang Tse [Mon, 16 Jan 2012 11:30:03 +0000 (12:30 +0100)]
sws.c: improve proxy mode torture testing support - followup to c731fc58

12 years agosws.c: improve proxy mode torture testing support - followup to d4bf87dc
Yang Tse [Sun, 15 Jan 2012 19:13:32 +0000 (20:13 +0100)]
sws.c: improve proxy mode torture testing support - followup to d4bf87dc

12 years agoCurl_proxyCONNECT() trace known bug #39
Yang Tse [Sun, 15 Jan 2012 18:21:55 +0000 (19:21 +0100)]
Curl_proxyCONNECT() trace known bug #39

12 years agotest: verify HTTP response code 308
Daniel Stenberg [Sat, 14 Jan 2012 15:34:59 +0000 (16:34 +0100)]
test: verify HTTP response code 308

This newly speced HTTP status code already works as intended in the new
spec:
http://greenbytes.de/tech/webdav/draft-reschke-http-status-308-02.html

Test 1325 is added to verify that the method is kept after the redirect

12 years agohttp_negotiate_sspi.c: fix compiler warning
Yang Tse [Fri, 13 Jan 2012 12:34:43 +0000 (13:34 +0100)]
http_negotiate_sspi.c: fix compiler warning

12 years agossh.c: fix compiler warning
Yang Tse [Fri, 13 Jan 2012 11:57:09 +0000 (12:57 +0100)]
ssh.c: fix compiler warning

12 years agosws.c: improve proxy mode torture testing support
Yang Tse [Fri, 13 Jan 2012 04:13:48 +0000 (05:13 +0100)]
sws.c: improve proxy mode torture testing support

12 years agoRELEASE-NOTES: synced with 9f20379fe4
Daniel Stenberg [Thu, 12 Jan 2012 22:30:19 +0000 (23:30 +0100)]
RELEASE-NOTES: synced with 9f20379fe4

5 bug fixes, 3 more contributors

12 years agohostip: avoid getaddrinfo when c-ares is used
Daniel Stenberg [Thu, 12 Jan 2012 22:13:19 +0000 (23:13 +0100)]
hostip: avoid getaddrinfo when c-ares is used

Some functions using getaddrinfo and gethostbyname were still
mistakingly being used/linked even if c-ares was selected as resolver
backend.

Reported by: Arthur Murray
Bug: http://curl.haxx.se/mail/lib-2012-01/0160.html

12 years agosws.c: replace sleep() usage with wait_ms()
Yang Tse [Mon, 9 Jan 2012 21:49:28 +0000 (22:49 +0100)]
sws.c: replace sleep() usage with wait_ms()

12 years agoFTP: CURLE_PARTIAL_FILE should not cause control connection to be closed
gsengun [Sat, 7 Jan 2012 21:13:57 +0000 (23:13 +0200)]
FTP: CURLE_PARTIAL_FILE should not cause control connection to be closed

Test 161 updated accordingly

12 years agosws.c: some compiler warning fixes
Yang Tse [Sun, 8 Jan 2012 18:28:46 +0000 (19:28 +0100)]
sws.c: some compiler warning fixes

12 years agolib/setup.h: portable symbolic names for Winsock shutdown() mode flags
Yang Tse [Sun, 8 Jan 2012 01:32:51 +0000 (02:32 +0100)]
lib/setup.h: portable symbolic names for Winsock shutdown() mode flags

12 years agosws.c: 812fa73057 follow-up
Yang Tse [Fri, 6 Jan 2012 00:52:45 +0000 (01:52 +0100)]
sws.c: 812fa73057 follow-up