1
0
mirror of https://github.com/moparisthebest/curl synced 2024-10-31 23:55:01 -04:00
Commit Graph

15791 Commits

Author SHA1 Message Date
Daniel Stenberg
1c23d2b392 SCP/SFTP: improve error code used for send failures
Instead of relying on the generic CURLE error for SCP or SFTP send
failures, try passing back a more suitable error if possible.
2012-11-12 10:04:44 +01:00
Daniel Stenberg
7ecd874bce Curl_write: remove unneeded typecast 2012-11-12 10:04:31 +01:00
Kamil Dudka
49c37e6c1c tool_metalink: allow to use hash algorithms provided by NSS
Fixes bug #3578163:
http://sourceforge.net/tracker/?func=detail&atid=100976&aid=3578163&group_id=976
2012-11-09 10:42:54 +01:00
Kamil Dudka
dca8ae5f02 tool_metalink: allow to handle failure of hash alg initialization 2012-11-09 10:27:10 +01:00
Kamil Dudka
cf75a64651 tool_metalink: introduce metalink_cleanup() in the internal API
... to release resources allocated at global scope
2012-11-09 10:27:10 +01:00
Daniel Stenberg
0af1a9d270 hostcheck: only build for the actual users
and make local function static
2012-11-08 22:37:53 +01:00
Oscar Koeroo
1394cad30f SSL: Several SSL-backend related fixes
axTLS:

This will make the axTLS backend perform the RFC2818 checks, honoring
the VERIFYHOST setting similar to the OpenSSL backend.

Generic for OpenSSL and axTLS:

Move the hostcheck and cert_hostcheck functions from the lib/ssluse.c
files to make them genericly available for both the OpenSSL, axTLS and
other SSL backends. They are now in the new lib/hostcheck.c file.

CyaSSL:

CyaSSL now also has the RFC2818 checks enabled by default. There is a
limitation that the verifyhost can not be enabled exclusively on the
Subject CN field comparison. This SSL backend will thus behave like the
NSS and the GnuTLS (meaning: RFC2818 ok, or bust). In other words:
setting verifyhost to 0 or 1 will disable the Subject Alt Names checks
too.

Schannel:

