1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00
Commit Graph

1498 Commits

Author SHA1 Message Date
Marc Hoersken
a34197ef77 tool_metalink.c: Added name of validation hash to messages
This makes it easier to debug broken hashes or hash functions.
2012-09-12 00:09:23 +02:00
Marc Hoersken
7f7e2ea72f wincrypt: Fixed cross-compilation issues caused by include name
For some reason WinCrypt.h is named wincrypt.h under MinGW.
2012-09-11 14:35:18 +02:00
Marc Hoersken
c44e6741ce Makefile.m32: Updated to build against libmetalink 0.1.2
The include and library path were moved within libmetalink, this
patch adjusts the defaults provided within the curl MinGW makefile.
2012-09-11 13:37:37 +02:00
Marc Hoersken
94c3e0f702 tool_metalink.c: Added support for Microsoft Windows CryptoAPI
Since Metalink support requires a crypto library for hash functions
and Windows comes with the builtin CryptoAPI, this patch adds that
API as a fallback to the supported crypto libraries.
It is automatically used on Windows if no other library is provided.
2012-09-11 13:37:30 +02:00
Marc Hoersken
71813f5e46 tool_metalink.c: Fixed error: 'O_BINARY' undeclared
Check for O_BINARY which is not available on every system.
2012-09-11 08:20:43 +02:00
Marc Hoersken
a6df3550cf tool_metalink.c: Fixed validation of binary files containing EOF
Since Windows/MinGW threat 0x1A as the EOF character, reading binary
files which contain that byte does not work using text mode.
The read function will only read until the first 0x1A byte. This
means that the hash is not computed from the whole file and the
final validation check using hash comparision fails.
2012-09-11 01:42:58 +02:00
David Blaikie
8b5d050267 tool_easysrc.c: Test pointers against NULL
While validating a new Clang diagnostic (-Wnon-literal-null-conversion -
yes, the name isn't quite correct in this case, but it suffices) I found
a few violations of it in Curl.
2012-09-06 21:00:26 +02:00
Nick Zitzmann
1de496cf0f metalink: Un-broke the build when building --with-darwinssl 2012-08-08 11:16:26 +02:00
Daniel Stenberg
73b1a965f7 globbing: fix segfault when >9 globs were used
Stupid lack of range checks caused the code to overwrite local variables
after glob number nine. Added checks now.

Bug: http://curl.haxx.se/bug/view.cgi?id=3546353
2012-08-07 13:45:59 +02:00
Daniel Stenberg
3b9103e4a6 operate: fix clang-analyzer warnings for never read variables
Two separate "Value stored to 'XXX' is never read" warnings
2012-08-06 23:59:28 +02:00
Daniel Stenberg
77c66e0247 operate: fix clang-analyzer warning
Value stored to 'separator' is never read
2012-08-06 23:32:49 +02:00
Daniel Stenberg
9f304291bd metalink: change code order to build with gnutls-nettle
Bug: http://curl.haxx.se/bug/view.cgi?id=3554668
Reported by: Anthony G. Basile
2012-08-06 22:39:13 +02:00
Kamil Dudka
487406c3c0 tool_operate: fix misplaced initialization of orig_noprogress
... and orig_isatty which caused --silent to be entirely ignored in case
the standard output was redirected to a file!
2012-07-22 02:06:22 +02:00
Daniel Stenberg
ff318a6302 getparam: fix the GetStr() macro
It should return PARAM_NO_MEM if the strdup fails. Spotted by
clang-analyzer
2012-07-15 20:33:11 +02:00
Guenter Knauf
a39789c85c Minor fixes to MinGW makefiles. 2012-07-12 14:15:58 +02:00
Guenter Knauf
dfe405076e Removed libcurl.imp from Makefile.am.
Updated .gitignore for NetWare created files.
2012-07-11 17:40:09 +02:00
Guenter Knauf
f9dfd7e4b7 Changed MinGW makefiles to use WINSSL now. 2012-07-11 11:33:08 +02:00
Daniel Stenberg
f2b6ebed7b cmdline: parse numerical options stricter
1 - str2offset() no longer accepts negative numbers since offsets are by
nature positive.

2 - introduced str2unum() for the command line parser that accepts
numericals which are not supposed to be negative, so that it will
properly complain on apparent bad uses and mistakes.

Bug: http://curl.haxx.se/mail/archive-2012-07/0013.html
2012-07-10 23:11:30 +02:00
Guenter Knauf
9a158f1ef0 Removed obsolete include path to project root. 2012-07-08 18:06:15 +02:00
Guenter Knauf
6388ac7dc1 Renamed vars to avoid shadow global declaration. 2012-07-04 12:54:21 +02:00
Guenter Knauf
6fb0ed88d6 Moved some patterns to subfolder's .gitignore. 2012-07-03 14:31:50 +02:00
Guenter Knauf
1ba5712f88 MinGW makefile tweaks for running from sh.
Added function macros to make path converting easier.
Added CROSSPREFIX to all compile tools.
2012-07-03 12:56:41 +02:00
Tatsuhiro Tsujikawa
89b431f60f curl: Added runtime version check for libmetalink 2012-07-02 16:28:01 +02:00
Tatsuhiro Tsujikawa
4e3320a679 Include metalink/metalink.h for libmetalink functions 2012-07-02 03:39:21 +02:00
Tatsuhiro Tsujikawa
bf4580d5fd 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.
2012-06-28 00:26:16 +02:00
Tatsuhiro Tsujikawa
3e6dfe138a Metalink: updated message format 2012-06-27 13:15:59 +02:00
Tatsuhiro Tsujikawa
7f59577fdd 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.
2012-06-22 18:58:30 +02:00
Tatsuhiro Tsujikawa
aefb9196cf curl: Prefixed all Metalink related messages with "Metalink: " 2012-06-21 17:34:54 +02:00
Tatsuhiro Tsujikawa
7561a0fc83 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.
2012-06-21 03:35:52 +02:00
Tatsuhiro Tsujikawa
196c8242ca 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.
2012-06-21 03:35:23 +02:00
Tatsuhiro Tsujikawa
424bb35877 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.
2012-06-21 03:34:37 +02:00
Gisle Vanem
08e0ad7b39 tool_doswin.c: fix djgpp function _use_lfn() used without a prototype
http://curl.haxx.se/mail/archive-2012-06/0028.html
2012-06-20 23:40:42 +02:00
Guenter Knauf
feaf8f9590 Fixed NetWare makefile broken from last commit. 2012-06-19 11:55:06 +02:00
Guenter Knauf
705330c750 Some more NetWare makefile tweaks for metalink. 2012-06-18 23:19:35 +02:00
Yang Tse
599a2c1f1a tool_cb_see.c: WinCE build adjustment 2012-06-18 18:52:29 +02:00
Yang Tse
819afe46ee schannel: remove version number and identify its use with 'schannel' literal
Version number is removed in order to make this info consistent with
how we do it with other MS and Linux system libraries for which we don't
provide this info.

Identifier changed from 'WinSSPI' to 'schannel' given that this is the
actual provider of the SSL/TLS support. libcurl can still be built with
SSPI and without SCHANNEL support.
2012-06-13 16:42:48 +02:00
Daniel Stenberg
af0888aaf6 Revert: 634f7cfee4 partially
Make sure CURL_VERSION_SSPI is present and works as in previous releases
for ABI and API compatibility reasons.
2012-06-11 22:58:39 +02:00
Steve Holme
9a51c11074 Makefile.vc6: Added version.lib if built with SSPI 2012-06-11 19:04:16 +02:00
Marc Hoersken
7da6a9128b mingw32: Fixed warning of USE_SSL being redefined 2012-06-11 19:00:37 +02:00
Marc Hoersken
634f7cfee4 version: Replaced SSPI feature information with version string details
Added Windows SSPI version information to the curl version string when
SCHANNEL SSL is not enabled, as the version of the library should also
be included when SSPI is used to generate security contexts.

Removed SSPI from the feature list as the features are GSS-Negotiate,
NTLM and SSL depending on the usage of the SSPI library.
2012-06-11 19:00:36 +02:00
Marc Hoersken
c1311c2b8f curl_sspi: Added Curl_sspi_version function
Added new function to get SSPI version as string.
Added required library version.lib to makefiles.
Changed curl_schannel.c to use Curl_sspi_version.
2012-06-11 19:00:35 +02:00
Guenter Knauf
0bb5ff5d1a schannel: Updated mingw32 makefiles 2012-06-11 19:00:35 +02:00
Guenter Knauf
6ea32b8b76 Added metalink support to NetWare builds. 2012-06-09 23:10:47 +02:00
Yang Tse
a884ffe430 Fixes allowing 26 more test cases in 1334 to 1393 range to succeed 2012-06-09 05:49:49 +02:00
Daniel Stenberg
dd576194ce tool_getparam.h: fix compiler error
forward declare the Configurable struct
2012-06-08 23:14:30 +02:00
Daniel Stenberg
870c99b7e7 metalink: restore some includes
Commit eeeba1496c removed them and thus broke my Linux build
2012-06-08 23:13:32 +02:00
Yang Tse
eeeba1496c metalink: build fixes and adjustments II
Additionally, make hash checking ability mandatory in order to allow metalink
support in curl.

A command line option could be introduced to skip hash checking at runtime,
but the ability to check hashes should always be built-in when providing
metalink support.
2012-06-08 14:27:45 +02:00
Guenter Knauf
186b101deb Added metalink support to MinGW builds. 2012-06-08 14:16:43 +02:00
Yang Tse
04ca9aecd1 metalink: build fixes and adjustments I 2012-06-07 23:50:12 +02:00
Yang Tse
7352ac408b Fixes allowing HTTP test cases 1338, 1339, 1368 and 1369 to succeed 2012-06-07 21:57:53 +02:00