Marc Hoersken [Thu, 5 Jul 2012 06:53:02 +0000 (08:53 +0200)]
winbuild: Make USE_WINSSL depend on USE_SSPI
Since WinSSL cannot be build without SSPI being enabled,
USE_WINSSL now defaults to the value of USE_SSPI.
The makefile does now raise an error if WinSSL is enabled
while SSPI is disabled.
Marc Hoersken [Thu, 5 Jul 2012 06:49:45 +0000 (08:49 +0200)]
winbuild: Aligned USE_SSPI with other USE_x defines
Renamed external parameter USE_SSPI = yes/no to ENABLE_SSPI = yes/no.
Backwards compatible change: USE_SSPI can still be passed as external
parameter with yes/no value as long as ENABLE_SSPI is not given.
USE_x defines are passed around with true/false values internally,
USE_SSPI is now aligned to this approach, but still accepts external
values yes/no being passed, just like the other defines.
Marc Hoersken [Thu, 5 Jul 2012 06:39:40 +0000 (08:39 +0200)]
winbuild: Clean up formatting and variable naming
- Changed space usage to line up with the whole file
- Renamed CFLAGS_SSPI/IPV6 to SSPI/IPV6_CFLAGS to be
consistent with the other CFLAGS_x variables
- Make use of existing CFLAGS_IPV6 (previously IPV6_CFLAGS)
instead of appending directly to CFLAGS
Nick Zitzmann [Sat, 7 Jul 2012 20:37:52 +0000 (22:37 +0200)]
darwinssl: output cipher with text, remove SNI warning
The code was printing a warning when SNI was set up successfully. Oops.
Printing the cipher number in verbose mode was something only TLS/SSL
programmers might understand, so I had it print the name of the cipher,
just like in the OpenSSL code. That'll be at least a little bit easier
to understand. The SecureTransport API doesn't have a method of getting
a string from a cipher like OpenSSL does, so I had to generate the
strings manually.
Daniel Stenberg [Sat, 7 Jul 2012 12:47:46 +0000 (14:47 +0200)]
RELEASE-NOTES: synced with
5a99bce07d
Daniel Stenberg [Sat, 7 Jul 2012 12:38:50 +0000 (14:38 +0200)]
KNOWN_BUGS: NTLM with unicode works with schannel/winssl!
Bug #75 updated with additional info, still remains for builds with
other backends.
Daniel Stenberg [Thu, 5 Jul 2012 22:19:41 +0000 (00:19 +0200)]
code police: narrow source to < 80 columns
Yang Tse [Thu, 5 Jul 2012 21:41:47 +0000 (23:41 +0200)]
unicode NTLM SSPI: cleanup follow-up
Yang Tse [Thu, 5 Jul 2012 20:16:15 +0000 (22:16 +0200)]
unicode NTLM SSPI: cleanup
Reduce the number of #ifdef UNICODE directives used in source files.
Daniel Stenberg [Thu, 5 Jul 2012 09:20:18 +0000 (11:20 +0200)]
tests: use connection-monitor and verify results
Test 1008 and 206 don't show the disconnect since it happens when SWS
awaits a new request, but 503 does and so the verify section needs that
string added.
Daniel Stenberg [Thu, 5 Jul 2012 09:10:50 +0000 (11:10 +0200)]
http-proxy: keep CONNECT connections alive (for NTLM)
When doing CONNECT requests, libcurl must make sure the connection is
alive as much as possible. NTLM requires it and it is generally good for
other cases as well.
NTLM over CONNECT requests has been broken since this regression I
introduced in my CONNECT cleanup commits that started with
41b02378342,
included since 7.25.0.
Bug: http://curl.haxx.se/bug/view.cgi?id=
3538625
Reported by: Marcel Raad
Daniel Stenberg [Thu, 5 Jul 2012 07:49:58 +0000 (09:49 +0200)]
sws: support <servercmd> for CONNECT requests
I moved out the servercmd parsing into a its own function called
parse_servercmd() and made sure it gets used also when the test number
is extracted from CONNECT requests. It turned out sws didn't do that
previously!
Daniel Stenberg [Thu, 5 Jul 2012 07:46:07 +0000 (09:46 +0200)]
FILEFORMAT: provided a full description of connection-monitor
Daniel Stenberg [Thu, 5 Jul 2012 07:32:41 +0000 (09:32 +0200)]
lib503: enable verbose to ease debugging this
Daniel Stenberg [Thu, 5 Jul 2012 07:31:04 +0000 (09:31 +0200)]
sws: add 'connection-monitor' command support
Using this, the server will output in the protocol log when the
connection gets disconnected and thus we will verify correctly in the
test cases that the connection doesn't get closed prematurely. This is
important for example NTLM to work.
Documentation added to FILEFORMAT, test 503 updated to use this.
Guenter Knauf [Wed, 4 Jul 2012 20:14:18 +0000 (22:14 +0200)]
Removed non-used variable.
Guenter Knauf [Wed, 4 Jul 2012 15:03:52 +0000 (17:03 +0200)]
Added error checking for samples.
Guenter Knauf [Wed, 4 Jul 2012 10:54:21 +0000 (12:54 +0200)]
Renamed vars to avoid shadow global declaration.
Daniel Stenberg [Tue, 3 Jul 2012 15:18:36 +0000 (17:18 +0200)]
docs: clarify how to start with curl_multi_socket_action
Mention the CURL_SOCKET_TIMEOUT argument in step 6 of the typical
application.
Guenter Knauf [Tue, 3 Jul 2012 12:31:50 +0000 (14:31 +0200)]
Moved some patterns to subfolder's .gitignore.
Guenter Knauf [Tue, 3 Jul 2012 11:01:17 +0000 (13:01 +0200)]
Merge branch 'master' of ssh://github.com/bagder/curl
Guenter Knauf [Tue, 3 Jul 2012 10:56:41 +0000 (12:56 +0200)]
MinGW makefile tweaks for running from sh.
Added function macros to make path converting easier.
Added CROSSPREFIX to all compile tools.
Marc Hoersken [Tue, 3 Jul 2012 07:16:00 +0000 (09:16 +0200)]
curl_ntlm_msgs.c: Removed unused variable passwd
Guenter Knauf [Tue, 3 Jul 2012 09:36:24 +0000 (11:36 +0200)]
Added files generated by mingw32, eclipse and VC.
Posted by Marc Hoersken.
Daniel Stenberg [Tue, 3 Jul 2012 09:27:45 +0000 (11:27 +0200)]
cookies: change the URL in the cookie jar file header
Daniel Stenberg [Tue, 3 Jul 2012 09:10:41 +0000 (11:10 +0200)]
HTTP-COOKIES: clarified and modified layout
Daniel Stenberg [Tue, 3 Jul 2012 08:54:46 +0000 (10:54 +0200)]
HTTP-COOKIES: use the FAQ document layout
Daniel Stenberg [Tue, 3 Jul 2012 07:03:08 +0000 (09:03 +0200)]
HTTP-COOKIES: added cookie documentation
Yang Tse [Mon, 2 Jul 2012 22:14:14 +0000 (00:14 +0200)]
curl_ntlm_msgs.c: include <tchar.h> for prototypes
Neil Bowers [Mon, 2 Jul 2012 21:22:10 +0000 (23:22 +0200)]
testcurl.pl: fix missing semicolon
Christian Hägele [Mon, 2 Jul 2012 20:59:54 +0000 (22:59 +0200)]
unicode NTLM SSPI: heap corruption fixed
When compiling libcurl with UNICODE defined and using unicode characters
in username.
Yang Tse [Mon, 2 Jul 2012 18:21:48 +0000 (20:21 +0200)]
testcurl.pl: allow non in-tree c-ares enabled autobuild
Yang Tse [Mon, 2 Jul 2012 14:42:54 +0000 (16:42 +0200)]
configure.ac: verify that libmetalink is new enough
Enabling test2017 to test2022.
Tatsuhiro Tsujikawa [Sat, 30 Jun 2012 12:17:44 +0000 (21:17 +0900)]
curl: Added runtime version check for libmetalink
Tatsuhiro Tsujikawa [Sat, 30 Jun 2012 12:07:38 +0000 (21:07 +0900)]
Include metalink/metalink.h for libmetalink functions
Daniel Stenberg [Sun, 1 Jul 2012 22:10:59 +0000 (00:10 +0200)]
errors: CURLM_CALL_MULTI_PERFORM is not returned anymore
Daniel Stenberg [Sun, 1 Jul 2012 18:09:35 +0000 (20:09 +0200)]
release: cleaned up plans for this and coming release
Yang Tse [Fri, 29 Jun 2012 14:40:23 +0000 (16:40 +0200)]
curl-compilers.m4: remove -Wstrict-aliasing=3 from clang
Currently it is unknown if there is any version of clang that
actually supports -Wstrict-aliasing. What is known is that there
are several that don't support it.
Yang Tse [Fri, 29 Jun 2012 14:02:10 +0000 (16:02 +0200)]
test2017 to test2022: more metalink tests
With this commit, checks done in previous test2017 are now done in test2018.
Whole range test2017 to test2022 DISABLED until configure is capable of
requiring a new-enough metalink library.
Don't try these without mentioned check in place!
Yang Tse [Fri, 29 Jun 2012 13:44:50 +0000 (15:44 +0200)]
test2005 to test2016: improve failure detection
Yang Tse [Thu, 28 Jun 2012 15:14:41 +0000 (17:14 +0200)]
lib582.c: fix conversion warning
Yang Tse [Thu, 28 Jun 2012 14:58:07 +0000 (16:58 +0200)]
nss.c: #include warnless.h for curlx_uztosi and curlx_uztoui prototypes
Marc Hoersken [Thu, 28 Jun 2012 13:48:32 +0000 (15:48 +0200)]
nss.c: Fixed size_t conversion warnings
Yang Tse [Thu, 28 Jun 2012 10:49:12 +0000 (12:49 +0200)]
sslgen.c: cleanup temporary compile-time SSL-backend check
Daniel Stenberg [Wed, 27 Jun 2012 21:36:07 +0000 (23:36 +0200)]
schannel: provide two additional (dummy) API defines
Tatsuhiro Tsujikawa [Wed, 27 Jun 2012 15:20:20 +0000 (00:20 +0900)]
Metalink: message updates
Print "parsing (...) OK" only when no warnings are generated. If
no file is found in Metalink, treat it FAILED.
If no digest is provided, print WARNING in parse_metalink().
Also print validating FAILED after download.
These changes make tests 2012 to 2016 pass.
Daniel Stenberg [Wed, 27 Jun 2012 21:15:56 +0000 (23:15 +0200)]
sslgen: avoid compiler error in SSPI builds
Yang Tse [Wed, 27 Jun 2012 17:06:43 +0000 (19:06 +0200)]
ssluse.c: fix compiler warning: conversion to 'int' from 'size_t'
Reported by Tatsuhiro Tsujikawa
http://curl.haxx.se/mail/lib-2012-06/0371.html
Yang Tse [Wed, 27 Jun 2012 15:14:59 +0000 (17:14 +0200)]
sslgen.c: add compile-time check for SSL-backend completeness
Yang Tse [Wed, 27 Jun 2012 15:13:16 +0000 (17:13 +0200)]
build: add our standard includes to curl_darwinssl.c and curl_multibyte.c
Yang Tse [Wed, 27 Jun 2012 12:04:42 +0000 (14:04 +0200)]
build: add curl_schannel and curl_darwinssl files to other build systems
Yang Tse [Wed, 27 Jun 2012 11:15:05 +0000 (13:15 +0200)]
tests: add five more Metalink test cases
Yang Tse [Wed, 27 Jun 2012 11:08:46 +0000 (13:08 +0200)]
tests: update Metalink message format
Tatsuhiro Tsujikawa [Tue, 26 Jun 2012 13:55:16 +0000 (22:55 +0900)]
Metalink: updated message format
Nick Zitzmann [Wed, 27 Jun 2012 09:57:31 +0000 (11:57 +0200)]
DarwinSSL: allow using NTLM authentication
Allow NTLM authentication when building using SecureTransport (Darwin) for SSL.
This uses CommonCrypto, a cryptography library that ships with all versions of
iOS and Mac OS X. It's like OpenSSL's libcrypto, except that it's missing a few
less-common cyphers and doesn't have a big number data structure.
Yang Tse [Wed, 27 Jun 2012 08:55:54 +0000 (10:55 +0200)]
curl_darwinssl.h: add newline at end of file
Daniel Stenberg [Tue, 26 Jun 2012 18:05:26 +0000 (20:05 +0200)]
ossl_seed: remove leftover RAND_screen check
Before commit
2dded8fedba (dec 2010) there was logic that used
RAND_screen() at times and now I remove the leftover #ifdef check for
it.
The seeding code that uses Curl_FormBoundary() in ossl_seed() is dubious
to keep since it hardly increases randomness but I fear I'll break
something if I remove it now...
Nick Zitzmann [Tue, 26 Jun 2012 19:39:48 +0000 (21:39 +0200)]
DarwinSSL: several adjustments
- Renamed st_ function prefix to darwinssl_
- Renamed Curl_st_ function prefix to Curl_darwinssl_
- Moved the duplicated ssl_connect_done out of the #ifdef in lib/urldata.h
- Fixed a teensy little bug that made non-blocking connection attempts block
- Made it so that it builds cleanly against the iOS 5.1 SDK
Yang Tse [Tue, 26 Jun 2012 19:22:36 +0000 (21:22 +0200)]
curl-compilers.m4: -Wstrict-aliasing=3 for warning enabled gcc and clang builds
Marc Hoersken [Tue, 26 Jun 2012 05:27:02 +0000 (07:27 +0200)]
sockaddr.h: Fixed dereferencing pointer breakin strict-aliasing
Fixed warning: dereferencing pointer does break strict-aliasing rules
by using a union inside the struct Curl_sockaddr_storage declaration.
Daniel Stenberg [Tue, 26 Jun 2012 12:52:46 +0000 (14:52 +0200)]
SSL cleanup: use crypto functions through the sslgen layer
curl_ntlm_msgs.c would previously use an #ifdef maze and direct
SSL-library calls instead of using the SSL layer we have for this
purpose.
Nick Zitzmann [Tue, 26 Jun 2012 12:01:51 +0000 (14:01 +0200)]
darwinssl: add support for native Mac OS X/iOS SSL
Daniel Stenberg [Mon, 25 Jun 2012 21:03:52 +0000 (23:03 +0200)]
RELEASE-NOTES: link to more metalink info
Daniel Stenberg [Mon, 25 Jun 2012 21:02:32 +0000 (23:02 +0200)]
RELEASE-NOTES: synced with
d025af9bb576
Yang Tse [Mon, 25 Jun 2012 19:48:20 +0000 (21:48 +0200)]
curl_schannel.c: Remove redundant NULL assignments following Curl_safefree()
Marc Hoersken [Mon, 25 Jun 2012 05:16:26 +0000 (07:16 +0200)]
curl_schannel.c: Replace free() with Curl_safefree()
Tatsuhiro Tsujikawa [Sat, 23 Jun 2012 08:08:37 +0000 (17:08 +0900)]
curl.1: Updated Metalink description in man page
Documented that --include will be ignored if both --metalink
and --include are specified.
Also documented that a Metalink file in the local file system
cannot be used if FILE protocol is disabled.
Steve Holme [Sun, 24 Jun 2012 22:23:30 +0000 (23:23 +0100)]
DOCS: Added clarification to CURLOPT_CUSTOMREQUEST for the POP3 protocol
Bug: http://curl.haxx.se/mail/lib-2012-06/0302.html
Reported by: Nagai H
Steve Holme [Sun, 24 Jun 2012 21:40:17 +0000 (22:40 +0100)]
smtp: Corrected result code for MAIL, RCPT and DATA commands
Bug: http://curl.haxx.se/mail/lib-2012-06/0094.html
Reported by: Dan
Ghennadi Procopciuc [Sun, 24 Jun 2012 20:59:15 +0000 (22:59 +0200)]
test: Added test HTTP receive cookies over IPv6
Yang Tse [Fri, 22 Jun 2012 18:14:30 +0000 (20:14 +0200)]
tests: add another Metalink test case
Tatsuhiro Tsujikawa [Fri, 22 Jun 2012 14:22:46 +0000 (23:22 +0900)]
tests: Enable test2010 and fixed hash value
Tatsuhiro Tsujikawa [Fri, 22 Jun 2012 14:20:16 +0000 (23:20 +0900)]
Metalink: ignore --include if --metalink is used.
Including headers in response body will break Metalink XML parser.
If it is included in the file described in Metalink XML, hash check
will fail. Therefore, --include should be ignored if --metalink is
used.
Yang Tse [Thu, 21 Jun 2012 16:30:23 +0000 (18:30 +0200)]
tests: add six Metalink test cases
Yang Tse [Thu, 21 Jun 2012 16:21:45 +0000 (18:21 +0200)]
test 2005: add verification of hash checking outcome
Yang Tse [Thu, 21 Jun 2012 16:17:50 +0000 (18:17 +0200)]
getpart.pm: remove misleading comment
Tatsuhiro Tsujikawa [Thu, 21 Jun 2012 14:32:12 +0000 (23:32 +0900)]
curl: Prefixed all Metalink related messages with "Metalink: "
Tatsuhiro Tsujikawa [Thu, 21 Jun 2012 02:16:53 +0000 (04:16 +0200)]
tests: Added Metalink test case # 2005
Tatsuhiro Tsujikawa [Wed, 20 Jun 2012 16:00:53 +0000 (01:00 +0900)]
curl: Restore noprogress and isatty config values.
The noprogress and isatty in Configurable are global, in a sense
that they persist in one curl invocation. Currently once one
download writes its response data to tty, they are set to FALSE
and they are not restored on successive downloads. This change
first backups the current noprogress and isatty, and restores
them when download does not write its data to tty.
Tatsuhiro Tsujikawa [Wed, 20 Jun 2012 15:51:06 +0000 (00:51 +0900)]
curl: Made --metalink option toggle Metalink functionality
In this change, --metalink option no longer takes argument. If
it is specified, given URIs are processed as Metalink XML file.
If given URIs are remote (e.g., http URI), curl downloads it
first. Regardless URI is local file (e.g., file URI scheme) or
remote, Metalink XML file is not written to local file system and
the received data is fed into Metalink XML parser directly. This
means with --metalink option, filename related options like -O
and -o are ignored.
Usage examples:
$ curl --metalink http://example.org/foo.metalink
This will download foo.metalink and parse it and then download
the URI described there.
$ curl --metalink file://foo.metalink
This will parse local file foo.metalink and then download the URI
described there.
Tatsuhiro Tsujikawa [Sat, 16 Jun 2012 13:58:06 +0000 (22:58 +0900)]
curl: Refactored metalink_checksum
When creating metalink_checksum from metalink_checksum_t, first
check hex digest is valid for the given hash function. We do
this check in the order of digest_aliases so that first good
match will be chosen (strongest hash function available). As a
result, the metalinkfile now only contains at most one
metalink_checksum because other entries are just redundant.
Gisle Vanem [Wed, 20 Jun 2012 21:40:42 +0000 (23:40 +0200)]
tool_doswin.c: fix djgpp function _use_lfn() used without a prototype
http://curl.haxx.se/mail/archive-2012-06/0028.html
Yang Tse [Wed, 20 Jun 2012 21:30:17 +0000 (23:30 +0200)]
build: fix RESOURCE bug in lib/Makefile.vc*
Removed two, not intended to exist, RESOURCE declarations.
Bug: http://curl.haxx.se/bug/view.cgi?id=
3535977
And sorted configuration hunks to reflect same internal order
as the one shown in the usage message.
Marc Hoersken [Wed, 20 Jun 2012 05:49:34 +0000 (07:49 +0200)]
schannel: Implement new buffer size strategy
Increase decrypted and encrypted cache buffers using limitted
doubling strategy. More information on the mailinglist:
http://curl.haxx.se/mail/lib-2012-06/0255.html
It updates the two remaining reallocations that have already been there
and fixes the other one to use the same "do we need to increase the
buffer"-condition as the other two. CURL_SCHANNEL_BUFFER_STEP_SIZE was
renamed to CURL_SCHANNEL_BUFFER_FREE_SIZE since that is actually what it
is now. Since we don't know how much more data we are going to read
during the handshake, CURL_SCHANNEL_BUFFER_FREE_SIZE is used as the
minimum free space required in the buffer for the next operation.
CURL_SCHANNEL_BUFFER_STEP_SIZE was used for that before, too, but since
we don't have a step size now, the define was renamed.
Yang Tse [Wed, 20 Jun 2012 20:26:51 +0000 (22:26 +0200)]
schannel SSL: fix compiler warning
Mark Salisbury [Wed, 20 Jun 2012 16:24:47 +0000 (10:24 -0600)]
schannel SSL: fix for renegotiate problem
In schannel_connect_step2() doread should be initialized based
on connssl->connecting_state.
Tatsuhiro Tsujikawa [Wed, 20 Jun 2012 18:15:42 +0000 (20:15 +0200)]
runtests.pl: make it support metalink feature
Yang Tse [Wed, 20 Jun 2012 18:13:07 +0000 (20:13 +0200)]
getpart.pm: make test definition section/part parser more robust
Test definition section parts which needed to include xml-lingo as contents
of that part required that the xml-blurb was written as a single line. Now the
xml-data inside the part can be written multiline making it more readable.
Tested with <client><file> part which is written to disk before <command> runs.
Daniel Stenberg [Tue, 19 Jun 2012 22:51:03 +0000 (00:51 +0200)]
schannel_connect_step2: checksrc whitespace fix
Mark Salisbury [Tue, 19 Jun 2012 22:51:03 +0000 (00:51 +0200)]
schannel SSL: changes in schannel_connect_step2
Process extra data buffer before returning from schannel_connect_step2.
Without this change I've seen WinCE hang when schannel_connect_step2
returns and calls Curl_socket_ready.
If the encrypted handshake does not fit in the intial buffer (seen with
large certificate chain), increasing the encrypted data buffer is necessary.
Fixed warning in curl_schannel.c line 1215.
Mark Salisbury [Tue, 19 Jun 2012 22:49:49 +0000 (00:49 +0200)]
config-win32ce.h: WinCE config adjustment
process.h is not present on WinCE
Mark Salisbury [Tue, 19 Jun 2012 22:14:17 +0000 (00:14 +0200)]
schannel SSL: Made send method handle unexpected cases better
Implemented timeout loop in schannel_send while sending data. This
is as close as I think we can get to write buffering; I put a big
comment in to explain my thinking.
With some committer adjustments
Marc Hoersken [Tue, 19 Jun 2012 12:57:12 +0000 (14:57 +0200)]
curl_schannel.c: Avoid unnecessary realloc calls to reduce buffer size
Mark Salisbury [Tue, 19 Jun 2012 18:28:22 +0000 (20:28 +0200)]
schannel SSL: Use standard Curl read/write methods
Replaced calls to swrite with Curl_write_plain and calls to sread
with Curl_read_plain.
With some committer adjustments
Yang Tse [Tue, 19 Jun 2012 18:28:21 +0000 (20:28 +0200)]
schannel SSL: make wording of some trace messages better reflect reality
Marc Hoersken [Tue, 19 Jun 2012 08:31:56 +0000 (10:31 +0200)]
curl_schannel.h: Use BUFSIZE as the initial buffer size if available
Make the Schannel implementation use libcurl's default buffer size
for the initial received encrypted and decrypted data cache buffers.
The implementation still needs to handle more data since more data
might have already been received or decrypted during the handshake
or a read operation which needs to be cached for the next read.
Guenter Knauf [Tue, 19 Jun 2012 09:54:10 +0000 (11:54 +0200)]
Fixed NetWare makefile broken from last commit.
Mark Salisbury [Tue, 19 Jun 2012 02:15:03 +0000 (04:15 +0200)]
schannel SSL: Implemented SSL shutdown
curl_schannel.c - implemented graceful SSL shutdown. If we fail to
shutdown the connection gracefully, I've seen schannel try to use a
session ID for future connects and the server aborts the connection
during the handshake.
Mark Salisbury [Tue, 19 Jun 2012 02:15:02 +0000 (04:15 +0200)]
schannel SSL: certificate validation on WinCE
curl_schannel.c - auto certificate validation doesn't seem to work
right on CE. I added a method to perform the certificate validation
which uses CertGetCertificateChain and manually handles the result.
Mark Salisbury [Tue, 19 Jun 2012 02:15:01 +0000 (04:15 +0200)]
schannel SSL: Added helper methods to simplify code
Added helper methods InitSecBuffer() and InitSecBufferDesc() to make it
easier to set up SecBuffer & SecBufferDesc structs.