]> granicus.if.org Git - curl/log
curl
10 years agonss: Don't ignore Curl_ssl_init_certinfo() OOM failure
Steve Holme [Sat, 27 Dec 2014 20:50:14 +0000 (20:50 +0000)]
nss: Don't ignore Curl_ssl_init_certinfo() OOM failure

10 years agonss: Use 'CURLcode result' for curl result codes
Steve Holme [Sat, 27 Dec 2014 21:35:36 +0000 (21:35 +0000)]
nss: Use 'CURLcode result' for curl result codes

...and don't use CURLE_OK in failure/success comparisons.

10 years agogetinfo: Code style policing
Steve Holme [Sat, 27 Dec 2014 17:46:27 +0000 (17:46 +0000)]
getinfo: Code style policing

10 years agogetinfo: Use 'CURLcode result' for curl result codes
Steve Holme [Sat, 27 Dec 2014 17:42:21 +0000 (17:42 +0000)]
getinfo: Use 'CURLcode result' for curl result codes

10 years agodarwinssl: Use 'CURLcode result' for curl result codes
Steve Holme [Sat, 27 Dec 2014 17:36:35 +0000 (17:36 +0000)]
darwinssl: Use 'CURLcode result' for curl result codes

10 years agopolarssl: Use 'CURLcode result' for curl result codes
Steve Holme [Sat, 27 Dec 2014 17:20:38 +0000 (17:20 +0000)]
polarssl: Use 'CURLcode result' for curl result codes

10 years agodocs: Updated following the addition of SASL GSSAPI via GSS-API libraries
Steve Holme [Sat, 27 Dec 2014 11:36:13 +0000 (11:36 +0000)]
docs: Updated following the addition of SASL GSSAPI via GSS-API libraries

As this feature has been implemented for 7.40.0.

10 years agoasiohiper.cpp: No need to initialise members of ConnInfo
Steve Holme [Sat, 27 Dec 2014 11:31:43 +0000 (11:31 +0000)]
asiohiper.cpp: No need to initialise members of ConnInfo

...as calloc() automatically clears the area of memory with zeros.

10 years agoasiohiper.cpp: Updated for curl coding standards
Steve Holme [Sat, 27 Dec 2014 11:29:58 +0000 (11:29 +0000)]
asiohiper.cpp: Updated for curl coding standards

...with the exception of the start of block statement curly brackets.

10 years agocode/docs: Use correct case for IPv4 and IPv6
Steve Holme [Sat, 27 Dec 2014 11:09:01 +0000 (11:09 +0000)]
code/docs: Use correct case for IPv4 and IPv6

For consistency, as we seem to have a bit of a mixed bag, changed all
instances of ipv4 and ipv6 in comments and documentations to use the
correct case.

10 years agoruntests: Fixed detection of Unix Sockets feature
Steve Holme [Sat, 27 Dec 2014 10:40:41 +0000 (10:40 +0000)]
runtests: Fixed detection of Unix Sockets feature

...following change in curl --version output.

10 years agocode/docs: Use Unix rather than UNIX to avoid use of the trademark
Steve Holme [Fri, 26 Dec 2014 20:45:21 +0000 (20:45 +0000)]
code/docs: Use Unix rather than UNIX to avoid use of the trademark

Use Unix when generically writing about Unix based systems as UNIX is
the trademark and should only be used in a particular product's name.

10 years agoip2ip.c: Fixed compilation warning when IPv6 Scope ID not supported
Steve Holme [Fri, 26 Dec 2014 13:28:29 +0000 (13:28 +0000)]
ip2ip.c: Fixed compilation warning when IPv6 Scope ID not supported

if2ip.c:119: warning: unused parameter 'remote_scope_id'

...and some minor code style policing in the same function.

10 years agovtls: Don't set cert info count until memory allocation is successful
Steve Holme [Fri, 26 Dec 2014 11:58:17 +0000 (11:58 +0000)]
vtls: Don't set cert info count until memory allocation is successful

Otherwise Curl_ssl_init_certinfo() can fail and set the num_of_certs
member variable to the requested count, which could then be used
incorrectly as libcurl closes down.

10 years agovtls: Use CURLcode for Curl_ssl_init_certinfo() return type
Steve Holme [Fri, 26 Dec 2014 11:53:34 +0000 (11:53 +0000)]
vtls: Use CURLcode for Curl_ssl_init_certinfo() return type