Updated the schannel information messages: Split the IP address usage
message from the verifyhost setting and changed the message about
disabling SNI (Server Name Indication, used in HTTP virtual hosting)
into a message stating that the Subject Alternative Names checks are
being disabled when verifyhost is set to 0 or 1. As a side effect of
switching off the RFC2818 related servername checks with
SCH_CRED_NO_SERVERNAME_CHECK
(http://msdn.microsoft.com/en-us/library/aa923430.aspx) the SNI feature
is being disabled. This effect is not documented in MSDN, but Wireshark
output clearly shows the effect (details on the libcurl maillist).

PolarSSL:

Fix the prototype change in PolarSSL of ssl_set_session() and the move
of the peer_cert from the ssl_context to the ssl_session. Found this
change in the PolarSSL SVN between r1316 and r1317 where the
POLARSSL_VERSION_NUMBER was at 0x01010100. But to accommodate the Ubuntu
PolarSSL version 1.1.4 the check is to discriminate between lower then
PolarSSL version 1.2.0 and 1.2.0 and higher. Note: The PolarSSL SVN
trunk jumped from version 1.1.1 to 1.2.0.

Generic:

All the SSL backends are fixed and checked to work with the
ssl.verifyhost as a boolean, which is an internal API change.
2012-11-08 22:23:12 +01:00
Daniel Stenberg
18c0e9bd71 libcurl: VERSIONINFO update
Since we added the curl_multi_wait function, the VERSIONINFO needed
updating.

Reported by: Patrick Monnerat
2012-11-08 20:26:19 +01:00
Guenter Knauf
c70c1a22d2 Added .def file to output.
Requested by Johnny Luong on the libcurl list.
2012-11-08 18:50:48 +01:00
Guenter Knauf
5a4f6413d1 Added deps for static metalink-aware MinGW builds. 2012-11-08 18:41:59 +01:00
Fabian Keil
6d1b493f3d Fix compilation of lib1501 2012-11-08 18:33:47 +01:00
Daniel Stenberg
7840c4c70c Curl_readwrite: remove debug output
The text "additional stuff not fine" text was added for debug purposes a
while ago, but it isn't really helping anyone and for some reason some
Linux distributions provide their libcurls built with debug info still
present and thus (far too many) users get to read this info.
2012-11-08 10:47:11 +01:00
Daniel Stenberg
9096f4f451 RELEASE-NOTES: synced with 487538e87a
6 new bugfixes and 3 more contributors...
2012-11-07 23:21:55 +01:00
Daniel Stenberg
487538e87a http_perhapsrewind: consider NTLM over proxy too
The logic previously checked for a started NTLM negotiation only for
host and not also with proxy, leading to problems doing POSTs over a
proxy NTLM that are larger than 2000 bytes. Now it includes proxy in the
check.

Bug: http://curl.haxx.se/bug/view.cgi?id=3582321
Reported by: John Suprock
2012-11-07 23:08:29 +01:00
Lars Buitinck
e1fa945e7e Curl_connecthost: friendlier "couldn't connect" message 2012-11-07 22:55:33 +01:00
Daniel Stenberg
cda6d891ab test1413: verify redirects to URLs with fragments
The bug report claimed it didn't work. This problem was probably fixed
in 473003fbdf.

Bug: http://curl.haxx.se/bug/view.cgi?id=3581898
2012-11-06 23:25:52 +01:00
Daniel Stenberg
473003fbdf URL parser: cut off '#' fragments from URLs (better)
The existing logic only cut off the fragment from the separate 'path'
buffer which is used when sending HTTP to hosts. The buffer that held
the full URL used for proxies were not dealt with. It is now.

Test case 5 was updated to use a fragment on a URL over a proxy.

Bug: http://curl.haxx.se/bug/view.cgi?id=3579813
2012-11-06 23:17:57 +01:00
Daniel Stenberg
3f20303702 OpenSSL/servercert: use correct buffer size, not size of pointer
Bug: http://curl.haxx.se/bug/view.cgi?id=3579286
2012-11-06 22:55:22 +01:00
Daniel Stenberg
a1be8e7f9b curl: set CURLOPT_SSL_VERIFYHOST to 0 to disable 2012-11-06 22:27:25 +01:00
Daniel Stenberg
8d97bed806 test 2027/2030: take duplicate Digest requests into account
With the reversion of ce8311c7e4 and the new clear logic, this flaw
is present and we allow it.
2012-11-06 22:23:56 +01:00
Daniel Stenberg
13ce9031cc Curl_pretransfer: clear out unwanted auth methods
As a handle can be re-used after having done HTTP auth in a previous
request, it must make sure to clear out the HTTP types that aren't
wanted in this new request.
2012-11-06 22:23:56 +01:00
Daniel Stenberg
95326a40ff test1412: verify Digest with repeated URLs
This test case verifies that bug 3582718 is fixed.

Bug: http://curl.haxx.se/bug/view.cgi?id=3582718
Reported by: Nick Zitzmann (originally)
2012-11-06 22:23:56 +01:00
Daniel Stenberg
8e329bb759 Revert "Zero out auth structs before transfer"
This reverts commit ce8311c7e4.

The commit made test 2024 work but caused a regression with repeated
Digest authentication. We need to fix this differently.
2012-11-06 22:23:56 +01:00
Daniel Stenberg
da82f59b69 CURLOPT_SSL_VERIFYHOST: stop supporting the 1 value
After a research team wrote a document[1] that found several live source
codes out there in the wild that misused the CURLOPT_SSL_VERIFYHOST
option thinking it was a boolean, this change now bans 1 as a value and
will make libcurl return error for it.

1 was never a sensible value to use in production but was introduced
back in the days to help debugging. It was always documented clearly
this way.

1 was never supported by all SSL backends in libcurl, so this cleanup
makes the treatment of it unified.

The report's list of mistakes for this option were all PHP code and
while there's a binding layer between libcurl and PHP, the PHP team has
decided that they have an as thin layer as possible on top of libcurl so
they will not alter or specifically filter a 'TRUE' value for this
particular option. I sympathize with that position.

[1] = http://daniel.haxx.se/blog/2012/10/25/libcurl-claimed-to-be-dangerous/
2012-11-06 19:46:53 +01:00
Daniel Stenberg
ab1f80200a gnutls: fix compiler warnings 2012-11-06 19:46:17 +01:00
Alessandro Ghedini
41eec4efa2 gnutls: print alerts during handshake 2012-11-06 19:42:38 +01:00
Alessandro Ghedini
2045d83dd3 gnutls: fix the error_is_fatal logic 2012-11-06 19:42:37 +01:00
Daniel Stenberg
0da6c113ce RELEASE-NOTES: synced with fa6d78829f 2012-11-06 12:03:29 +01:00
Daniel Stenberg
fa6d78829f httpcustomheader.c: free the headers after use 2012-11-06 11:51:19 +01:00
Dave Reisner
550e403f00 uniformly use AM_CPPFLAGS, avoid deprecated INCLUDES
Since automake 1.12.4, the warnings are issued on running automake:

  warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')

Avoid INCLUDES and roll these flags into AM_CPPFLAGS.

Compile tested on:
  Ubuntu 10.04 (automake 1:1.11.1-1)
  Ubuntu 12.04 (automake 1:1.11.3-1ubuntu2)
  Arch Linux (automake 1.12.4)
2012-11-06 00:32:21 +01:00
Daniel Stenberg
f99430d89e libauthretry.c: shorten lines to fit within 80 cols 2012-11-06 00:06:21 +01:00
Daniel Stenberg
09a491378a ftp_readresp: fix build without krb4 support
Oops, my previous commit broke builds with krb support.
2012-11-05 13:01:48 +01:00
Daniel Stenberg
9019a0a86c test/README: mention the 1500 test number range 2012-11-04 23:18:20 +01:00
Daniel Stenberg
b2954e66e8 FTP: prevent the multi interface from blocking
As pointed out in Bug report #3579064, curl_multi_perform() would
wrongly use a blocking mechanism internally for some commands which
could lead to for example a very long block if the LIST response never
showed.

The solution was to make sure to properly continue to use the multi
interface non-blocking state machine.

The new test 1501 verifies the fix.

Bug: http://curl.haxx.se/bug/view.cgi?id=3579064
Reported by: Guido Berhoerster
2012-11-04 19:05:39 +01:00
Marc Hoersken
7c0f201075 winbuild: Use machine type of development environment
This patch restores the original behavior instead of always
falling back to x86 if no MACHINE-type was specified.
2012-11-01 22:23:05 +01:00
Marc Hoersken
0ecb57056f winbuild: Additional clean up 2012-11-01 22:16:47 +01:00
Sapien2
3be96564a8 Even more winbuild refactoring 2012-11-01 22:06:54 +01:00
Sapien2
0cb5650386 Minor winbuild refactoring 2012-11-01 22:06:53 +01:00
Sapien2
8f61e5cea7 Architecture selection for winbuild and minor makefiles refactoring 2012-11-01 22:06:53 +01:00
Daniel Stenberg
34ff881ece BUGS: fix the bug tracker URL
The URL we used before is the one that goes directly to 'add' a bug
report, but since you can only do that after first having logged in to
sourceforge, the link often doesn't work for visitors.

Bug: http://curl.haxx.se/bug/view.cgi?id=3582408
Reported by: Oscar Norlander
2012-11-01 21:36:28 +01:00
Daniel Stenberg
af121ccad8 evhiperfifo: fix the pointer passed to WRITEDATA
Bug: http://curl.haxx.se/bug/view.cgi?id=3582407
Reported by: Oscar Norlander
2012-11-01 14:20:58 +01:00
Guenter Knauf
c81eb7e226 Fixed MSVC libssh2 static build.
Since libssh2 supports now agent stuff it also depends on user32.lib.
Posted to the list by Jan Ehrhardt.
2012-11-01 01:03:12 +01:00
Daniel Stenberg
74fe1b95fb tlsauthtype: deal with the string case insensitively
When given a string as 'srp' it didn't work, but required 'SRP'.
Starting now, the check disregards casing.

Bug: http://curl.haxx.se/bug/view.cgi?id=3578418
Reported by: Jeff Connelly
2012-10-23 23:12:58 +02:00
Daniel Stenberg
d1c769877a asyn-ares: restore working with c-ares < 1.6.1
Back in those days the public ares.h header didn't include the
ares_version.h header so it needs to be included here.

Bug: http://curl.haxx.se/bug/view.cgi?id=3577710
2012-10-23 23:06:38 +02:00
Nick Zitzmann
94891ff296 metalink/md5: Use CommonCrypto on Apple operating systems
Previously the Metalink code used Apple's CommonCrypto library only if
curl was built using the --with-darwinssl option. Now we use CommonCrypto
on all Apple operating systems including Tiger or later, or iOS 5 or
later, so you don't need to build --with-darwinssl anymore. Also rolled
out this change to libcurl's md5 code.
2012-10-22 23:32:59 +02:00
Daniel Stenberg
12a40e17a9 href_extractor.c: fix the URL 2012-10-18 19:42:31 +02:00
Michał Kowalczyk
8ffc971138 href_extractor: example code extracting href elements
It does so in a streaming manner using the "Streaming HTML parser".
2012-10-18 16:45:51 +02:00
Nick Zitzmann
f1d2e18508 darwinssl: un-broke iOS build, fix error on server disconnect
The iOS build was broken by a reference to a function that only existed
under OS X; fixed. Also fixed a hard-to-reproduce problem where, if the
server disconnected before libcurl got the chance to hang up first and
SecureTransport was in use, then we'd raise an error instead of failing
gracefully.
2012-10-16 19:55:03 +02:00
Alessandro Ghedini
1a02e84589 gnutls: put reset code into else block
Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=690551
2012-10-16 00:18:44 +02:00
Guenter Knauf
c79c0909d9 Fix now broken libmetalink-aware OpenSSL build. 2012-10-13 01:03:34 +02:00