Commit Graph

8653 Commits

Author SHA1 Message Date
Steve Holme dc72f8df0c build: Updated all makefiles and project files for the new vauth directory
Updated the makefiles and Visual Studio project files to support moving
the authentication code to the new lib/vauth directory that was started
in commit 0d04e859e1.
2016-03-25 09:11:59 +00:00
JDepooter f8d88a4913 schannel: Add ALPN support
Add ALPN support for schannel. This allows cURL to negotiate
HTTP/2.0 connections when built with schannel.

Closes #724
2016-03-24 09:56:12 +01:00
Steve Holme 96fff9f6b5 http: Minor update based on CODE_STYLE guidelines 2016-03-24 06:35:23 +00:00
Daniel Stenberg 726ae07b07 multi: fix "Operation timed out after" timer
Use the local, reasonably updated, 'now' value when creating the message
string to output for the timeout condition.

Fixes #619
2016-03-23 23:03:08 +01:00
Daniel Stenberg 23ab481644 openssl: boringssl provides the same numbering as openssl
... so we don't need extra boringssl precautions for for
HAVE_ERR_REMOVE_THREAD_STATE_NOARG.

Pointed-out-by: David Benjamin
2016-03-23 14:59:41 +01:00
Daniel Stenberg 240cd84b49 openssl: fix ERR_remove_thread_state() for boringssl/libressl
The removed arg is only done in OpenSSL

Bug: https://twitter.com/xtraemeat/status/712564874098917376
2016-03-23 10:05:29 +01:00
Steve Holme f974ffdd4b hostip6: Fixed compilation warnings when verbose strings disabled
warning C4189: 'data': local variable is initialized but not referenced

...and some minor formatting/spacing changes.
2016-03-22 06:16:06 +00:00
Steve Holme 9351383745 connect/ntlm/http: Fixed compilation warnings when verbose strings disabled
warning C4189: 'data': local variable is initialized but not referenced
2016-03-20 17:51:06 +00:00
Steve Holme 89f397d7eb openssl: Fixed compilation warning when /Wall enabled
warning C4706: assignment within conditional expression
2016-03-20 17:35:31 +00:00
Steve Holme f046ac48d6 inet_pton.c: Fixed compilation warnings
warning: conversion to 'unsigned char' from 'int' may alter its value
2016-03-20 11:14:58 +00:00
Daniel Stenberg 80851028ef mbedtls: fix compiler warning
vtls/mbedtls.h:67:36: warning: implicit declaration of function
‘mbedtls_sha256’ [-Wimplicit-function-declaration]
2016-03-19 22:37:21 +01:00
Steve Holme 4ff5cfd5fa easy: Minor coding standard and style updates
Following commit c5744340db. Additionally removes the need for a second
'result code' variable as well.
2016-03-19 20:37:12 +00:00
Jay Satiro c5744340db easy: Remove poll failure check in easy_transfer
.. because curl_multi_wait can no longer signal poll failure.

follow-up to 77e1726

Bug: https://github.com/curl/curl/issues/707
2016-03-19 15:29:52 -04:00
Steve Holme c142e73142 ftp/imap/pop3/smtp: Fixed compilation warning when /Wall enabled
warning C4706: assignment within conditional expression
2016-03-19 17:15:53 +00:00
Steve Holme 4ff2fbd1d5 config-w32.h: Fixed compilation warning when /Wall enabled
warning C4668: 'USE_IPV6' is not defined as a preprocessor macro,
               replacing with '0' for '#if/#elif'
2016-03-19 11:05:06 +00:00
Steve Holme 97c9d2ae8c imap.c: Fixed compilation warning with /Wall enabled
warning C4701: potentially uninitialized local variable 'size' used

Technically this can't happen, as the usage of 'size' is protected by
'if(parsed)' and 'parsed' is only set after 'size' has been parsed.

Anyway, lets keep the compiler happy.
2016-03-19 11:01:36 +00:00
Steve Holme 7e312bdfdd formdata.c: Fixed compilation warning
formdata.c:390: warning: cast from pointer to integer of different size

Introduced in commit ca5f9341ef this happens because a char*, which is
32-bits wide in 32-bit land, is being cast to a curl_off_t which is
64-bits wide where 64-bit integers are supported by the compiler.

This doesn't happen in 64-bit land as a pointer is the same size as a
curl_off_t.

This fix doesn't address the fact that a 64-bit value cannot be used
for CURLFORM_CONTENTLEN when set in a form array and compiled on a
32-bit platforms, it does at least suppress the compilation warning.
2016-03-18 07:19:31 +00:00
Gisle Vanem d816e8cf52 openssl: adapt to API breakage in ERR_remove_thread_state()
The OpenSSL API change that broke this is "Convert ERR_STATE to new
multi-threading API": openssl commit 8509dcc.

Closes #713
2016-03-17 10:42:33 +01:00
Daniel Stenberg 8d9d03a157 version: init moved to private name space, added protos
follow-up to 80015cdd52
2016-03-17 00:55:46 +01:00
Daniel Stenberg 5f5b626357 openssl: verbose: show matching SAN pattern
... to allow users to see which specfic wildcard that matched when such
is used.