The return type for this function was 0 on success and 1 on error. This
was then examined by the calling functions and, in most cases, used to
return CURLE_OUT_OF_MEMORY.

Instead use CURLcode for the return type and return the out of memory
error directly, propagating it up the call stack.

10 years agoconfigure: Use camel case for UNIX sockets feature output
Steve Holme [Fri, 26 Dec 2014 11:38:30 +0000 (11:38 +0000)]
configure: Use camel case for UNIX sockets feature output

To match the curl --version output.

10 years agosockfilt.c: Reduce the number of individual memory allocations
Marc Hoersken [Fri, 26 Dec 2014 09:41:40 +0000 (10:41 +0100)]
sockfilt.c: Reduce the number of individual memory allocations

Merge multiple internal arrays into one, even if some variables
will not not be used. They are all created with the number of
file descriptors as their size.

Also fix possible thread handle leak in CloseHandle-loop.

10 years agosockfilt.c: Replace 100ms sleep with thread throttle
Marc Hoersken [Fri, 26 Dec 2014 09:11:47 +0000 (10:11 +0100)]
sockfilt.c: Replace 100ms sleep with thread throttle

Improves performance of test cases 574 and 575 by 50%.

A value of zero causes the thread to relinquish the remainder
of its time slice to any other thread of equal priority that is
ready to run. If there are no other threads of equal priority
ready to run, the function returns immediately, and the thread
continues execution.

http://msdn.microsoft.com/library/windows/desktop/ms686307.aspx

10 years agotool_help: Use camel case for UNIX sockets feature output
Steve Holme [Thu, 25 Dec 2014 17:35:03 +0000 (17:35 +0000)]
tool_help: Use camel case for UNIX sockets feature output

In line with the other features listed in the --version output,
capitalise the UNIX socket feature.

10 years agovtls: Use bool for Curl_ssl_getsessionid() return type
Steve Holme [Thu, 25 Dec 2014 17:15:15 +0000 (17:15 +0000)]
vtls: Use bool for Curl_ssl_getsessionid() return type

The return type of this function is a boolean value, and even uses a
bool internally, so use bool in the function declaration as well as
the variables that store the return value, to avoid any confusion.

10 years agoschannel: Minor code style policing for casts
Steve Holme [Thu, 25 Dec 2014 11:52:32 +0000 (11:52 +0000)]
schannel: Minor code style policing for casts

10 years agoschannel: Prefer 'CURLcode result' for curl result codes
Steve Holme [Thu, 25 Dec 2014 11:50:15 +0000 (11:50 +0000)]
schannel: Prefer 'CURLcode result' for curl result codes

10 years agocyassl: Prefer 'CURLcode result' for curl result codes
Steve Holme [Thu, 25 Dec 2014 11:39:47 +0000 (11:39 +0000)]
cyassl: Prefer 'CURLcode result' for curl result codes

10 years agotool_xattr: Use 'CURLcode result' for curl result codes
Steve Holme [Thu, 25 Dec 2014 11:23:44 +0000 (11:23 +0000)]
tool_xattr: Use 'CURLcode result' for curl result codes

10 years agocurl_ntlm_core.c: Fixed compilation warnings
Steve Holme [Wed, 24 Dec 2014 22:22:07 +0000 (22:22 +0000)]
curl_ntlm_core.c: Fixed compilation warnings

curl_ntlm_core.c:301: warning: pointer targets in passing argument 2 of
                      'CryptImportKey' differ in signedness
curl_ntlm_core.c:310: warning: passing argument 6 of 'CryptEncrypt' from
                      incompatible pointer type
curl_ntlm_core.c:540: warning: passing argument 4 of 'CryptGetHashParam'
                      from incompatible pointer type

10 years agoRELEASE-NOTES: Synced with 8830df8b66
Steve Holme [Wed, 24 Dec 2014 17:50:10 +0000 (17:50 +0000)]
RELEASE-NOTES: Synced with 8830df8b66

10 years agogtls: Use preferred 'CURLcode result'
Steve Holme [Wed, 24 Dec 2014 17:26:21 +0000 (17:26 +0000)]
gtls: Use preferred 'CURLcode result'

