]> granicus.if.org Git - curl/log
curl
9 years agoREADME.http2: refreshed and added TODO items
Daniel Stenberg [Wed, 25 Mar 2015 11:13:16 +0000 (12:13 +0100)]
README.http2: refreshed and added TODO items

9 years agoglobbing: fix step parsing for character globbing ranges
Emil Lerner [Wed, 25 Mar 2015 04:43:04 +0000 (07:43 +0300)]
globbing: fix step parsing for character globbing ranges

The glob_range function used wrong offset (3 instead of 4) for parsing
integer step inside character range specification, which led to 'bad
range' error when using character ranges with explicitly specified step
(such as '[a-z:2]')

9 years agopolarssl: called mbedTLS in 1.3.10 and later
Daniel Stenberg [Wed, 25 Mar 2015 08:19:57 +0000 (09:19 +0100)]
polarssl: called mbedTLS in 1.3.10 and later

9 years agopolarssl: remove dead code
Daniel Stenberg [Wed, 25 Mar 2015 08:01:11 +0000 (09:01 +0100)]
polarssl: remove dead code

and simplify code by changing if-elses to a switch()

CID 1291706: Logically dead code. Execution cannot reach this statement

9 years agopolarssl: remove superfluous for(;;) loop
Daniel Stenberg [Wed, 25 Mar 2015 07:49:34 +0000 (08:49 +0100)]
polarssl: remove superfluous for(;;) loop

"unreachable: Since the loop increment is unreachable, the loop body
will never execute more than once."

Coverity CID 1291707

9 years agoCurl_ssl_md5sum: return CURLcode
Daniel Stenberg [Wed, 25 Mar 2015 07:32:12 +0000 (08:32 +0100)]
Curl_ssl_md5sum: return CURLcode

... since the funciton can fail on OOM. Check this return code.

Coverity CID 1291705.

9 years agocyassl: default to highest possible TLS version
Jay Satiro [Wed, 25 Mar 2015 06:40:00 +0000 (02:40 -0400)]
cyassl: default to highest possible TLS version

(cyassl_connect_step1)
- Use TLS 1.0-1.2 by default when available.

CyaSSL/wolfSSL >= v3.3.0 supports setting a minimum protocol downgrade
version.

cyassl/cyassl@322f79f

9 years agocyassl: Check for invalid length parameter in Curl_cyassl_random
Jay Satiro [Wed, 25 Mar 2015 06:37:20 +0000 (02:37 -0400)]
cyassl: Check for invalid length parameter in Curl_cyassl_random

9 years agocyassl: If wolfSSL then identify as such in version string
Jay Satiro [Wed, 25 Mar 2015 06:33:44 +0000 (02:33 -0400)]
cyassl: If wolfSSL then identify as such in version string

9 years agosymbols-in-versions: added CURLOPT_PATH_AS_IS
Dan Fandrich [Tue, 24 Mar 2015 22:45:22 +0000 (23:45 +0100)]
symbols-in-versions: added CURLOPT_PATH_AS_IS

9 years agotestcurl.pl: add the --notes option to supply more info about a build
Dan Fandrich [Tue, 24 Mar 2015 22:43:32 +0000 (23:43 +0100)]
testcurl.pl: add the --notes option to supply more info about a build

Support for notes has been in place for a while, but it required
being added to the setup file manually.

9 years agocurl_memory: make curl_memory.h the second-last header file loaded
Dan Fandrich [Tue, 24 Mar 2015 22:12:03 +0000 (23:12 +0100)]
curl_memory: make curl_memory.h the second-last header file loaded

This header file must be included after all header files except
memdebug.h, as it does similar memory function redefinitions and can be
similarly affected by conflicting definitions in system or dependent
library headers.

9 years agoopenssl: do the OCSP work-around for libressl too
Daniel Stenberg [Tue, 24 Mar 2015 22:39:52 +0000 (23:39 +0100)]
openssl: do the OCSP work-around for libressl too

I tested with libressl git master now (v2.1.4-27-g34bf96c) and it seems to
still require the work-around for stapling to work.