Also minor logic cleanup to simplify the code, and I removed all tabs
from verbose strings.
2016-03-17 00:49:02 +01:00
Jay Satiro 80015cdd52 version: thread safety 2016-03-16 19:13:42 -04:00
Steve Holme 0e18b8b107 transfer: Removed redundant HTTP authentication include files
It would also seem that share.h is not required here either as there
are no references to the Curl_share structure or functions.
2016-03-16 07:13:16 +00:00
Steve Holme cd869cf1c1 easy: Removed redundant HTTP authentication include files 2016-03-16 06:59:42 +00:00
Steve Holme 3ccc2621a1 curl_sasl: Minor code indent fixes 2016-03-15 06:47:13 +00:00
Daniel Stenberg b51f04bf23 easy: add check to malloc() when running event-based
... to allow torture tests then too.
2016-03-14 15:37:03 +01:00
Daniel Stenberg 6a353b105a memdebug: skip logging the limit countdown, fflush when reached 2016-03-14 15:36:40 +01:00
Daniel Stenberg 3c6238b3eb curl_sasl.c: minor code indent fixes 2016-03-14 09:55:38 +01:00
Daniel Stenberg c3aca6ed47 multi: simplified singlesocket
Since sh_getentry() now checks for invalid sockets itself and by
narrowing the scope of the remove_sock_from_hash variable.
2016-03-14 09:44:14 +01:00
Daniel Stenberg 8eaf884417 multi: introduce sh_getentry() for looking up sockets in the sockhash
Simplify the code by using a single entry that looks for a socket in the
socket hash. As indicated in #712, the code looked for CURL_SOCKET_BAD
at some point and that is ineffective/wrong and this makes it easier to
avoid that.
2016-03-14 09:18:01 +01:00
Jaime Fullaondo c0717a7059 multi hash: ensure modulo performed on curl_socket_t
Closes #712
2016-03-14 08:16:52 +01:00
Steve Holme 5dc43b975b base64: Minor coding standard and style updates 2016-03-13 17:59:06 +00:00
Steve Holme 0e16de870f base64: Use 'CURLcode result' for curl result codes 2016-03-13 17:14:57 +00:00
Steve Holme 9eb158821f negotiate: Use 'CURLcode result' for curl result codes 2016-03-13 17:09:58 +00:00
Maksim Kuzevanov d7e3942814 multi_runsingle: avoid loop in CURLM_STATE_WAITPROXYCONNECT
Closes #703
2016-03-13 12:41:17 +01:00
Steve Holme e4a0a9ef18 digest: Use boolean based success code for Curl_sasl_digest_get_pair()
Rather than use a 0 and 1 integer base result code use a TRUE / FALSE
based success code.
2016-03-12 17:25:15 +00:00
Steve Holme a7a653fd58 digest: Corrected some typos in comments 2016-03-12 13:20:03 +00:00
Steve Holme f0fbd099b4 krb5: Corrected some typos in function descriptions 2016-03-12 11:59:52 +00:00
Steve Holme dbb90e7e9f ntlm: Corrected some typos in function descriptions 2016-03-12 11:56:10 +00:00
Steve Holme 06ccaa0c68 url: Corrected indentation when calling idna_to_ascii_lz() 2016-03-11 07:46:09 +00:00
Steve Holme 58e4a06743 idn_win32: Use boolean based success codes
Rather than use 0 and 1 integer base result codes use a FALSE / TRUE
based success code.
2016-03-11 07:24:39 +00:00
Daniel Stenberg b084173989 idn_win32.c: warning: Trailing whitespace 2016-03-10 23:32:45 +01:00
Steve Holme 28477fd67a idn_win32.c: Fixed compilation warning from commit 9e7fcd4291
warning C4267: 'function': conversion from 'size_t' to 'int',
               possible loss of data
2016-03-10 21:52:09 +00:00
Daniel Stenberg 863c5766dd ftp: remove a check for NULL(!)
... as it implies we need to check for that on all the other variable
references as well (as Coverity otherwise warns us for missing NULL
checks), and we're alredy making sure that the pointer is never NULL.
2016-03-10 13:52:22 +01:00
Daniel Stenberg 7f7fcd0d75 cookies: first n/v pair in Set-Cookie: is the cookie, then parameters
RFC 6265 section 4.1.1 spells out that the first name/value pair in the
header is the actual cookie name and content, while the following are
the parameters.

libcurl previously had a more liberal approach which causes significant
problems when introducing new cookie parameters, like the suggested new
cookie priority draft.

The previous logic read all n/v pairs from left-to-right and the first
name used that wassn't a known parameter name would be used as the
cookie name, thus accepting "Set-Cookie: Max-Age=2; person=daniel" to be
a cookie named 'person' while an RFC 6265 compliant parser should
consider that to be a cookie named 'Max-Age' with an (unknown) parameter
'person'.

Fixes #709
2016-03-10 11:26:12 +01:00
Daniel Stenberg 4d4ce84bb3 krb5: improved type handling to avoid clang compiler warnings 2016-03-10 10:40:10 +01:00
Daniel Stenberg 549b1a433a url.c: fix clang warning: no newline at end of file 2016-03-10 09:36:49 +01:00
Daniel Stenberg 77e1726719 curl_multi_wait: never return -1 in 'numfds'
Such a return value isn't documented but could still happen, and the
curl tool code checks for it. It would happen when the underlying
Curl_poll() function returns an error. Starting now we mask that error
as a user of curl_multi_wait() would have no way to handle it anyway.

Reported-by: Jay Satiro
Closes #707
2016-03-10 08:17:25 +01:00
Steve Holme a5aec58726 imap/pop3/smtp: Fixed connections upgraded with TLS are not reused
Regression since commit 710f14edba.

Bug: https://github.com/curl/curl/issues/422
Reported-by: Justin Ehlert
2016-03-08 19:36:46 +00:00
Tim Rühsen c140bd7891 cookie: do not refuse cookies for localhost
Closes #658
2016-03-08 15:27:43 +01:00
Daniel Stenberg cb222bcfef ftp_done: clear tunnel_state when secondary socket closes
Introducing a function for closing the secondary connection to make this
bug less likely to happen again.

Reported-by: daboul
Closes #701
2016-03-08 15:00:53 +01:00