10 years agoopenldap: Use standard naming for setup connection function
Steve Holme [Wed, 24 Dec 2014 17:14:02 +0000 (17:14 +0000)]
openldap: Use standard naming for setup connection function

Renamed ldap_setup() to ldap_setup_connection() to follow more widely
used function naming.

10 years agortmp: Use standard naming for setup connection function
Steve Holme [Wed, 24 Dec 2014 17:12:13 +0000 (17:12 +0000)]
rtmp: Use standard naming for setup connection function

Renamed rtmp_setup() to rtmp_setup_connection() to follow more widely
used function naming.

10 years agosmb: Use standard naming for setup connection function
Steve Holme [Wed, 24 Dec 2014 17:10:28 +0000 (17:10 +0000)]
smb: Use standard naming for setup connection function

Renamed smb_setup() to smb_setup_connection() to follow more widely
used function naming.

10 years agoconfig-win32.h: Fixed line length > 79 columns
Steve Holme [Wed, 24 Dec 2014 16:33:28 +0000 (16:33 +0000)]
config-win32.h: Fixed line length > 79 columns

10 years agoopenssl: Prefer we don't use NULL in comparisons
Steve Holme [Wed, 24 Dec 2014 16:14:30 +0000 (16:14 +0000)]
openssl: Prefer we don't use NULL in comparisons

10 years agobuild: Removed WIN32 definition from the Visual Studio projects
Steve Holme [Wed, 24 Dec 2014 14:56:59 +0000 (14:56 +0000)]
build: Removed WIN32 definition from the Visual Studio projects

As this pre-processor definition is defined in curl_setup.h there is no
need to include it in the Visual Studio project files.

10 years agobuild: Removed WIN64 definition from the libcurl Visual Studio projects
Steve Holme [Wed, 24 Dec 2014 14:32:24 +0000 (14:32 +0000)]
build: Removed WIN64 definition from the libcurl Visual Studio projects

Removed the WIN64 pre-processor definition from the libcurl project
files as:

* WIN64 is not used in our source code
* The curl projects files don't define it
* It isn't required by or used in the platform SDK
* For backwards compatability curl_setup.h defines WIN32
* The compiler automatically defines _WIN64 for x64 builds

Historically Visual Studio projects have defined WIN32, in addition to
the compiler defined _WIN32 definition, and I had incorrectly changed
that to WIN64 for the x64 libcurl builds but not in the curl projects.

As such, it is questionable whether this should be defined or not. For
more information see the following cache of a discussion that took
place on the microsoft.public.vc.mfc newsgroup:

http://www.tech-archive.net/Archive/VC/microsoft.public.vc.mfc/2008-06/msg00074.html

10 years agoopenssl.c Fix for compilation errors with older versions of OpenSSL
Steve Holme [Tue, 23 Dec 2014 00:16:07 +0000 (00:16 +0000)]
openssl.c Fix for compilation errors with older versions of OpenSSL

openssl.c:1408: error: 'TLS1_1_VERSION' undeclared
openssl.c:1411: error: 'TLS1_2_VERSION' undeclared

10 years agoFix comment edit in vms/backup_gnv_curl_src.com
John Malmberg [Mon, 22 Dec 2014 20:50:12 +0000 (14:50 -0600)]
Fix comment edit in vms/backup_gnv_curl_src.com

packages/vms/backup_gnv_curl_src.com: Originally copied from Bash port.

10 years agocurl: show size of inhibited data when using -v
Daniel Stenberg [Mon, 22 Dec 2014 13:17:12 +0000 (14:17 +0100)]
curl: show size of inhibited data when using -v

To offer some more info and yet it doesn't use more lines.

10 years agoopenssl: fix SSL/TLS versions in verbose output
Daniel Stenberg [Mon, 22 Dec 2014 13:09:46 +0000 (14:09 +0100)]
openssl: fix SSL/TLS versions in verbose output

10 years agoopenssl: make it compile against openssl 1.1.0-DEV master branch
Daniel Stenberg [Mon, 22 Dec 2014 12:56:04 +0000 (13:56 +0100)]
openssl: make it compile against openssl 1.1.0-DEV master branch

10 years agosshserver.pl: clarify and streamline variable names
Marc Hoersken [Sun, 21 Dec 2014 23:30:02 +0000 (00:30 +0100)]
sshserver.pl: clarify and streamline variable names