9 years agoopenssl: verifystatus: only use the OCSP work-around <= 1.0.2a
Daniel Stenberg [Tue, 24 Mar 2015 22:05:26 +0000 (23:05 +0100)]
openssl: verifystatus: only use the OCSP work-around <= 1.0.2a

URL: http://curl.haxx.se/mail/lib-2015-03/0205.html
Reported-by: Alessandro Ghedini
9 years agoopenssl: adapt to ASN1/X509 things gone opaque in 1.1
Daniel Stenberg [Tue, 24 Mar 2015 21:59:33 +0000 (22:59 +0100)]
openssl: adapt to ASN1/X509 things gone opaque in 1.1

9 years agocurl_easy_setopt.3: Fix misspelling in CURLOPT_PATH_AS_IS description
Jay Satiro [Tue, 24 Mar 2015 19:02:22 +0000 (15:02 -0400)]
curl_easy_setopt.3: Fix misspelling in CURLOPT_PATH_AS_IS description

9 years agoCURLOPT_HTTPHEADER.3: fix typo in recent commit
Viktor Szakáts [Tue, 24 Mar 2015 16:59:42 +0000 (17:59 +0100)]
CURLOPT_HTTPHEADER.3: fix typo in recent commit

9 years agoCURLOPT_PATH_AS_IS.3: add type 'long' to prototype
Viktor Szakáts [Tue, 24 Mar 2015 16:52:22 +0000 (17:52 +0100)]
CURLOPT_PATH_AS_IS.3: add type 'long' to prototype

9 years agovtls: fix compile with --disable-crypto-auth but with SSL
Dan Fandrich [Tue, 24 Mar 2015 20:41:22 +0000 (21:41 +0100)]
vtls: fix compile with --disable-crypto-auth but with SSL

This is a strange combination of options, but is allowed.

9 years agoos400: define new options in ILE/RPG binding.
Patrick Monnerat [Tue, 24 Mar 2015 11:18:31 +0000 (12:18 +0100)]
os400: define new options in ILE/RPG binding.

9 years agoRELEASE-NOTES: synced with f6878609361
Daniel Stenberg [Tue, 24 Mar 2015 10:14:35 +0000 (11:14 +0100)]
RELEASE-NOTES: synced with f6878609361

9 years agocurl_easy_setopt.3: Add CURLOPT_PATH_AS_IS
Daniel Stenberg [Tue, 24 Mar 2015 10:06:38 +0000 (11:06 +0100)]
curl_easy_setopt.3: Add CURLOPT_PATH_AS_IS

9 years agoCURLOPT_PATH_AS_IS: added
Daniel Stenberg [Mon, 23 Mar 2015 09:51:49 +0000 (10:51 +0100)]
CURLOPT_PATH_AS_IS: added

--path-as-is is the command line option

Added docs in curl.1 and CURLOPT_PATH_AS_IS.3

Added test in test 1241

9 years agocurl_easy_recv/send: make them work with the multi interface
Yamada Yasuharu [Mon, 23 Mar 2015 21:46:58 +0000 (22:46 +0100)]
curl_easy_recv/send: make them work with the multi interface

By making sure Curl_getconnectinfo() uses the correct connection cache
to find the last connection.

9 years agohttp2: move the init too for when its actually needed
Daniel Stenberg [Mon, 23 Mar 2015 09:25:18 +0000 (10:25 +0100)]
http2: move the init too for when its actually needed

... it would otherwise lead to memory leakage if we never actually do
the switch.

9 years agodict: rename byte to avoid compiler shadowed declaration warning
Dan Fandrich [Mon, 23 Mar 2015 09:16:10 +0000 (10:16 +0100)]
dict: rename byte to avoid compiler shadowed declaration warning

This conflicted with a WolfSSL typedef.

9 years agocyassl: include version.h to ensure the version macros are defined
Dan Fandrich [Mon, 23 Mar 2015 09:10:03 +0000 (10:10 +0100)]
cyassl: include version.h to ensure the version macros are defined

