]> granicus.if.org Git - curl/log
curl
8 years agoURL parser: reject non-numerical port numbers
Daniel Stenberg [Thu, 1 Dec 2016 09:32:13 +0000 (10:32 +0100)]
URL parser: reject non-numerical port numbers

Test 1281 added to verify

8 years agoruntests: made Servers: output be more consistent by removing OFF
Dan Fandrich [Wed, 30 Nov 2016 21:38:45 +0000 (22:38 +0100)]
runtests: made Servers: output be more consistent by removing OFF

8 years agocyassl: fixed typo introduced in 4f8b1774
Dan Fandrich [Wed, 30 Nov 2016 20:57:55 +0000 (21:57 +0100)]
cyassl: fixed typo introduced in 4f8b1774

8 years agoCURLOPT_CONNECT_TO: Skip non-matching "connect-to" entries properly
Michael Kaufmann [Wed, 30 Nov 2016 10:51:29 +0000 (11:51 +0100)]
CURLOPT_CONNECT_TO: Skip non-matching "connect-to" entries properly

If a port number in a "connect-to" entry does not match, skip this
entry instead of connecting to port 0.

If a port number in a "connect-to" entry matches, use this entry
and look no further.

Reported-by: Jay Satiro
Assisted-by: Jay Satiro, Daniel Stenberg
Closes #1148

8 years agoBUGS: describe bug handling process
Daniel Stenberg [Thu, 17 Nov 2016 22:46:36 +0000 (23:46 +0100)]
BUGS: describe bug handling process

8 years agoRELEASE-NOTES: synced with 19613fb3
Daniel Stenberg [Mon, 28 Nov 2016 22:40:48 +0000 (23:40 +0100)]
RELEASE-NOTES: synced with 19613fb3

8 years agohttp2: check nghttp2_session_set_local_window_size exists
Jay Satiro [Mon, 28 Nov 2016 19:08:35 +0000 (14:08 -0500)]
http2: check nghttp2_session_set_local_window_size exists

The function only exists since nghttp2 1.12.0.

Bug: https://github.com/curl/curl/commit/a4d8888#commitcomment-19985676
Reported-by: Michael Kaufmann
8 years agohttp2: Fix crashes when parent stream gets aborted
Anders Bakken [Mon, 14 Nov 2016 23:32:00 +0000 (15:32 -0800)]
http2: Fix crashes when parent stream gets aborted

Closes #1125

8 years agocmdline-docs: more options converted and fixed
Daniel Stenberg [Mon, 28 Nov 2016 00:01:13 +0000 (01:01 +0100)]
cmdline-docs: more options converted and fixed

Now all options are in the new system.

8 years agogen: include footer in mainpage output
Daniel Stenberg [Sun, 27 Nov 2016 23:54:16 +0000 (00:54 +0100)]
gen: include footer in mainpage output

8 years agolib1536: checksrc compliance
Jay Satiro [Mon, 28 Nov 2016 08:06:04 +0000 (03:06 -0500)]
lib1536: checksrc compliance

8 years agocmdline-opts: more command line options documented
Daniel Stenberg [Sun, 27 Nov 2016 23:50:25 +0000 (00:50 +0100)]
cmdline-opts: more command line options documented

Moved over to the new format

8 years agocurl: remove --proxy-ssl* options
Daniel Stenberg [Sun, 27 Nov 2016 23:07:45 +0000 (00:07 +0100)]
curl: remove --proxy-ssl* options

There's mostly likely no need to allow setting SSLv2/3 version for HTTPS
proxy. Those protocols are insecure by design and deprecated.

8 years agoCURLOPT_PROXY_*.3: polished some proxy option man pages
Daniel Stenberg [Sat, 26 Nov 2016 23:21:15 +0000 (00:21 +0100)]
CURLOPT_PROXY_*.3: polished some proxy option man pages

8 years agoos400: support CURLOPT_PROXY_PINNEDPUBLICKEY
Patrick Monnerat [Sat, 26 Nov 2016 17:52:30 +0000 (18:52 +0100)]
os400: support CURLOPT_PROXY_PINNEDPUBLICKEY