10 years agoopenssl: warn for SRP set if SSLv3 is used, not for TLS version
Daniel Stenberg [Sun, 21 Dec 2014 22:25:49 +0000 (23:25 +0100)]
openssl: warn for SRP set if SSLv3 is used, not for TLS version

... as it requires TLS and it was was left to warn on the default from
when default was SSL...

10 years agosmb: use memcpy() instead of strncpy()
Daniel Stenberg [Sun, 21 Dec 2014 22:21:16 +0000 (23:21 +0100)]
smb: use memcpy() instead of strncpy()

... as it never copies the trailing zero anyway and always just the four
bytes so let's not mislead anyone into thinking it is actually treated
as a string.

Coverity CID: 1260214

10 years agoVMS: Updates for 0740-0D1220
John E. Malmberg [Sun, 21 Dec 2014 15:24:55 +0000 (09:24 -0600)]
VMS: Updates for 0740-0D1220

lib/setup-vms.h : VAX HP OpenSSL port is ancient, needs help.
                  More defines to set symbols to uppercase.

src/tool_main.c : Fix parameter to vms_special_exit() call.

packages/vms/ :
  backup_gnv_curl_src.com : Fix the error message to have the correct package.

  build_curl-config_script.com : Rewrite to be more accurate.

  build_libcurl_pc.com : Use tool_version.h now.

  build_vms.com : Fix to handle lib/vtls directory.

  curl_gnv_build_steps.txt : Updated build procedure documentation.

  generate_config_vms_h_curl.com :
       * VAX does not support 64 bit ints, so no NTLM support for now.
       * VAX HP SSL port is ancient, needs some help.
       * Disable NGHTTP2 for now, not ported to VMS.
       * Disable UNIX_SOCKETS, not available on VMS yet.
       * HP GSSAPI port does not have gss_nt_service_name.

  gnv_link_curl.com : Update for new curl structure.

  pcsi_product_gnv_curl.com : Set up to optionally do a complete build.

10 years agosockfilt.c: use non-Ex functions that are available before WinXP
Marc Hoersken [Sun, 21 Dec 2014 13:32:40 +0000 (14:32 +0100)]
sockfilt.c: use non-Ex functions that are available before WinXP

It was initially reported by Guenter that GetFileSizeEx
requires (_WIN32_WINNT >= 0x0500) to be true.

10 years agotests: use Cygwin-style paths in SSH, SSHD and SFTP config files
Marc Hoersken [Sun, 21 Dec 2014 02:48:41 +0000 (03:48 +0100)]
tests: use Cygwin-style paths in SSH, SSHD and SFTP config files

Second patch to enable Windows support using Cygwin-based OpenSSH.

Tested with CopSSH 5.0.0 free edition using an msys shell on Windows 7.

10 years agotests: support spaces in paths to SSH, SSHD and SFTP binaries
Marc Hoersken [Sun, 21 Dec 2014 01:42:29 +0000 (02:42 +0100)]
tests: support spaces in paths to SSH, SSHD and SFTP binaries

First patch to enable Windows support using Cygwin-based OpenSSH.

10 years agonon-ascii: Reduce variable usage
Steve Holme [Fri, 19 Dec 2014 20:41:47 +0000 (20:41 +0000)]
non-ascii: Reduce variable usage

Removed 'next' variable in Curl_convert_form(). Rather than setting it
from 'form->next' and using that to set 'form' after the conversion
just use 'form = form->next' instead.

10 years agonon-ascii: Prefer while loop rather than a do loop
Steve Holme [Fri, 19 Dec 2014 20:38:26 +0000 (20:38 +0000)]
non-ascii: Prefer while loop rather than a do loop

This also removes the need to check that the 'form' argument is valid.

10 years agonon-ascii: Reduce variable scope
Steve Holme [Fri, 19 Dec 2014 20:29:56 +0000 (20:29 +0000)]
non-ascii: Reduce variable scope

As 'result' isn't used out side the conversion callback code and
previously caused variable shadowing in the libiconv based code.

10 years agonon-ascii: We prefer 'CURLcode result'
Steve Holme [Fri, 19 Dec 2014 20:17:37 +0000 (20:17 +0000)]
non-ascii: We prefer 'CURLcode result'