9 years agotest1513: eliminated race condition in test run
Dan Fandrich [Sat, 21 Mar 2015 22:57:32 +0000 (23:57 +0100)]
test1513: eliminated race condition in test run

It seems that some systems (e.g. fairly consistently in some recent
Solaris autobuilds) would manage to get to the connect phase before the
progress callback was called, resulting in a CURLE_COULDNT_CONNECT
error. Reworked the test to point at a test server that never returns a
full result so the progress callback always gets a chance to be called
before the transfer can complete in some other way.

9 years agodarwinsssl: add support for TLS False Start
Nick Zitzmann [Sat, 21 Mar 2015 17:22:56 +0000 (12:22 -0500)]
darwinsssl: add support for TLS False Start

TLS False Start support requires iOS 7.0 or later, or OS X 10.9 or later.

9 years agogtls: add check of return code
Daniel Stenberg [Sat, 21 Mar 2015 15:50:51 +0000 (16:50 +0100)]
gtls: add check of return code

Coverity CID 1291167 pointed out that 'rc' was received but never used when
gnutls_credentials_set() was used. Added return code check now.

9 years agogtls: dereferencing NULL pointer
Daniel Stenberg [Sat, 21 Mar 2015 15:47:22 +0000 (16:47 +0100)]
gtls: dereferencing NULL pointer

Coverity CID 1291165 pointed out 'chainp' could be dereferenced when
NULL if gnutls_certificate_get_peers() had previously failed.

9 years agogtls: avoid uninitialized variable.
Daniel Stenberg [Sat, 21 Mar 2015 15:44:17 +0000 (16:44 +0100)]
gtls: avoid uninitialized variable.

Coverity CID 1291166 pointed out that we could read this variable
uninitialized.

9 years agotests/certs: rebuild certificates with modified key usage bits
Dan Fandrich [Sat, 21 Mar 2015 15:20:34 +0000 (16:20 +0100)]
tests/certs: rebuild certificates with modified key usage bits