Also define it in ILE/RPG binding.

8 years agocurl_version_info: add CURL_VERSION_HTTPS_PROXY
Okhin Vasilij [Fri, 25 Nov 2016 09:27:22 +0000 (16:27 +0700)]
curl_version_info: add CURL_VERSION_HTTPS_PROXY

Closes #1142

8 years agotests: Add some testcases for recent new features.
Frank Gevaerts [Fri, 25 Nov 2016 21:32:32 +0000 (22:32 +0100)]
tests: Add some testcases for recent new features.

Add missing tests for CURLINFO_SCHEME, CURLINFO_PROTOCOL, %{scheme},
and %{http_version}

closes #1143

8 years agocurl_easy_reset: clear info for CULRINFO_PROTOCOL and CURLINFO_SCHEME
Frank Gevaerts [Fri, 25 Nov 2016 21:33:59 +0000 (22:33 +0100)]
curl_easy_reset: clear info for CULRINFO_PROTOCOL and CURLINFO_SCHEME

8 years agoCURLOPT_PROXY_CAINFO.3: clarify proxy use
Daniel Stenberg [Fri, 25 Nov 2016 15:40:32 +0000 (16:40 +0100)]
CURLOPT_PROXY_CAINFO.3: clarify proxy use

8 years agoCURLOPT_PROXY_CRLFILE.3: clarify https proxy and availability
Daniel Stenberg [Fri, 25 Nov 2016 15:36:27 +0000 (16:36 +0100)]
CURLOPT_PROXY_CRLFILE.3: clarify https proxy and availability

8 years agocurl_easy_setopt.3: add CURLOPT_PROXY_PINNEDPUBLICKEY
Daniel Stenberg [Fri, 25 Nov 2016 13:17:22 +0000 (14:17 +0100)]
curl_easy_setopt.3: add CURLOPT_PROXY_PINNEDPUBLICKEY

Follow-up to 4f8b17743d7c55a

8 years agodocs: include all opts man pages in dist
Daniel Stenberg [Fri, 25 Nov 2016 10:14:58 +0000 (11:14 +0100)]
docs: include all opts man pages in dist

Sorted the lists too.

... and include the new ones in the PDF and HTML generation targets

8 years agoHTTPS Proxy: Implement CURLOPT_PROXY_PINNEDPUBLICKEY
Thomas Glanzmann [Fri, 25 Nov 2016 09:47:25 +0000 (10:47 +0100)]
HTTPS Proxy: Implement CURLOPT_PROXY_PINNEDPUBLICKEY

8 years agourl: proxy: Use 443 as default port for https proxies
Thomas Glanzmann [Thu, 24 Nov 2016 18:40:30 +0000 (19:40 +0100)]
url: proxy: Use 443 as default port for https proxies

8 years agoTODO: removed "HTTPS proxy"
Daniel Stenberg [Fri, 25 Nov 2016 08:52:22 +0000 (09:52 +0100)]
TODO: removed "HTTPS proxy"

8 years agowinbuild: add config option ENABLE_NGHTTP2
Jan-E [Fri, 25 Nov 2016 05:06:14 +0000 (06:06 +0100)]
winbuild: add config option ENABLE_NGHTTP2

Closes #1141

8 years agotool_urlglob: Improve sanity check in glob_range
Jay Satiro [Fri, 25 Nov 2016 03:25:14 +0000 (22:25 -0500)]
tool_urlglob: Improve sanity check in glob_range

Prior to this change we depended on errno if strtol could not perform a
conversion. POSIX says EINVAL *may* be set. Some implementations like
Microsoft's will not set it if there's no conversion.

Ref: https://github.com/curl/curl/commit/ee4f7660#commitcomment-19658189

8 years agotool_help: Change description for --retry-connrefused
Jay Satiro [Fri, 25 Nov 2016 03:15:14 +0000 (22:15 -0500)]
tool_help: Change description for --retry-connrefused

Ref: https://github.com/curl/curl/pull/1064#issuecomment-260052409