This also fixes a variable shadowing issue when HAVE_ICONV is defined
as rc was declared for the result code of libiconv based functions.

10 years agosecureserver.pl: clean up formatting of config and fix verbose output
Marc Hoersken [Fri, 19 Dec 2014 16:25:16 +0000 (17:25 +0100)]
secureserver.pl: clean up formatting of config and fix verbose output

Verbose output was not matching the actual configuration file,
because FIPS and Windows conditions were ignored.

10 years agosecureserver.pl: update Windows detection and fix path conversion
Marc Hoersken [Fri, 19 Dec 2014 16:17:26 +0000 (17:17 +0100)]
secureserver.pl: update Windows detection and fix path conversion

10 years agosecureserver.pl: make OpenSSL CApath and cert absolute path values
Marc Hoersken [Fri, 19 Dec 2014 16:16:19 +0000 (17:16 +0100)]
secureserver.pl: make OpenSSL CApath and cert absolute path values

Recent stunnel versions (5.08) seem to have trouble with relative
paths on Windows. This turns the relative paths into absolute ones.

10 years agoif2ip: dummy scope parameter for Curl_if2ip() call in SIOCGIFADDR-enabled code.
Patrick Monnerat [Thu, 18 Dec 2014 10:05:18 +0000 (11:05 +0100)]
if2ip: dummy scope parameter for Curl_if2ip() call in SIOCGIFADDR-enabled code.

10 years agoparseurlandfillconn(): fix improper non-numeric scope_id stripping.
Kyle J. McKay [Wed, 17 Dec 2014 14:52:07 +0000 (15:52 +0100)]
parseurlandfillconn(): fix improper non-numeric scope_id stripping.
Fixes SF bug 1149: http://sourceforge.net/p/curl/bugs/1449/

10 years agoIPV6: address scope != scope id
Patrick Monnerat [Tue, 16 Dec 2014 12:29:01 +0000 (13:29 +0100)]
IPV6: address scope != scope id
There was a confusion between these: this commit tries to disambiguate them.
- Scope can be computed from the address itself.
- Scope id is scope dependent: it is currently defined as 1-based local
  interface index for link-local scoped addresses, and as a site index(?) for
  (obsolete) site-local addresses. Linux only supports it for link-local
  addresses.
The URL parser properly parses a scope id as an interface index, but stores it
in a field named "scope": confusion. The field has been renamed into "scope_id".
Curl_if2ip() used the scope id as it was a scope. This caused failures
to bind to an interface.
Scope is now computed from the addresses and Curl_if2ip() matches them.
If redundantly specified in the URL, scope id is check for mismatch with
the interface index.

This commit should fix SF bug #1451.

10 years agoconnect: singleipconnect(): properly try other address families after failure
Patrick Monnerat [Mon, 15 Dec 2014 15:36:57 +0000 (16:36 +0100)]
connect: singleipconnect(): properly try other address families after failure

10 years agoSFTP: work-around servers that return zero size on STAT
Daniel Stenberg [Mon, 15 Dec 2014 21:52:30 +0000 (22:52 +0100)]
SFTP: work-around servers that return zero size on STAT

Bug: http://curl.haxx.se/mail/lib-2014-12/0103.html
Pathed-by: Marc Renault
10 years agoglob_next_url: make the loop count upwards
Daniel Stenberg [Tue, 16 Dec 2014 08:01:56 +0000 (09:01 +0100)]
glob_next_url: make the loop count upwards

As the former contruct apparently caused a compiler warning, mentioned
in d8efde07e556c.

10 years agotool_operate: we prefer 'CURLcode result'
Daniel Stenberg [Tue, 16 Dec 2014 07:35:47 +0000 (08:35 +0100)]
tool_operate: we prefer 'CURLcode result'

10 years agotool_urlglob: unify return codes to use CURLcode
Daniel Stenberg [Tue, 16 Dec 2014 00:00:23 +0000 (01:00 +0100)]
tool_urlglob: unify return codes to use CURLcode

There was a mix of GlobCode, CURLcode and ints and they were mostly
passing around CURLcode errors. This change makes the functions use only
CURLcode and removes the GlobCode type completely.

10 years agotool_urlglob.c: partly reverse dc19789444
Daniel Stenberg [Mon, 15 Dec 2014 23:51:22 +0000 (00:51 +0100)]
tool_urlglob.c: partly reverse dc19789444