The certificates were missing the digitalSignature and keyAgreement
usage types, of which at least digitalSignature was checked by CyaSSL.
This caused the test server in test 310 (among others) to fail the
startup verification and therefore run (see
http://curl.haxx.se/mail/lib-2014-07/0303.html).

9 years agotests/certs: added make target to rebuild certificates
Dan Fandrich [Sat, 21 Mar 2015 13:23:00 +0000 (14:23 +0100)]
tests/certs: added make target to rebuild certificates

The certificate generation scripts were also updated to better match the
format of the certificates currently checked in.

9 years agox509asn1: add /* fallthrough */ in switch() case
Daniel Stenberg [Sat, 21 Mar 2015 15:29:58 +0000 (16:29 +0100)]
x509asn1: add /* fallthrough */ in switch() case

9 years agox509asn1: minor edit to unconfuse Coverity
Daniel Stenberg [Sat, 21 Mar 2015 15:21:01 +0000 (16:21 +0100)]
x509asn1: minor edit to unconfuse Coverity

CID 1202732 warns on the previous use, although I cannot fine any
problems with it. I'm doing this change only to make the code use a more
familiar approach to accomplish the same thing.

9 years agotestcurl: Allow '=' in values given on command line
Dagobert Michelsen [Sat, 21 Mar 2015 14:38:56 +0000 (15:38 +0100)]
testcurl: Allow '=' in values given on command line

9 years agonss: error: unused variable 'connssl'
Daniel Stenberg [Sat, 21 Mar 2015 14:47:03 +0000 (15:47 +0100)]
nss: error: unused variable 'connssl'

9 years agotest938: added missing closing tags
Dan Fandrich [Sat, 21 Mar 2015 00:27:44 +0000 (01:27 +0100)]
test938: added missing closing tags

9 years agocyassl: use new library version macro when available
Dan Fandrich [Fri, 20 Mar 2015 22:49:53 +0000 (23:49 +0100)]
cyassl: use new library version macro when available

9 years agocurl: add --false-start option
Alessandro Ghedini [Sat, 14 Feb 2015 17:17:04 +0000 (18:17 +0100)]
curl: add --false-start option

9 years agonss: add support for TLS False Start
Alessandro Ghedini [Sat, 14 Feb 2015 15:59:01 +0000 (16:59 +0100)]
nss: add support for TLS False Start

9 years agourl: add CURLOPT_SSL_FALSESTART option
Alessandro Ghedini [Sat, 14 Feb 2015 15:57:07 +0000 (16:57 +0100)]
url: add CURLOPT_SSL_FALSESTART option

This option can be used to enable/disable TLS False Start defined in the RFC
draft-bmoeller-tls-falsestart.

9 years agogtls: implement CURLOPT_CERTINFO
Alessandro Ghedini [Fri, 20 Mar 2015 18:03:53 +0000 (19:03 +0100)]
gtls: implement CURLOPT_CERTINFO

9 years agoopenssl: try to avoid accessing OCSP structs when possible
Alessandro Ghedini [Fri, 20 Mar 2015 12:24:08 +0000 (13:24 +0100)]
openssl: try to avoid accessing OCSP structs when possible

9 years agoCURLOPT_URL.3: spelling!
Daniel Stenberg [Fri, 20 Mar 2015 12:49:14 +0000 (13:49 +0100)]
CURLOPT_URL.3: spelling!

Reported-by: Frank Gevaerts
9 years agoCURLOPT_URL.3: Added "SECURITY CONCERNS"
Daniel Stenberg [Fri, 20 Mar 2015 11:14:40 +0000 (12:14 +0100)]
CURLOPT_URL.3: Added "SECURITY CONCERNS"

9 years agoCURLOPT_HTTPHEADER.3: add a "SECURITY CONCERNS" section
Daniel Stenberg [Fri, 20 Mar 2015 11:03:09 +0000 (12:03 +0100)]
CURLOPT_HTTPHEADER.3: add a "SECURITY CONCERNS" section

9 years agocyassl: detect the library as renamed wolfssl
Dan Fandrich [Thu, 19 Mar 2015 22:41:10 +0000 (23:41 +0100)]
cyassl: detect the library as renamed wolfssl

This change was made in CyaSSL/WolfSSL ver. 3.4.0

9 years agoHTTP: don't switch to HTTP/2 from 1.1 until we get the 101
Daniel Stenberg [Thu, 19 Mar 2015 12:44:18 +0000 (13:44 +0100)]
HTTP: don't switch to HTTP/2 from 1.1 until we get the 101

We prematurely changed protocol handler to HTTP/2 which made things very
slow (and wrong).

Reported-by: Stefan Eissing
Bug: https://github.com/bagder/curl/issues/169

9 years agoaxtls: version 1.5.2 now requires that config.h be manually included
Dan Fandrich [Thu, 19 Mar 2015 09:11:17 +0000 (10:11 +0100)]
axtls: version 1.5.2 now requires that config.h be manually included

9 years agometalink: fix resource leak in OOM
Daniel Stenberg [Thu, 19 Mar 2015 08:07:11 +0000 (09:07 +0100)]
metalink: fix resource leak in OOM

Coverity CID 1288826

9 years agodocs/libcurl: clean up libcurl-symbols.3
Dan Fandrich [Wed, 18 Mar 2015 22:54:36 +0000 (23:54 +0100)]
docs/libcurl: clean up libcurl-symbols.3

9 years agodocs/libcurl: check that all options with man pages are referenced
Dan Fandrich [Wed, 18 Mar 2015 22:21:46 +0000 (23:21 +0100)]
docs/libcurl: check that all options with man pages are referenced

If a man page exists in the opts/ directory, it must also be referenced
either in curl_easy_setopt.3 or curl_multi_setopt.3

9 years agocurl_easy_setopt.3: added a few missing options
Dan Fandrich [Wed, 18 Mar 2015 22:20:49 +0000 (23:20 +0100)]
curl_easy_setopt.3: added a few missing options

9 years agonss: explicitly tell NSS to disable NPN/ALPN
Kamil Dudka [Wed, 18 Mar 2015 18:38:32 +0000 (19:38 +0100)]
nss: explicitly tell NSS to disable NPN/ALPN

... if disabled at libcurl level.  Otherwise, we would allow to
negotiate NPN despite curl was invoked with the --no-npn option.

9 years agomkhelp: Remove trailing carriage return from every line of input
Jay Satiro [Wed, 18 Mar 2015 05:44:48 +0000 (01:44 -0400)]
mkhelp: Remove trailing carriage return from every line of input

- Get rid of this flood of warnings in Windows mingw build:
warning: missing terminating " character

The warning is due to the carriage return. When msysgit checks out files
from the repo by default it converts the line endings to CRLF. Prior to
this change when mkhelp.pl processed the MANUAL and curl.1 in CRLF
format the trailing carriage returns caused unnecessary CR in the
output.

9 years agoRELEASE-NOTES: synced with e539f01567
Daniel Stenberg [Wed, 18 Mar 2015 07:37:54 +0000 (08:37 +0100)]
RELEASE-NOTES: synced with e539f01567

9 years agodocs/libcurl: make portability fix
Christian Weisgerber [Wed, 18 Mar 2015 07:31:06 +0000 (08:31 +0100)]
docs/libcurl: make portability fix

Using $< in a non-suffix rule context is a GNU make idiom.  This bug was
introduced in 7.41.0.

9 years agochecksrc: Fix whitelist on out-of-tree builds
Dan Fandrich [Tue, 17 Mar 2015 22:26:48 +0000 (23:26 +0100)]
checksrc: Fix whitelist on out-of-tree builds

9 years agoCurl_sh_entry: remove unused 'timestamp'
Stefan Bühler [Tue, 17 Mar 2015 07:28:36 +0000 (08:28 +0100)]
Curl_sh_entry: remove unused 'timestamp'

9 years agoHTTP: don't use Expect: headers when on HTTP/2
Daniel Stenberg [Tue, 17 Mar 2015 14:09:34 +0000 (15:09 +0100)]
HTTP: don't use Expect: headers when on HTTP/2

Reported-by: Stefan Eissing
Bug: https://github.com/bagder/curl/issues/169

9 years agochecksrc: detect and remove space before trailing semicolons
Daniel Stenberg [Tue, 17 Mar 2015 13:06:48 +0000 (14:06 +0100)]
checksrc: detect and remove space before trailing semicolons

9 years agochecksrc: introduce a whitelisting concept
Daniel Stenberg [Tue, 17 Mar 2015 12:53:12 +0000 (13:53 +0100)]
checksrc: introduce a whitelisting concept

9 years agochecksrc: use space after comma
Daniel Stenberg [Tue, 17 Mar 2015 12:41:49 +0000 (13:41 +0100)]
checksrc: use space after comma

9 years agochecksrc: use space before paren in "return (expr);"
Daniel Stenberg [Tue, 17 Mar 2015 12:05:01 +0000 (13:05 +0100)]
checksrc: use space before paren in "return (expr);"

9 years agoCONTRIBUTE: refer to git log instead of deprecated CHANGES file
Daniel Stenberg [Tue, 17 Mar 2015 08:09:23 +0000 (09:09 +0100)]
CONTRIBUTE: refer to git log instead of deprecated CHANGES file

9 years agoCURLOPT_*.3: more examples and edits
Daniel Stenberg [Tue, 17 Mar 2015 07:57:31 +0000 (08:57 +0100)]
CURLOPT_*.3: more examples and edits

9 years agoCURLOPT_*.3: added lots of small example sections
Daniel Stenberg [Tue, 17 Mar 2015 07:03:46 +0000 (08:03 +0100)]
CURLOPT_*.3: added lots of small example sections

9 years agoCURLOPT_PRIVATE.3: provide an example
Daniel Stenberg [Mon, 16 Mar 2015 22:56:11 +0000 (23:56 +0100)]
CURLOPT_PRIVATE.3: provide an example

9 years agoCURLOPT_*TIMEOUT.3: provide examples
Daniel Stenberg [Mon, 16 Mar 2015 22:51:22 +0000 (23:51 +0100)]
CURLOPT_*TIMEOUT.3: provide examples

9 years agoCURLOPT_USERAGENT.3: added an example
Daniel Stenberg [Mon, 16 Mar 2015 22:41:45 +0000 (23:41 +0100)]
CURLOPT_USERAGENT.3: added an example

9 years agoCURLOPT_STDERR.3: added an example
Daniel Stenberg [Mon, 16 Mar 2015 22:40:52 +0000 (23:40 +0100)]
CURLOPT_STDERR.3: added an example

9 years agocurl_easy_perform.3: remove superfluous close brace from example
Daniel Stenberg [Mon, 16 Mar 2015 22:28:23 +0000 (23:28 +0100)]
curl_easy_perform.3: remove superfluous close brace from example

9 years agofree: instead of Curl_safefree()
Daniel Stenberg [Mon, 16 Mar 2015 14:01:15 +0000 (15:01 +0100)]
free: instead of Curl_safefree()

Since we just started make use of free(NULL) in order to simplify code,
this change takes it a step further and:

- converts lots of Curl_safefree() calls to good old free()
- makes Curl_safefree() not check the pointer before free()

The (new) rule of thumb is: if you really want a function call that
frees a pointer and then assigns it to NULL, then use Curl_safefree().
But we will prefer just using free() from now on.

9 years agoBug #149: Deletion of unnecessary checks before a few calls of cURL functions
Markus Elfring [Wed, 11 Mar 2015 17:15:33 +0000 (18:15 +0100)]
Bug #149: Deletion of unnecessary checks before a few calls of cURL functions

The following functions return immediately if a null pointer was passed.
* Curl_cookie_cleanup
* curl_formfree

It is therefore not needed that a function caller repeats a corresponding check.

This issue was fixed by using the software Coccinelle 1.0.0-rc24.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
9 years agoBug #149: Deletion of unnecessary checks before calls of the function "free"
Markus Elfring [Wed, 11 Mar 2015 16:41:01 +0000 (17:41 +0100)]
Bug #149: Deletion of unnecessary checks before calls of the function "free"

The function "free" is documented in the way that no action shall occur for
a passed null pointer. It is therefore not needed that a function caller
repeats a corresponding check.
http://stackoverflow.com/questions/18775608/free-a-null-pointer-anyway-or-check-first

This issue was fixed by using the software Coccinelle 1.0.0-rc24.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
9 years agoconnect: Fix happy eyeballs logic for IPv4-only builds
Jay Satiro [Sun, 15 Mar 2015 19:30:17 +0000 (15:30 -0400)]
connect: Fix happy eyeballs logic for IPv4-only builds

Bug: https://github.com/bagder/curl/pull/168

(trynextip)
- Don't try the "other" protocol family unless IPv6 is available. In an
IPv4-only build the other family can only be IPv6 which is unavailable.

This change essentially stops IPv4-only builds from attempting the
"happy eyeballs" secondary parallel connection that is supposed to be
used by the "other" address family.

Prior to this change in IPv4-only builds that secondary parallel
connection attempt could be erroneously used by the same family (IPv4)
which caused a bug where every address after the first for a host could
be tried twice, often in parallel. This change fixes that bug. An
example of the bug is shown below.

Assume MTEST resolves to 3 addresses 127.0.0.2, 127.0.0.3 and 127.0.0.4:

* STATE: INIT => CONNECT handle 0x64f4b0; line 1046 (connection #-5000)
* Rebuilt URL to: http://MTEST/
* Added connection 0. The cache now contains 1 members
* STATE: CONNECT => WAITRESOLVE handle 0x64f4b0; line 1083
(connection #0)
*   Trying 127.0.0.2...
* STATE: WAITRESOLVE => WAITCONNECT handle 0x64f4b0; line 1163
(connection #0)
*   Trying 127.0.0.3...
* connect to 127.0.0.2 port 80 failed: Connection refused
*   Trying 127.0.0.3...
* connect to 127.0.0.3 port 80 failed: Connection refused
*   Trying 127.0.0.4...
* connect to 127.0.0.3 port 80 failed: Connection refused
*   Trying 127.0.0.4...
* connect to 127.0.0.4 port 80 failed: Connection refused
* connect to 127.0.0.4 port 80 failed: Connection refused
* Failed to connect to MTEST port 80: Connection refused
* Closing connection 0
* The cache now contains 0 members
* Expire cleared
curl: (7) Failed to connect to MTEST port 80: Connection refused

The bug was born in commit bagder/curl@2d435c7.

9 years agomksymbolsmanpage.pl: use std header and generate better nroff header
Daniel Stenberg [Sun, 15 Mar 2015 22:23:20 +0000 (23:23 +0100)]
mksymbolsmanpage.pl: use std header and generate better nroff header

9 years agoclosesocket: call multi socket cb on close even with custom close
Frank Meier [Sun, 15 Mar 2015 12:24:26 +0000 (13:24 +0100)]
closesocket: call multi socket cb on close even with custom close

In function Curl_closesocket() in connect.c the call to
Curl_multi_closed() was wrongly omitted if a socket close function
(CURLOPT_CLOSESOCKETFUNCTION) is registered.

That would lead to not removing the socket from the internal hash table
and not calling the multi socket callback appropriately.

Bug: http://curl.haxx.se/bug/view.cgi?id=1493

9 years agohostip: Fix signal race in Curl_resolv_timeout.
Tobias Stoeckmann [Sat, 14 Mar 2015 13:32:42 +0000 (14:32 +0100)]
hostip: Fix signal race in Curl_resolv_timeout.

A signal handler for SIGALRM is installed in Curl_resolv_timeout. It is
configured to interrupt system calls and uses siglongjmp to return into
the function if alarm() goes off.

The signal handler is installed before curl_jmpenv is initialized.
This means that an already installed alarm timer could trigger the
newly installed signal handler, leading to undefined behavior when it
accesses the uninitialized curl_jmpenv.

Even if there is no previously installed alarm available, the code in
Curl_resolv_timeout itself installs an alarm before the environment is
fully set up. If the process is sent into suspend right after that, the
signal handler could be called too early as in previous scenario.

To fix this, the signal handler should only be installed and the alarm
timer only be set after sigsetjmp has been called.

9 years agohttp2: detect prematures close without data transfered
Daniel Stenberg [Sat, 14 Mar 2015 17:17:59 +0000 (18:17 +0100)]
http2: detect prematures close without data transfered

... by using the regular Curl_http_done() method which checks for
that. This makes test 1801 fail consistently with error 56 (which seems
fine) to that test is also updated here.

Reported-by: Ben Darnell
Bug: https://github.com/bagder/curl/issues/166

9 years agotest320: Expect the Host header to be the first header
Dan Fandrich [Fri, 13 Mar 2015 21:37:23 +0000 (22:37 +0100)]
test320: Expect the Host header to be the first header

Required for the test to work after a5d994941c2b.

9 years agoRELEASE-NOTES: synced with 186e46d88dd
Daniel Stenberg [Thu, 12 Mar 2015 22:40:38 +0000 (23:40 +0100)]
RELEASE-NOTES: synced with 186e46d88dd

9 years agoopenssl: use colons properly in the ciphers list
Daniel Stenberg [Thu, 12 Mar 2015 22:29:46 +0000 (23:29 +0100)]
openssl: use colons properly in the ciphers list

While the previous string worked, this is the documented format.

Reported-by: Richard Moore
9 years agoopenssl: sort the ciphers on strength
Daniel Stenberg [Thu, 12 Mar 2015 22:16:28 +0000 (23:16 +0100)]
openssl: sort the ciphers on strength

This makes curl pick better (stronger) ciphers by default. The strongest
available ciphers are fine according to the HTTP/2 spec so an OpenSSL
built curl is no longer rejected by string HTTP/2 servers.

Bug: http://curl.haxx.se/bug/view.cgi?id=1487

9 years agotest203[0-3]: Expect the Host header to be the first header
Fabian Keil [Thu, 12 Mar 2015 15:06:11 +0000 (16:06 +0100)]
test203[0-3]: Expect the Host header to be the first header

Required for the tests to work after a5d994941c2b.

9 years agoopenssl: show the cipher selection to use
Daniel Stenberg [Thu, 12 Mar 2015 14:53:45 +0000 (15:53 +0100)]
openssl: show the cipher selection to use

9 years agohttp: always send Host: header as first header
Daniel Stenberg [Wed, 11 Mar 2015 23:50:46 +0000 (00:50 +0100)]
http: always send Host: header as first header

...after the method line:

 "Since the Host field-value is critical information for handling a
 request, a user agent SHOULD generate Host as the first header field
 following the request-line." / RFC 7230 section 5.4

Additionally, this will also make libcurl ignore multiple specified
custom Host: headers and only use the first one. Test 1121 has been
updated accordingly

Bug: http://curl.haxx.se/bug/view.cgi?id=1491
Reported-by: Rainer Canavan
9 years agomk-ca-bundle bugfix: Don't report SHA1 numbers with "-q".
Alexander Pepper [Wed, 11 Mar 2015 13:34:59 +0000 (14:34 +0100)]
mk-ca-bundle bugfix: Don't report SHA1 numbers with "-q".

Also unified printing to STDERR by creating the helper method "report".

9 years agoproxy: re-use proxy connections (regression)
Daniel Stenberg [Wed, 11 Mar 2015 10:54:22 +0000 (11:54 +0100)]
proxy: re-use proxy connections (regression)

When checking for a connection to re-use, a proxy-using request must
check for and use a proxy connection and not one based on the host
name!

Added test 1421 to verify

Bug: http://curl.haxx.se/bug/view.cgi?id=1492

9 years agomemanalyze.pl: handle free(NULL)
Jay Satiro [Mon, 9 Mar 2015 23:01:08 +0000 (19:01 -0400)]
memanalyze.pl: handle free(NULL)

9 years ago.travis.yml: Change CI make test to make test-full
Jay Satiro [Tue, 10 Mar 2015 03:51:16 +0000 (23:51 -0400)]
.travis.yml: Change CI make test to make test-full

- Change the continuous integration script to use 'make test-full'
instead of just 'make test' so that the diagnostic log output is
printed to stdout when a test fails.

- Change the continuous integration script to use
'./configure --enable-debug' instead of just './configure' so that the
memory analyzer will work during testing.

Prior to this change Travis used its default C test script:
./configure && make && make test

9 years agogtls: correctly align certificate status verification messages
Alessandro Ghedini [Mon, 9 Mar 2015 22:44:22 +0000 (23:44 +0100)]
gtls: correctly align certificate status verification messages

9 years agogtls: don't print double newline after certificate dates
Alessandro Ghedini [Mon, 9 Mar 2015 23:31:05 +0000 (00:31 +0100)]
gtls: don't print double newline after certificate dates

9 years agogtls: print negotiated TLS version and full cipher suite name
Alessandro Ghedini [Mon, 9 Mar 2015 22:52:16 +0000 (23:52 +0100)]
gtls: print negotiated TLS version and full cipher suite name

Instead of priting cipher and MAC algorithms names separately, print the
whole cipher suite string which also includes the key exchange algorithm,
along with the negotiated TLS version.

9 years agogtls: fix compiler warnings
Daniel Stenberg [Tue, 10 Mar 2015 14:16:59 +0000 (15:16 +0100)]
gtls: fix compiler warnings

9 years agogtls: add support for CURLOPT_CAPATH
Alessandro Ghedini [Sun, 8 Mar 2015 19:11:06 +0000 (20:11 +0100)]
gtls: add support for CURLOPT_CAPATH

9 years agoMacOSX-Framework: use @rpath instead of @executable_path
stopiccot [Mon, 9 Mar 2015 19:46:22 +0000 (22:46 +0300)]
MacOSX-Framework: use @rpath instead of @executable_path

Bug: https://github.com/bagder/curl/pull/157

9 years agoRELEASE-NOTES: synced with c19349951
Daniel Stenberg [Mon, 9 Mar 2015 10:12:54 +0000 (11:12 +0100)]
RELEASE-NOTES: synced with c19349951