Peter Wu [Fri, 31 Oct 2014 11:32:40 +0000 (12:32 +0100)]
cmake: clean OtherTests, fixing -Werror
There were several -Wunused warnings and one duplicate macro definition.
The EXTRA_DEFINES variable of the CurlCheckCSources macro was being
abused ("__unused1\n#undef inline\n#define __unused2", seriously?) to
insert extra C code. Avoid this broken abstraction and use cmake's
check_c_source_compiles directly (works fine with CMake 2.8, maybe
even cmake 2.6).
After cleaning up all related variables (EXTRA_DEFINES,
HEADER_INCLUDES, auxiliary headers_hack), also remove a duplicate
add_headers_include macro and remove duplicate header additions before
the struct timeval check.
Oh, and now the code is converted to use CheckCSourceRuns and
CheckCSourceCompiles, the two curl-specific helpers can be removed.
Unfortunately, the cmake output is now slightly more verbose. Before:
Performing Test int send(int, const void *, size_t, int) (curl_cv_func_send_test)
Performing Test int send(int, const void *, size_t, int) (curl_cv_func_send_test) - Failed
Since check_c_source_compiles prints the varname, now you see:
Performing Test curl_cv_func_send_test
Performing Test curl_cv_func_send_test - Failed
Tested: int send(int, const void *, size_t, int)
Compared cmake output with each other using vimdiff, no functional
differences were found. Tested with GCC 4.9.1 and Clang 3.5.0.
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
Peter Wu [Fri, 31 Oct 2014 11:32:39 +0000 (12:32 +0100)]
cmake: fix gethostby{addr,name}_r in CurlTests
This patch cleans up the automatically-generated (?) code and fixes one
case that will always fail due to syntax error.
HAVE_GETHOSTBYADDR_R_5_REENTRANT always failed because of a trailing
character ("int length;q"). Several parameter type and unused variable
warnings popped up. This causes a detection failure with -Werror.
Observe that the REENTRANT cases are exactly the same as their
non-REENTRANT cases except for a `_REENTRANT` macro definition.
Merge all these pieces and build one big main function with different
cases, but reusing variables where logical.
For the cases where the parameters where NULL, I looked at
lib/hostip4.c to get an idea of the parameters types.
void-cast variables such as 'rc' to avoid -Wuninitialized errors.
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
Peter Wu [Fri, 31 Oct 2014 11:32:38 +0000 (12:32 +0100)]
cmake: drop _BSD_SOURCE macro usage
autotools does not use features.h nor _BSD_SOURCE. As this macro
triggers warnings since glibc 2.20, remove it. It should not have
functional differences.
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
Steve Holme [Sun, 2 Nov 2014 22:59:47 +0000 (22:59 +0000)]
RELEASE-NOTES: Synced with
d71ea7c01e
Additionally, updated "GSSAPI" to "GSS-API" for a Cmake related change
as GSSAPI can be confused with the authentication mechanism rather than
a GSS-API implementation library such as MIT or Heimdal.
Steve Holme [Sun, 2 Nov 2014 18:14:34 +0000 (18:14 +0000)]
build: Added WinIDN build configuration options
Added support for WinIDN build configurations to the VC6 project files.
Steve Holme [Sun, 2 Nov 2014 16:23:48 +0000 (16:23 +0000)]
build: Added WinIDN build configuration options
Added support for WinIDN build configurations to the VC7 and VC7.1
project files.
Steve Holme [Sun, 2 Nov 2014 14:47:47 +0000 (14:47 +0000)]
build: Fixed the pre-processor separator in Visual Studio project files
A left over from the VC6 project files, so mainly cosmetic in Visual
Studio .NET as it can handle both comma and semi-colon characters for
separating multiple pre-processor definitions.
However, the IDE uses semi-colons if the value is edited, and as such,
this may cause problems in future for anyone updating the files or
merging patches.
Used the Visual Studio IDE to correct the separator character.
Steve Holme [Sun, 2 Nov 2014 13:00:31 +0000 (13:00 +0000)]
build: Added optional specific version generation of VC project files
..when working from the git repository. This is particularly useful
for single development environments where the project files for all
supported versions of Visual Studio may not be required.
Jay Satiro [Sun, 2 Nov 2014 06:35:41 +0000 (01:35 -0500)]
build-openssl.bat: Fix x64 release build
Prior to this change if x64 release was specified a failed attempt was
made to build x86 release instead.
Steve Holme [Sun, 2 Nov 2014 10:50:33 +0000 (10:50 +0000)]
CURLOPT_XOAUTH2_BEARER.3: Corrected the OAuth version number
Steve Holme [Sun, 2 Nov 2014 10:48:34 +0000 (10:48 +0000)]
CURLOPT_SASL_IR.3: Added supported mechanism information
...and removed duplication of what protocols are supported from the
description text.
Steve Holme [Sun, 2 Nov 2014 10:38:42 +0000 (10:38 +0000)]
opts: Use common wording for MAIL related names
Steve Holme [Sun, 2 Nov 2014 10:33:51 +0000 (10:33 +0000)]
opts: Use common wording for TLS user/password option names
...and revised the proxy wording a little as well.
Steve Holme [Sun, 2 Nov 2014 10:26:21 +0000 (10:26 +0000)]
CURLOPT_MAXCONNECTS.3: Reworked the description to be less confusing
...and corrected a related typo in curl_easy_setopt.3.
Guenter Knauf [Sun, 2 Nov 2014 04:06:01 +0000 (05:06 +0100)]
RELEASE-NOTES: removed obsolete entry; fixed entry.
Steve Holme [Sun, 2 Nov 2014 01:11:22 +0000 (01:11 +0000)]
RELEASE-NOTES: Synced with
e7da67f5d3
Steve Holme [Sun, 2 Nov 2014 00:54:50 +0000 (00:54 +0000)]
docs: Added mention of Kerberos for CURL_VERSION_SSPI
As this has been present for SOCKSv5 proxy since v7.19.4 and for IMAP,
POP3 and SMTP authentication since v7.38.0.
Steve Holme [Sun, 2 Nov 2014 00:43:40 +0000 (00:43 +0000)]
CURL_VERSION_KERBEROS4: Mark as deprecated
Support for Kerberos V4 was removed in v7.33.0.
Steve Holme [Sun, 2 Nov 2014 00:24:32 +0000 (00:24 +0000)]
sasl: Fixed Kerberos V5 inclusion when CURL_DISABLE_CRYPTO_AUTH is used
Typically the USE_WINDOWS_SSPI definition would not be used when the
CURL_DISABLE_CRYPTO_AUTH define is, however, it is still a valid build
configuration and, as such, the SASL Kerberos V5 (GSSAPI) authentication
data structures and functions would incorrectly be used when they
shouldn't be.
Introduced a new USE_KRB5 definition that takes into account the use of
CURL_DISABLE_CRYPTO_AUTH like USE_SPNEGO and USE_NTLM do.
Steve Holme [Sat, 1 Nov 2014 16:44:32 +0000 (16:44 +0000)]
openssl: Use 'CURLcode result'
More CURLcode fixes.
Daniel Stenberg [Thu, 30 Oct 2014 13:54:59 +0000 (14:54 +0100)]
resume: consider a resume from [content-length] to be OK
Basically since servers often then don't respond well to this and
instead send the full contents and then libcurl would instead error out
with the assumption that the server doesn't support resume. As the data
is then already transfered, this is now considered fine.
Test case 1434 added to verify this. Test case 1042 slightly modified.
Reported-by: hugo
Bug: http://curl.haxx.se/bug/view.cgi?id=1443
Steve Holme [Sat, 1 Nov 2014 16:30:16 +0000 (16:30 +0000)]
openssl: Use 'CURLcode result'
More standardisation of CURLcode usage and coding style.
Steve Holme [Sat, 1 Nov 2014 16:16:56 +0000 (16:16 +0000)]
openssl: Use 'CURLcode result'
...and some minor code style changes.
Steve Holme [Sat, 1 Nov 2014 12:06:03 +0000 (12:06 +0000)]
ftplistparser: We prefer 'CURLcode result'
Steve Holme [Fri, 31 Oct 2014 22:22:19 +0000 (22:22 +0000)]
opts: Use common wording for user/password option names
Steve Holme [Fri, 31 Oct 2014 13:06:47 +0000 (13:06 +0000)]
CURLOPT_CONNECT_ONLY.3: Removed "This option is implemented for..." text
As this is covered by the PROTOCOLS section and saves having to update
two parts of the document with the same information in future.
Steve Holme [Fri, 31 Oct 2014 12:47:40 +0000 (12:47 +0000)]
CURLOPT_GSSAPI_DELEGATION.3: Use GSS-API rather than GSSAPI
As implementations are refereed to GSS-API libraries as per the RFC and
GSSAPI typically refers to an authentication mechanism.
Steve Holme [Fri, 31 Oct 2014 12:44:43 +0000 (12:44 +0000)]
CURLOPT_CONNECT_ONLY.3: Fixed incomplete protocol list
Added missing IMAP to the protocol list.
Steve Holme [Thu, 30 Oct 2014 23:14:45 +0000 (23:14 +0000)]
code cleanup: Use 'CURLcode result'
Steve Holme [Thu, 30 Oct 2014 22:40:05 +0000 (22:40 +0000)]
curl_easy_setopt.3: Fixed lots of typos
Steve Holme [Thu, 30 Oct 2014 18:22:25 +0000 (18:22 +0000)]
curl_easy_setopt.3: Moved CURLOPT_DIRLISTONLY into PROTOCOL OPTIONS
...as this option affects more that just FTP.
Guenter Knauf [Thu, 30 Oct 2014 15:43:29 +0000 (16:43 +0100)]
build: added Watcom support to build with WinSSL.
Daniel Stenberg [Thu, 30 Oct 2014 13:56:53 +0000 (14:56 +0100)]
CURLOPT_PINNEDPUBLICKEY.3: added details
Steve Holme [Thu, 30 Oct 2014 12:32:18 +0000 (12:32 +0000)]
CURLOPT_CUSTOMREQUEST.3: Fixed incomplete protocol list
Whilst the description included information about SMTP, the protocol
list only showed "TTP, FTP, IMAP, POP3".
Steve Holme [Thu, 30 Oct 2014 12:30:11 +0000 (12:30 +0000)]
CURLOPT_DIRLISTONLY.3: Added information about the usage in POP3
Daniel Stenberg [Wed, 29 Oct 2014 19:43:44 +0000 (20:43 +0100)]
openssl: enable NPN separately from ALPN
... and allow building with nghttp2 but completely without NPN and ALPN,
as nghttp2 can still be used for plain-text HTTP.
Reported-by: Lucas Pardue
Daniel Stenberg [Wed, 29 Oct 2014 19:48:29 +0000 (20:48 +0100)]
configure.ac: remove checks for OpenSSL NPN/ALPN funcs again
... since the conditional in the code are now based on OpenSSL versions
instead to better support non-configure builds.
Daniel Stenberg [Wed, 29 Oct 2014 19:34:19 +0000 (20:34 +0100)]
opts: added some "SEE ALSO" references
Steve Holme [Wed, 29 Oct 2014 21:01:57 +0000 (21:01 +0000)]
RELEASE-NOTES: Synced with
32913182dc
Steve Holme [Wed, 29 Oct 2014 19:12:50 +0000 (19:12 +0000)]
vtls.c: Fixed compilation warning
conversion from 'size_t' to 'unsigned int', possible loss of data
Steve Holme [Wed, 29 Oct 2014 14:14:17 +0000 (14:14 +0000)]
sspi: Return CURLE_LOGIN_DENIED on AcquireCredentialsHandle() failure
Return a more appropriate error, rather than CURLE_OUT_OF_MEMORY when
acquiring the credentials handle fails. This is then consistent with
the code prior to commit
f7e24683c4 when log-in credentials were empty.
Steve Holme [Wed, 29 Oct 2014 14:05:21 +0000 (14:05 +0000)]
sasl_sspi: Allow DIGEST-MD5 to use current windows credentials
Fixed the ability to use the current log-in credentials with DIGEST-MD5.
I had previously disabled this functionality in commit
607883f13c as I
couldn't get this to work under Windows 8, however, from testing HTTP
Digest authentication through Windows SSPI and then further testing of
this code I have found it works in Windows 7.
Some further investigation is required to see what the differences are
between Windows 7 and 8, but for now enable this functionality as the
code will return an error when AcquireCredentialsHandle() fails.
Kamil Dudka [Wed, 29 Oct 2014 13:24:54 +0000 (14:24 +0100)]
transfer: drop the code handling the ssl_connect_retry flag
Its last use has been removed by the previous commit.
Kamil Dudka [Wed, 29 Oct 2014 13:14:23 +0000 (14:14 +0100)]
nss: drop the code for libcurl-level downgrade to SSLv3
This code was already deactivated by commit
ec783dc142129d3860e542b443caaa78a6172d56.
Kamil Dudka [Wed, 29 Oct 2014 13:32:32 +0000 (14:32 +0100)]
openssl: fix a line length warning
Guenter Knauf [Wed, 29 Oct 2014 02:31:34 +0000 (03:31 +0100)]
Added NetWare support to build with nghttp2.
Guenter Knauf [Wed, 29 Oct 2014 00:37:18 +0000 (01:37 +0100)]
Fixed error message since we require ALPN support.
Guenter Knauf [Tue, 28 Oct 2014 23:56:48 +0000 (00:56 +0100)]
Check for ALPN via OpenSSL version number.
This check works also with to non-configure platforms.
Steve Holme [Tue, 28 Oct 2014 22:47:22 +0000 (22:47 +0000)]
sasl_sspi: Fixed typo in comment
Steve Holme [Tue, 28 Oct 2014 22:42:42 +0000 (22:42 +0000)]
code cleanup: We prefer 'CURLcode result'
Daniel Stenberg [Tue, 28 Oct 2014 21:31:48 +0000 (22:31 +0100)]
TODO: consider supporting STAT
Daniel Stenberg [Tue, 28 Oct 2014 14:20:42 +0000 (15:20 +0100)]
mk-ca-bundle: spell fix "version"
Daniel Stenberg [Mon, 27 Oct 2014 15:08:24 +0000 (16:08 +0100)]
HTTP: return larger than 3 digit response codes too
HTTP 1.1 is clearly specified to only allow three digit response codes,
and libcurl used sscanf("%3d") for that purpose. This made libcurl
support smaller numbers but not larger. It does now, but we will not
make any specific promises nor document this further since it is going
outside of what HTTP is.
Bug: http://curl.haxx.se/bug/view.cgi?id=1441
Reported-by: Balaji
Daniel Stenberg [Sun, 26 Oct 2014 22:17:47 +0000 (23:17 +0100)]
src/: remove version.h.dist from gitignore
It has not been used since commit
f7bfdbab in 2011
Steve Holme [Sun, 26 Oct 2014 21:27:31 +0000 (21:27 +0000)]
ntlm: We prefer 'CURLcode result'
Continuing commit
0eb3d15ccb more return code variable name changes.
Guenter Knauf [Sun, 26 Oct 2014 18:07:35 +0000 (19:07 +0100)]
Cosmetics: lowercase non-special subroutine names.
Steve Holme [Sun, 26 Oct 2014 17:03:32 +0000 (17:03 +0000)]
RELEASE-NOTES: Synced with
07ac29a058
Steve Holme [Sun, 26 Oct 2014 16:34:44 +0000 (16:34 +0000)]
http_negotiate: We prefer 'CURLcode result'
Continuing commit
0eb3d15ccb more return code variable name changes.
Steve Holme [Sun, 26 Oct 2014 16:24:07 +0000 (16:24 +0000)]
http_negotiate: Fixed missing check for USE_SPNEGO
Steve Holme [Sun, 26 Oct 2014 14:51:05 +0000 (14:51 +0000)]
sspi: Synchronization of cleanup code between auth mechanisms
Steve Holme [Sun, 26 Oct 2014 14:36:05 +0000 (14:36 +0000)]
sspi: Renamed max token length variables
Code cleanup to try and synchronise code between the different SSPI
based authentication mechanisms.
Steve Holme [Sun, 26 Oct 2014 14:29:27 +0000 (14:29 +0000)]
sspi: Renamed expiry time stamp variables
Code cleanup to try and synchronise code between the different SSPI
based authentication mechanisms.
Steve Holme [Sun, 26 Oct 2014 14:26:39 +0000 (14:26 +0000)]
sspi: Only call CompleteAuthToken() when complete is needed
Don't call CompleteAuthToken() after InitializeSecurityContext() has
returned SEC_I_CONTINUE_NEEDED as this return code only indicates the
function should be called again after receiving a response back from
the server.
This only affected the Digest and NTLM authentication code.
Dan Fandrich [Sun, 26 Oct 2014 12:48:46 +0000 (13:48 +0100)]
Added the "flaky" keyword to a number of tests
Each shows evidence of flakiness on at least one platform on
the autobuilds. Users can use this keyword to skip these tests
if desired.
Steve Holme [Sun, 26 Oct 2014 10:32:34 +0000 (10:32 +0000)]
ntlm: Return all errors from Curl_ntlm_core_mk_nt_hash()
For consistency with other areas of the NTLM code propagate all errors
from Curl_ntlm_core_mk_nt_hash() up the call stack rather than just
CURLE_OUT_OF_MEMORY.
Steve Holme [Sun, 26 Oct 2014 10:26:46 +0000 (10:26 +0000)]
ntlm: Return CURLcode from Curl_ntlm_core_mk_lm_hash()
Steve Holme [Sun, 26 Oct 2014 10:16:59 +0000 (10:16 +0000)]
ntlm: Use 'CURLcode result'
Continuing commit
0eb3d15ccb more return code variable name changes.
Steve Holme [Sat, 25 Oct 2014 21:32:46 +0000 (22:32 +0100)]
ntlm: Only define ntlm data structure when USE_NTLM is defined
Steve Holme [Sat, 25 Oct 2014 13:23:40 +0000 (14:23 +0100)]
ntlm: Changed handles to be dynamic like other SSPI handles
Code cleanup to try and synchronise code between the different SSPI
based authentication mechanisms.
Steve Holme [Sat, 25 Oct 2014 13:18:30 +0000 (14:18 +0100)]
ntlm: Renamed handle variables to match other SSPI structures
Code cleanup to try and synchronise code between the different SSPI
based authentication mechanisms.
Steve Holme [Sat, 25 Oct 2014 13:12:41 +0000 (14:12 +0100)]
ntlm: Renamed SSPI based input token variables
Code cleanup to try and synchronise code between the different SSPI
based authentication mechanisms.
Steve Holme [Sat, 25 Oct 2014 13:05:54 +0000 (14:05 +0100)]
ntlm: We prefer 'CURLcode result'
Continuing commit
0eb3d15ccb more return code variable name changes.
Steve Holme [Sat, 25 Oct 2014 11:55:15 +0000 (12:55 +0100)]
build: Added WinIDN build configuration options
Added support for WinIDN build configurations to the VC8 and VC9
project files.
Nick Zitzmann [Fri, 24 Oct 2014 23:59:13 +0000 (18:59 -0500)]
darwinssl: detect possible future removal of SSLv3 from the framework
If Apple ever drops SSLv3 support from the Security framework, we'll fail with an error if the user insists on using SSLv3.
Patrick Monnerat [Fri, 24 Oct 2014 14:08:21 +0000 (16:08 +0200)]
gskit.c: remove SSLv3 from SSL default.
Patrick Monnerat [Fri, 24 Oct 2014 13:16:05 +0000 (15:16 +0200)]
gskit.c: use 'CURLcode result'
Jay Satiro [Fri, 24 Oct 2014 11:41:56 +0000 (13:41 +0200)]
SSL: Remove SSLv3 from SSL default due to POODLE attack
- Remove SSLv3 from SSL default in darwinssl, schannel, cyassl, nss,
openssl effectively making the default TLS 1.x. axTLS is not affected
since it supports only TLS, and gnutls is not affected since it already
defaults to TLS 1.x.
- Update CURLOPT_SSLVERSION doc
Daniel Stenberg [Fri, 24 Oct 2014 09:12:34 +0000 (11:12 +0200)]
pipelining: only output "is not blacklisted" in debug builds
Daniel Stenberg [Fri, 24 Oct 2014 07:19:29 +0000 (09:19 +0200)]
*.3: add/extend "SEE ALSO" sections
Daniel Stenberg [Fri, 24 Oct 2014 07:16:06 +0000 (09:16 +0200)]
curl_easy_pause.3: minor wording edit
Daniel Stenberg [Fri, 24 Oct 2014 07:12:17 +0000 (09:12 +0200)]
curl_getdate.3: provide a "SEE ALSO" section
Daniel Stenberg [Fri, 24 Oct 2014 07:08:22 +0000 (09:08 +0200)]
curl_global_init.3: minor formatting fix, add version info
Daniel Stenberg [Fri, 24 Oct 2014 06:51:04 +0000 (08:51 +0200)]
url.c: use 'CURLcode result'
Daniel Stenberg [Thu, 23 Oct 2014 20:56:35 +0000 (22:56 +0200)]
code cleanup: we prefer 'CURLcode result'
... for the local variable name in functions holding the return
code. Using the same name universally makes code easier to read and
follow.
Also, unify code for checking for CURLcode errors with:
if(result) or if(!result)
instead of
if(result == CURLE_OK), if(CURLE_OK == result) or if(result != CURLE_OK)
Daniel Stenberg [Thu, 23 Oct 2014 20:48:49 +0000 (22:48 +0200)]
Curl_add_timecondition: skip superfluous varible assignment
Detected by cppcheck.
Daniel Stenberg [Thu, 23 Oct 2014 20:46:10 +0000 (22:46 +0200)]
Curl_pp_flushsend: skip superfluous assignment
Detected by cppcheck.
Daniel Stenberg [Thu, 23 Oct 2014 20:42:15 +0000 (22:42 +0200)]
Curl_pp_readresp: remove superfluous assignment
Variable already assigned a few lines up.
Detected by cppcheck.
Daniel Stenberg [Thu, 23 Oct 2014 20:40:23 +0000 (22:40 +0200)]
Curl_proxyCONNECT: remove superfluous statement
The variable is already assigned, skip the duplicate assignment.
Pointed out by cppcheck.
Guenter Knauf [Fri, 24 Oct 2014 02:22:04 +0000 (04:22 +0200)]
Added MinGW support to build with nghttp2.
Guenter Knauf [Thu, 23 Oct 2014 17:30:19 +0000 (19:30 +0200)]
Added VC ssh2 target to main Makefile.
Guenter Knauf [Thu, 23 Oct 2014 14:27:40 +0000 (16:27 +0200)]
Some cosmetics and simplifies.
Guenter Knauf [Thu, 23 Oct 2014 13:18:05 +0000 (15:18 +0200)]
Remove dependency on openssl and cut.
Prefer usage of Perl modules for sha1 calculation since there
might be systems where openssl is not installed or not in path.
If openssl is used for sha1 calculation then dont rely on cut
since it is usually not available on other systems than Linux.
Daniel Stenberg [Thu, 23 Oct 2014 13:12:42 +0000 (15:12 +0200)]
RELEASE-NOTES: synced with
e116d0a62
Daniel Stenberg [Thu, 23 Oct 2014 12:34:41 +0000 (14:34 +0200)]
CURLOPT_RESOLVE.3: add an example
Daniel Stenberg [Thu, 23 Oct 2014 08:01:58 +0000 (10:01 +0200)]
gnutls: removed dead code
Bug: http://curl.haxx.se/bug/view.cgi?id=1437
Reported-by: Julien
Daniel Stenberg [Thu, 23 Oct 2014 08:00:39 +0000 (10:00 +0200)]
Curl_rand: Uninitialized variable: r
This is not actually used uninitialized but we silence warnings.
Bug: http://curl.haxx.se/bug/view.cgi?id=1437
Reported-by: Julien
Daniel Stenberg [Tue, 21 Oct 2014 11:40:38 +0000 (13:40 +0200)]
opts: provide more and updated examples
Daniel Stenberg [Tue, 21 Oct 2014 11:06:22 +0000 (13:06 +0200)]
CURLOPT_RANGE.3: works for SFTP as well
... and added a small example
Daniel Stenberg [Tue, 21 Oct 2014 09:57:13 +0000 (11:57 +0200)]
curl.1: edited for clarity
Daniel Stenberg [Tue, 21 Oct 2014 09:10:03 +0000 (11:10 +0200)]
CURLOPT_SSLVERSION.3: provide an example