The loop in glob_next_url() needs to be done backwards to maintain the
logic. dc19789444 caused test 1235 to fail.

10 years agoKNOWN_BUGS: the SFTP code doesn't support CURLINFO_FILETIME
Daniel Stenberg [Mon, 15 Dec 2014 21:30:27 +0000 (22:30 +0100)]
KNOWN_BUGS: the SFTP code doesn't support CURLINFO_FILETIME

10 years agoopts: Warn CURLOPT_TIMEOUT overrides when set after CURLOPT_TIMEOUT_MS
Jay Satiro [Mon, 15 Dec 2014 19:42:21 +0000 (14:42 -0500)]
opts: Warn CURLOPT_TIMEOUT overrides when set after CURLOPT_TIMEOUT_MS

Change CURLOPT_TIMEOUT doc to warn that if CURLOPT_TIMEOUT and
CURLOPT_TIMEOUT_MS are both set whichever one is set last is the one
that will be used.

Prior to this change that behavior was only noted in the
CURLOPT_TIMEOUT_MS doc.

10 years agodarwinssl: fix incorrect usage of aprintf()
Nick Zitzmann [Mon, 15 Dec 2014 06:56:09 +0000 (00:56 -0600)]
darwinssl: fix incorrect usage of aprintf()

Commit b13923f changed an snprintf() to use aprintf(), but the API usage
wasn't correct, and was causing a crash to occur. This fixes it.

10 years agocopyright: Updated the copyright year following recent updates
Steve Holme [Sun, 14 Dec 2014 22:39:27 +0000 (22:39 +0000)]
copyright: Updated the copyright year following recent updates

10 years agotool_urlglob.c: reverse two loops
Daniel Stenberg [Sun, 14 Dec 2014 22:32:53 +0000 (23:32 +0100)]
tool_urlglob.c: reverse two loops

By counting from 0 and up instead of backwards like before, we remove
the need for the "funny" check of the unsigned variable when decreased
passed zero. Easier to read and less risk for compiler warnings.

10 years agotool_urlglob.c: Added braces to clarify the conditions
Marc Hoersken [Sun, 14 Dec 2014 21:50:01 +0000 (22:50 +0100)]
tool_urlglob.c: Added braces to clarify the conditions

10 years agotool_urlglob.c: Silence warning C6293: Ill-defined for-loop
Marc Hoersken [Sun, 14 Dec 2014 21:45:06 +0000 (22:45 +0100)]
tool_urlglob.c: Silence warning C6293: Ill-defined for-loop

The >= 0 is actually not required, since i underflows and
the for-loop is stopped using the < condition, but this
makes the VS2012 compiler and code analysis happy.

10 years agotool_binmode.c: Explicitly ignore the return code of setmode
Marc Hoersken [Sun, 14 Dec 2014 21:31:10 +0000 (22:31 +0100)]
tool_binmode.c: Explicitly ignore the return code of setmode

Fixes code analysis warning C6031:
return value ignored: <function> could return unexpected value

10 years agolib: Fixed multiple code analysis warnings if SAL are available
Marc Hoersken [Sun, 14 Dec 2014 21:16:23 +0000 (22:16 +0100)]
lib: Fixed multiple code analysis warnings if SAL are available

warning C28252: Inconsistent annotation for function:
parameter has another annotation on this instance

10 years agosmb.c: Fixed code analysis warning
Steve Holme [Sun, 14 Dec 2014 21:01:09 +0000 (21:01 +0000)]
smb.c: Fixed code analysis warning

smb.c:320: warning C6297: Arithmetic overflow: 32-bit value is shifted,
           then cast to 64-bit value. Result may not be an expected
           value

10 years agotool_util.c: Use GetTickCount64 if it is available
Marc Hoersken [Sun, 14 Dec 2014 17:32:41 +0000 (18:32 +0100)]
tool_util.c: Use GetTickCount64 if it is available

10 years agosmb: Use HAVE_PROCESS_H for process.h inclusion
Steve Holme [Sun, 14 Dec 2014 16:42:08 +0000 (16:42 +0000)]
smb: Use HAVE_PROCESS_H for process.h inclusion

Rather than testing against _WIN32 use the preferred HAVE_PROCESS_H
pre-processor define when including process.h.