8 years agoos400: sync ILE/RPG binding
Patrick Monnerat [Fri, 25 Nov 2016 02:25:21 +0000 (03:25 +0100)]
os400: sync ILE/RPG binding

8 years agotest1135: Fix curl_easy_duphandle prototype for code style
Jay Satiro [Fri, 25 Nov 2016 00:50:16 +0000 (19:50 -0500)]
test1135: Fix curl_easy_duphandle prototype for code style

Follow-up to dbadaeb which changed the style.

8 years agox509asn1: Restore the parameter check in Curl_getASN1Element
Jay Satiro [Fri, 25 Nov 2016 00:43:20 +0000 (19:43 -0500)]
x509asn1: Restore the parameter check in Curl_getASN1Element

- Restore the removed parts of the parameter check.

Follow-up to 945f60e which altered the parameter check.

8 years agoRELEASE-NOTES: update option counters
Daniel Stenberg [Thu, 24 Nov 2016 23:47:52 +0000 (00:47 +0100)]
RELEASE-NOTES: update option counters

8 years agoadd CURLINFO_SCHEME, CURLINFO_PROTOCOL, and %{scheme}
Frank Gevaerts [Wed, 23 Nov 2016 09:44:18 +0000 (10:44 +0100)]
add CURLINFO_SCHEME, CURLINFO_PROTOCOL, and %{scheme}

Adds access to the effectively used protocol/scheme to both libcurl and
curl, both in string and numeric (CURLPROTO_*) form.

Note that the string form will be uppercase, as it is just the internal
string.

As these strings are declared internally as const, and all other strings
returned by curl_easy_getinfo() are de-facto const as well, string
handling in getinfo.c got const-ified.

Closes #1137

8 years agoRELEASE-NOTES: synced with 63198a4750aeb
Daniel Stenberg [Thu, 24 Nov 2016 23:31:48 +0000 (00:31 +0100)]
RELEASE-NOTES: synced with 63198a4750aeb

8 years agocurl.1: the new --proxy options ship in 7.52.0
Daniel Stenberg [Thu, 24 Nov 2016 23:14:39 +0000 (00:14 +0100)]
curl.1: the new --proxy options ship in 7.52.0

8 years agochecksrc: move open braces to comply with function declaration style
Daniel Stenberg [Wed, 23 Nov 2016 07:49:04 +0000 (08:49 +0100)]
checksrc: move open braces to comply with function declaration style

8 years agochecksrc: detect wrongly placed open braces in func declarations
Daniel Stenberg [Wed, 23 Nov 2016 07:48:42 +0000 (08:48 +0100)]
checksrc: detect wrongly placed open braces in func declarations

8 years agochecksrc: white space edits to comply to stricter checksrc
Daniel Stenberg [Wed, 23 Nov 2016 07:30:18 +0000 (08:30 +0100)]
checksrc: white space edits to comply to stricter checksrc

8 years agochecksrc: verify ASTERISKNOSPACE
Daniel Stenberg [Wed, 23 Nov 2016 07:29:42 +0000 (08:29 +0100)]
checksrc: verify ASTERISKNOSPACE

Detects (char*) and 'char*foo' uses.

8 years agochecksrc: code style: use 'char *name' style
Daniel Stenberg [Wed, 23 Nov 2016 06:53:24 +0000 (07:53 +0100)]
checksrc: code style: use 'char *name' style

8 years agochecksrc: add ASTERISKSPACE
Daniel Stenberg [Wed, 23 Nov 2016 06:52:38 +0000 (07:52 +0100)]
checksrc: add ASTERISKSPACE

Verifies a 'char *name' style, with no space after the asterisk.

8 years agoopenssl: remove dead code
Daniel Stenberg [Wed, 23 Nov 2016 22:11:38 +0000 (23:11 +0100)]
openssl: remove dead code

Coverity CID 1394666

8 years agoHTTPS-proxy: fixed mbedtls and polishing
Okhin Vasilij [Mon, 21 Nov 2016 10:01:25 +0000 (17:01 +0700)]
HTTPS-proxy: fixed mbedtls and polishing