10 years agodarwinssl: aprintf() to allocate the session key
Daniel Stenberg [Sun, 14 Dec 2014 16:34:02 +0000 (17:34 +0100)]
darwinssl: aprintf() to allocate the session key

... to avoid using a fixed memory size that risks being too large or too
small.

10 years agocurl_schannel: Improvements to memory re-allocation strategy
Marc Hoersken [Sun, 14 Dec 2014 16:27:20 +0000 (17:27 +0100)]
curl_schannel: Improvements to memory re-allocation strategy

- do not grow memory by doubling its size
- do not leak previously allocated memory if reallocation fails
- replace while-loop with a single check to make sure
  that the requested amount of data fits into the buffer

Bug: http://curl.haxx.se/bug/view.cgi?id=1450
Reported-by: Warren Menzer
10 years agoasyn-ares: We prefer use of 'CURLcode result'
Steve Holme [Sun, 14 Dec 2014 16:19:59 +0000 (16:19 +0000)]
asyn-ares: We prefer use of 'CURLcode result'

10 years agocurl_schannel.c: Data may be available before connection shutdown
Marc Hoersken [Sun, 14 Dec 2014 15:40:49 +0000 (16:40 +0100)]
curl_schannel.c: Data may be available before connection shutdown

10 years agohttp2: Use 'CURLcode result' for curl result codes
Steve Holme [Sun, 14 Dec 2014 13:09:29 +0000 (13:09 +0000)]
http2: Use 'CURLcode result' for curl result codes

10 years agoasyn-thread: We prefer 'CURLcode result'
Steve Holme [Sun, 14 Dec 2014 12:52:08 +0000 (12:52 +0000)]
asyn-thread:  We prefer 'CURLcode result'

10 years agosmb: Fixed unnecessary initialisation of struct member variables
Steve Holme [Sun, 14 Dec 2014 12:27:57 +0000 (12:27 +0000)]
smb: Fixed unnecessary initialisation of struct member variables

There is no need to set the 'state' and 'result' member variables to
SMB_REQUESTING (0) and CURLE_OK (0) after the allocation via calloc()
as calloc() initialises the contents to zero.

10 years agontlm: Fixed return code for bad type-2 Target Info
Steve Holme [Sun, 14 Dec 2014 12:07:57 +0000 (12:07 +0000)]
ntlm: Fixed return code for bad type-2 Target Info

Use CURLE_BAD_CONTENT_ENCODING for bad type-2 Target Info security
buffers just like we do for bad decodes.

10 years agontlm: Remove unnecessary casts in readshort_le()
Steve Holme [Sun, 14 Dec 2014 11:45:14 +0000 (11:45 +0000)]
ntlm: Remove unnecessary casts in readshort_le()

I don't think both of my fix ups from yesterday were needed to fix the
compilation warning, so remove the one that I think is unnecessary and
let the next Android autobuild prove/disprove it.

10 years agocurl_ntlm_msgs.c: Another attempt to fix compilation warning
Steve Holme [Sat, 13 Dec 2014 14:55:26 +0000 (14:55 +0000)]
curl_ntlm_msgs.c: Another attempt to fix compilation warning

curl_ntlm_msgs.c:170: warning: conversion to 'short unsigned int' from
                      'int' may alter its value

10 years agosynctime.c: added own user-agent string.
Guenter Knauf [Sat, 13 Dec 2014 14:02:30 +0000 (15:02 +0100)]
synctime.c: added own user-agent string.

10 years agosmb.c: Fixed line longer than 79 columns
Steve Holme [Sat, 13 Dec 2014 13:06:56 +0000 (13:06 +0000)]
smb.c: Fixed line longer than 79 columns

10 years agocurl_ntlm_msgs.c: Fixed compilation warning from commit 783b5c3b11
Steve Holme [Sat, 13 Dec 2014 12:51:11 +0000 (12:51 +0000)]
curl_ntlm_msgs.c: Fixed compilation warning from commit 783b5c3b11

curl_ntlm_msgs.c:169: warning: conversion to 'short unsigned int' from
                      'int' may alter its value

10 years agomk-ca-bundle.pl: restored forced run again.
Guenter Knauf [Sat, 13 Dec 2014 12:46:45 +0000 (13:46 +0100)]
mk-ca-bundle.pl: restored forced run again.

10 years agosynctime.c: removed another timeserver URL.
Guenter Knauf [Sat, 13 Dec 2014 12:43:19 +0000 (13:43 +0100)]
synctime.c: removed another timeserver URL.

worldtimeserver.com seems also no longer available.

10 years agosynctime.c: fixed timeserver URLs.
Guenter Knauf [Sat, 13 Dec 2014 12:29:59 +0000 (13:29 +0100)]
synctime.c: fixed timeserver URLs.

For getting the date header its not necessary to access special
pages or even CGI scripts - all pages including the main index
reply with the date header, therefore shortened URLs to domain.
Removed worldtime.com; added pool.ntp.org.

10 years agoftp.c: Fixed compilation warning when no verbose string support
Steve Holme [Sat, 13 Dec 2014 12:32:32 +0000 (12:32 +0000)]
ftp.c: Fixed compilation warning when no verbose string support

ftp.c:819: warning: unused parameter 'lineno'

10 years agosmb: Added state change functions to assist with debugging
Steve Holme [Sat, 13 Dec 2014 12:12:45 +0000 (12:12 +0000)]
smb: Added state change functions to assist with debugging

For debugging purposes, and as per other protocols within curl, added
state change functions rather than changing the states directly.

10 years agontlm: Use short integer when decoding 16-bit values
Steve Holme [Sat, 13 Dec 2014 11:14:55 +0000 (11:14 +0000)]
ntlm: Use short integer when decoding 16-bit values

10 years agoRELEASE-NOTES: Synced with 6291a16b20
Steve Holme [Fri, 12 Dec 2014 23:30:50 +0000 (23:30 +0000)]
RELEASE-NOTES: Synced with 6291a16b20

10 years agosmtp.c: Fixed compilation warnings
Steve Holme [Fri, 12 Dec 2014 22:57:31 +0000 (22:57 +0000)]
smtp.c: Fixed compilation warnings

smtp.c:2357 warning: adding 'size_t' (aka 'unsigned long') to a string
            does not append to the string
smtp.c:2375 warning: adding 'size_t' (aka 'unsigned long') to a string
            does not append to the string
smtp.c:2386 warning: adding 'size_t' (aka 'unsigned long') to a string
            does not append to the string

Used array index notation instead.

10 years agosmb: Disable SMB when 64-bit integers are not supported
Steve Holme [Fri, 12 Dec 2014 22:08:03 +0000 (22:08 +0000)]
smb: Disable SMB when 64-bit integers are not supported

This fixes compilation issues with compilers that don't support 64-bit
integers through long long or __int64.

10 years agontlm: Disable NTLM v2 when 64-bit integers are not supported
Steve Holme [Fri, 12 Dec 2014 21:57:59 +0000 (21:57 +0000)]
ntlm: Disable NTLM v2 when 64-bit integers are not supported

This fixes compilation issues with compilers that don't support 64-bit
integers through long long or __int64 which was introduced in commit
07b66cbfa4.

10 years agontlm: Allow NTLM2Session messages when USE_NTRESPONSES manually defined
Steve Holme [Fri, 12 Dec 2014 21:40:09 +0000 (21:40 +0000)]
ntlm: Allow NTLM2Session messages when USE_NTRESPONSES manually defined

Previously USE_NTLM2SESSION would only be defined automatically when
USE_NTRESPONSES wasn't already defined. Separated the two definitions
so that the user can manually set USE_NTRESPONSES themselves but
USE_NTLM2SESSION is defined automatically if they don't define it.

10 years agosmtp.c: Fixed line longer than 79 columns
Steve Holme [Fri, 12 Dec 2014 21:06:01 +0000 (21:06 +0000)]
smtp.c: Fixed line longer than 79 columns

10 years agoconfig-win32.h: Don't enable Windows Crypt API if using OpenSSL
Steve Holme [Fri, 12 Dec 2014 19:46:56 +0000 (19:46 +0000)]
config-win32.h: Don't enable Windows Crypt API if using OpenSSL

As the OpenSSL and NSS Crypto engines are prefered by the core NTLM
routines, to the Windows Crypt API, don't define USE_WIN32_CRYPT
automatically when either OpenSSL or NSS are in use - doing so would
disable NTLM2Session responses in NTLM type-3 messages.