8 years agodarwinssl: adopted to the HTTPS proxy changes
Daniel Stenberg [Fri, 18 Nov 2016 10:40:01 +0000 (11:40 +0100)]
darwinssl: adopted to the HTTPS proxy changes

It builds and runs all test cases. No adaptations for actual HTTPS proxy
support has been made.

8 years agogtls: fix indent to silence compiler warning
Daniel Stenberg [Fri, 18 Nov 2016 07:46:59 +0000 (08:46 +0100)]
gtls: fix indent to silence compiler warning

vtls/gtls.c: In function ‘Curl_gtls_data_pending’:
vtls/gtls.c:1429:3: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
   if(conn->proxy_ssl[connindex].session &&
      ^~
      vtls/gtls.c:1433:5: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
           return res;

8 years agombedtls: Fix compile errors
Thomas Glanzmann [Thu, 17 Nov 2016 12:17:26 +0000 (13:17 +0100)]
mbedtls: Fix compile errors

8 years agoproxy: Support HTTPS proxy and SOCKS+HTTP(s)
Alex Rousskov [Wed, 16 Nov 2016 17:49:15 +0000 (10:49 -0700)]
proxy: Support HTTPS proxy and SOCKS+HTTP(s)

* HTTPS proxies:

An HTTPS proxy receives all transactions over an SSL/TLS connection.
Once a secure connection with the proxy is established, the user agent
uses the proxy as usual, including sending CONNECT requests to instruct
the proxy to establish a [usually secure] TCP tunnel with an origin
server. HTTPS proxies protect nearly all aspects of user-proxy
communications as opposed to HTTP proxies that receive all requests
(including CONNECT requests) in vulnerable clear text.

With HTTPS proxies, it is possible to have two concurrent _nested_
SSL/TLS sessions: the "outer" one between the user agent and the proxy
and the "inner" one between the user agent and the origin server
(through the proxy). This change adds supports for such nested sessions
as well.

A secure connection with a proxy requires its own set of the usual SSL
options (their actual descriptions differ and need polishing, see TODO):

  --proxy-cacert FILE        CA certificate to verify peer against
  --proxy-capath DIR         CA directory to verify peer against
  --proxy-cert CERT[:PASSWD] Client certificate file and password
  --proxy-cert-type TYPE     Certificate file type (DER/PEM/ENG)
  --proxy-ciphers LIST       SSL ciphers to use
  --proxy-crlfile FILE       Get a CRL list in PEM format from the file
  --proxy-insecure           Allow connections to proxies with bad certs
  --proxy-key KEY            Private key file name
  --proxy-key-type TYPE      Private key file type (DER/PEM/ENG)
  --proxy-pass PASS          Pass phrase for the private key
  --proxy-ssl-allow-beast    Allow security flaw to improve interop
  --proxy-sslv2              Use SSLv2
  --proxy-sslv3              Use SSLv3
  --proxy-tlsv1              Use TLSv1
  --proxy-tlsuser USER       TLS username
  --proxy-tlspassword STRING TLS password
  --proxy-tlsauthtype STRING TLS authentication type (default SRP)

All --proxy-foo options are independent from their --foo counterparts,
except --proxy-crlfile which defaults to --crlfile and --proxy-capath
which defaults to --capath.

Curl now also supports %{proxy_ssl_verify_result} --write-out variable,
similar to the existing %{ssl_verify_result} variable.

Supported backends: OpenSSL, GnuTLS, and NSS.

* A SOCKS proxy + HTTP/HTTPS proxy combination:

If both --socks* and --proxy options are given, Curl first connects to
the SOCKS proxy and then connects (through SOCKS) to the HTTP or HTTPS
proxy.

TODO: Update documentation for the new APIs and --proxy-* options.
Look for "Added in 7.XXX" marks.

8 years agoDeclare endian read functions argument as a const pointer.
Patrick Monnerat [Thu, 24 Nov 2016 15:14:21 +0000 (16:14 +0100)]
Declare endian read functions argument as a const pointer.
This is done for all functions of the form Curl_read[136][624]_[lb]e.

8 years agoLimit ASN.1 structure sizes to 256K. Prevent some allocation size overflows.
Patrick Monnerat [Thu, 24 Nov 2016 13:28:39 +0000 (14:28 +0100)]
Limit ASN.1 structure sizes to 256K. Prevent some allocation size overflows.
See CRL-01-006.

8 years agourl: Fix conn reuse for local ports and interfaces
Jay Satiro [Tue, 22 Nov 2016 21:10:06 +0000 (16:10 -0500)]
url: Fix conn reuse for local ports and interfaces

- Fix connection reuse for when the proposed new conn 'needle' has a
specified local port but does not have a specified device interface.

Bug: https://curl.haxx.se/mail/lib-2016-11/0137.html
Reported-by: bjt3[at]hotmail.com
8 years agorand: pass in number of randoms as an unsigned argument
Daniel Stenberg [Mon, 21 Nov 2016 06:51:42 +0000 (07:51 +0100)]
rand: pass in number of randoms as an unsigned argument

8 years agorand: Fix potentially uninitialized result warning
Jay Satiro [Mon, 21 Nov 2016 04:57:47 +0000 (23:57 -0500)]
rand: Fix potentially uninitialized result warning

8 years agovtls: fix build warnings
Marcel Raad [Sat, 19 Nov 2016 13:09:03 +0000 (14:09 +0100)]
vtls: fix build warnings

Fix warnings about conversions from long to time_t in openssl.c and
schannel.c.

Follow-up to de4de4e3c7c

8 years agolib: fix compiler warnings after de4de4e3c7c
Marcel Raad [Fri, 18 Nov 2016 09:07:08 +0000 (10:07 +0100)]
lib: fix compiler warnings after de4de4e3c7c

Visual C++ now complains about implicitly casting time_t (64-bit) to
long (32-bit). Fix this by changing some variables from long to time_t,
or explicitly casting to long where the public interface would be
affected.

Closes #1131

8 years agoDon't mix unix domain sockets with regular ones
Isaac Boukris [Mon, 7 Nov 2016 19:25:44 +0000 (21:25 +0200)]
Don't mix unix domain sockets with regular ones

When reusing a connection, make sure the unix domain
socket option matches.

8 years agotests: Fix HTTP2-Settings header for huge window size
Jay Satiro [Thu, 17 Nov 2016 06:04:00 +0000 (01:04 -0500)]
tests: Fix HTTP2-Settings header for huge window size

Follow-up to a4d8888. Changing the window size in that commit resulted
in a different HTTP2-Settings upgrade header, causing test 1800 to fail.

8 years agohttp2: Use huge HTTP/2 windows
Jay Satiro [Wed, 16 Nov 2016 07:55:30 +0000 (02:55 -0500)]
http2: Use huge HTTP/2 windows

- Improve performance by using a huge HTTP/2 window size.

Bug: https://github.com/curl/curl/issues/1102
Reported-by: afrind@users.noreply.github.com
Assisted-by: Tatsuhiro Tsujikawa
8 years agocmdline-docs: more conversion
Daniel Stenberg [Wed, 16 Nov 2016 13:20:36 +0000 (14:20 +0100)]
cmdline-docs: more conversion

8 years agogen: support 'protos'
Daniel Stenberg [Wed, 16 Nov 2016 13:20:13 +0000 (14:20 +0100)]
gen: support 'protos'

and warn on unrecognized lines

8 years agogen: support 'single' to make an individual page man page
Daniel Stenberg [Wed, 16 Nov 2016 10:41:02 +0000 (11:41 +0100)]
gen: support 'single' to make an individual page man page

8 years agocmdline-docs: more options converted over
Daniel Stenberg [Tue, 15 Nov 2016 22:44:58 +0000 (23:44 +0100)]
cmdline-docs: more options converted over

8 years agogen: support 'redirect'
Daniel Stenberg [Wed, 16 Nov 2016 09:42:02 +0000 (10:42 +0100)]
gen: support 'redirect'

... and warn for too long --help lines

8 years agocmdline/gen: replace options in texts better
Daniel Stenberg [Tue, 15 Nov 2016 22:44:36 +0000 (23:44 +0100)]
cmdline/gen: replace options in texts better

8 years agohttp2: Fix address sanitizer memcpy warning
Jay Satiro [Wed, 16 Nov 2016 07:16:10 +0000 (02:16 -0500)]
http2: Fix address sanitizer memcpy warning

- In Curl_http2_switched don't call memcpy when src is NULL.

Curl_http2_switched can be called like:

Curl_http2_switched(conn, NULL, 0);

.. and prior to this change memcpy was then called like:

memcpy(dest, NULL, 0)

.. causing address sanitizer to warn:

http2.c:2057:3: runtime error: null pointer passed as argument 2, which
is declared to never be null

8 years agotool_help: Clarify --dump-header only writes received headers
Jay Satiro [Wed, 16 Nov 2016 06:52:01 +0000 (01:52 -0500)]
tool_help: Clarify --dump-header only writes received headers

8 years agocurl.1: Clarify --dump-header only writes received headers
Jay Satiro [Wed, 16 Nov 2016 06:40:23 +0000 (01:40 -0500)]
curl.1: Clarify --dump-header only writes received headers

8 years agodocs: Spelling fixes
Alex Chan [Tue, 15 Nov 2016 09:47:07 +0000 (09:47 +0000)]
docs: Spelling fixes

8 years agodocs: the next release will be 7.52.0
Kamil Dudka [Tue, 15 Nov 2016 11:21:00 +0000 (12:21 +0100)]
docs: the next release will be 7.52.0

8 years agocmdline-opts: support generating the --help output
Daniel Stenberg [Tue, 15 Nov 2016 08:08:50 +0000 (09:08 +0100)]
cmdline-opts: support generating the --help output

8 years agodarwinssl: fix SSL client certificate not found on MacOS Sierra
David Schweikert [Fri, 4 Nov 2016 14:18:16 +0000 (15:18 +0100)]
darwinssl: fix SSL client certificate not found on MacOS Sierra

Reviewed-by: Nick Zitzmann
Closes #1105

8 years agocurl: add --fail-early to help output
Daniel Stenberg [Tue, 15 Nov 2016 07:32:23 +0000 (08:32 +0100)]
curl: add --fail-early to help output

Fixes test 1139 failures

Follow-up to f82bbe01c8835

8 years agoglob: fix [a-c] globbing regression
Daniel Stenberg [Tue, 15 Nov 2016 07:22:54 +0000 (08:22 +0100)]
glob: fix [a-c] globbing regression

Brought in ee4f76606cf

Added test case 1280 to verify

Reported-by: Dave Reisner
Bug: https://github.com/curl/curl/commit/ee4f76606cfa4ee068bf28edd37c8dae7e8db317#commitcomment-19823146

8 years agocurl: add --fail-early
Daniel Stenberg [Sat, 12 Nov 2016 13:19:29 +0000 (14:19 +0100)]
curl: add --fail-early

Exit with an error on the first transfer error instead of continuing to
do the rest of the URLs.

Discussion: https://curl.haxx.se/mail/archive-2016-11/0038.html

8 years agoCurl_rand: fixed and moved to rand.c
Daniel Stenberg [Fri, 11 Nov 2016 13:53:36 +0000 (14:53 +0100)]
Curl_rand: fixed and moved to rand.c

Now Curl_rand() is made to fail if it cannot get the necessary random
level.

Changed the proto of Curl_rand() slightly to provide a number of ints at
once.

Moved out from vtls, since it isn't a TLS function and vtls provides
Curl_ssl_random() for this to use.

Discussion: https://curl.haxx.se/mail/lib-2016-11/0119.html

8 years agocmdline-opts: first test version of a new man page generator kit
Daniel Stenberg [Sun, 13 Nov 2016 22:40:12 +0000 (23:40 +0100)]
cmdline-opts: first test version of a new man page generator kit

See MANPAGE.md for the description of how this works. Each command line
option is now described in a separate .d file.

8 years agotime_t fix: follow-up to de4de4e3c7c
Daniel Stenberg [Sun, 13 Nov 2016 22:09:45 +0000 (23:09 +0100)]
time_t fix: follow-up to de4de4e3c7c

Blah, I accidentally wrote size_t instead of time_t for two variables.

Reported-by: Dave Reisner
8 years agotimeval: prefer time_t to hold seconds instead of long
Daniel Stenberg [Fri, 11 Nov 2016 09:19:22 +0000 (10:19 +0100)]
timeval: prefer time_t to hold seconds instead of long

... as long is still 32bit on modern 64bit windows machines, while
time_t is generally 64bit.

8 years agotests: fixed variable might be clobbered warning
Dan Fandrich [Sat, 12 Nov 2016 11:33:10 +0000 (12:33 +0100)]
tests: fixed variable might be clobbered warning

This stops the compiler from potentially making invalid assumptions
about the immutability of sdp and sap across the longjmp boundary.

8 years agoRELEASE-NOTES: synced with 346340808c
Daniel Stenberg [Fri, 11 Nov 2016 23:09:25 +0000 (00:09 +0100)]
RELEASE-NOTES: synced with 346340808c

8 years agoURL-parser: for file://[host]/ URLs, the [host] must be localhost
Daniel Stenberg [Fri, 11 Nov 2016 07:09:04 +0000 (08:09 +0100)]
URL-parser: for file://[host]/ URLs, the [host] must be localhost

Previously, the [host] part was just ignored which made libcurl accept
strange URLs misleading users. like "file://etc/passwd" which might've
looked like it refers to "/etc/passwd" but is just "/passwd" since the
"etc" is an ignored host name.

Reported-by: Mike Crowe
Assisted-by: Kamil Dudka
8 years agotest558: adapt to 0649433da
Daniel Stenberg [Fri, 11 Nov 2016 14:32:07 +0000 (15:32 +0100)]
test558: adapt to 0649433da

8 years agoopenssl: make sure to fail in the unlikely event that PRNG seeding fails
Daniel Stenberg [Fri, 11 Nov 2016 13:16:17 +0000 (14:16 +0100)]
openssl: make sure to fail in the unlikely event that PRNG seeding fails

8 years agoopenssl: avoid unnecessary seeding if already done
Daniel Stenberg [Fri, 11 Nov 2016 12:54:16 +0000 (13:54 +0100)]
openssl: avoid unnecessary seeding if already done

1.1.0+ does more of this by itself so we can avoid extra processing this
way.

8 years agoopenssl: RAND_status always exists in OpenSSL >= 0.9.7
Daniel Stenberg [Fri, 11 Nov 2016 12:37:01 +0000 (13:37 +0100)]
openssl: RAND_status always exists in OpenSSL >= 0.9.7

and remove RAND_screen from configure since nothing is using that
function

8 years agoCurl_pgrsUpdate: use dedicated function for time passed
Daniel Stenberg [Fri, 11 Nov 2016 10:02:02 +0000 (11:02 +0100)]
Curl_pgrsUpdate: use dedicated function for time passed

8 years agorealloc: use Curl_saferealloc to avoid common mistakes
Daniel Stenberg [Mon, 7 Nov 2016 09:55:25 +0000 (10:55 +0100)]
realloc: use Curl_saferealloc to avoid common mistakes

Discussed: https://curl.haxx.se/mail/lib-2016-11/0087.html

8 years agocurl: Add --retry-connrefused
Daniel Hwang [Sun, 9 Oct 2016 23:00:25 +0000 (16:00 -0700)]
curl: Add --retry-connrefused

to consider ECONNREFUSED as a transient error.

Closes #1064

8 years agoopenssl: raise the max_version to 1.3 if asked for
Daniel Stenberg [Thu, 10 Nov 2016 10:16:25 +0000 (11:16 +0100)]
openssl: raise the max_version to 1.3 if asked for

Now I've managed to negotiate TLS 1.3 with https://enabled.tls13.com/ when
using boringssl.

8 years agovtls: Fail on unrecognized param for CURLOPT_SSLVERSION
Jay Satiro [Tue, 8 Nov 2016 02:51:27 +0000 (21:51 -0500)]
vtls: Fail on unrecognized param for CURLOPT_SSLVERSION

- Fix GnuTLS code for CURL_SSLVERSION_TLSv1_2 that broke when the
TLS 1.3 support was added in 6ad3add.

- Homogenize across code for all backends the error message when TLS 1.3
is not available to "<backend>: TLS 1.3 is not yet supported".

- Return an error when a user-specified ssl version is unrecognized.

---

Prior to this change our code for some of the backends used the
'default' label in the switch statement (ie ver unrecognized) for
ssl.version and treated it the same as CURL_SSLVERSION_DEFAULT.

Bug: https://curl.haxx.se/mail/lib-2016-11/0048.html
Reported-by: Kamil Dudka
8 years agoSPNEGO: Fix memory leak when authentication fails
Isaac Boukris [Wed, 9 Nov 2016 13:37:34 +0000 (15:37 +0200)]
SPNEGO: Fix memory leak when authentication fails

If SPNEGO fails, cleanup the negotiate handle right away.

Fixes #1115

Signed-off-by: Isaac Boukris <iboukris@gmail.com>
Reported-by: ashman-p
8 years agoCODE_STYLE.md: link to INTERNALS.md correctly
Daniel Stenberg [Wed, 9 Nov 2016 08:56:13 +0000 (09:56 +0100)]
CODE_STYLE.md: link to INTERNALS.md correctly

8 years agobump: next version will be 7.52.0
Daniel Stenberg [Wed, 9 Nov 2016 08:15:58 +0000 (09:15 +0100)]
bump: next version will be 7.52.0

8 years agoRELEASE-NOTES: synced with dfcdaaba371e9a3
Daniel Stenberg [Wed, 9 Nov 2016 08:14:44 +0000 (09:14 +0100)]
RELEASE-NOTES: synced with dfcdaaba371e9a3

8 years agoexamples/fileupload.c: fclose the file as well
Daniel Stenberg [Tue, 8 Nov 2016 22:00:43 +0000 (23:00 +0100)]
examples/fileupload.c: fclose the file as well

8 years agoprintf: fix ".*f" handling
Daniel Stenberg [Tue, 8 Nov 2016 14:30:33 +0000 (15:30 +0100)]
printf: fix ".*f" handling

It would always use precision 1 instead of reading it from the argument
list as intended.

Reported-by: Ray Satiro
Bug: #1113

8 years agocurl_formadd.3: *_FILECONTENT and *_FILE need the file to be kept
Daniel Stenberg [Tue, 8 Nov 2016 14:28:04 +0000 (15:28 +0100)]
curl_formadd.3: *_FILECONTENT and *_FILE need the file to be kept

Reported-by: Frank Gevaerts
8 years agonss: silence warning 'SSL_NEXT_PROTO_EARLY_VALUE not handled in switch'
Kamil Dudka [Mon, 7 Nov 2016 14:27:36 +0000 (15:27 +0100)]
nss: silence warning 'SSL_NEXT_PROTO_EARLY_VALUE not handled in switch'

... with nss-3.26.0 and newer

Reported-by: Daniel Stenberg
8 years agoopenssl: initial TLS 1.3 adaptions
Daniel Stenberg [Mon, 7 Nov 2016 13:38:59 +0000 (14:38 +0100)]
openssl: initial TLS 1.3 adaptions

BoringSSL supports TLSv1.3 already, but these changes don't seem to be anough
to get it working.

8 years agossh: check md5 fingerprints case insensitively (regression)
Daniel Stenberg [Mon, 7 Nov 2016 11:54:40 +0000 (12:54 +0100)]
ssh: check md5 fingerprints case insensitively (regression)

Revert the change from ce8d09483eea but use the new function

Reported-by: Kamil Dudka
Bug: https://github.com/curl/curl/commit/ce8d09483eea2fcb1b50e323e1a8ed1f3613b2e3#commitcomment-19666146

8 years agocurl: introduce the --tlsv1.3 option to force TLS 1.3
Kamil Dudka [Thu, 27 Oct 2016 12:58:43 +0000 (14:58 +0200)]
curl: introduce the --tlsv1.3 option to force TLS 1.3

Fully implemented with the NSS backend only for now.

Reviewed-by: Ray Satiro