]> granicus.if.org Git - curl/log
curl
7 years agosendf: remove use of BUFSIZE from debug data conversions
Daniel Stenberg [Tue, 25 Apr 2017 13:19:19 +0000 (15:19 +0200)]
sendf: remove use of BUFSIZE from debug data conversions

The buffer can have other sizes.

7 years agobuffer: use data->set.buffer_size instead of BUFSIZE
Daniel Stenberg [Tue, 25 Apr 2017 12:38:34 +0000 (14:38 +0200)]
buffer: use data->set.buffer_size instead of BUFSIZE

... to properly use the dynamically set buffer size!

7 years agokrb5: use private buffer for temp string, not receive buffer
Daniel Stenberg [Tue, 25 Apr 2017 12:37:45 +0000 (14:37 +0200)]
krb5: use private buffer for temp string, not receive buffer

7 years agoupload: UPLOAD_BUFSIZE is now for the upload buffer
Daniel Stenberg [Tue, 25 Apr 2017 12:37:06 +0000 (14:37 +0200)]
upload: UPLOAD_BUFSIZE is now for the upload buffer

7 years agounit1606: do not print/access buffer
Daniel Stenberg [Tue, 25 Apr 2017 06:46:18 +0000 (08:46 +0200)]
unit1606: do not print/access buffer

It was a wrong assumption that it could do that!

7 years agohttp-proxy: use a dedicated CONNECT response buffer
Daniel Stenberg [Mon, 24 Apr 2017 23:03:17 +0000 (01:03 +0200)]
http-proxy: use a dedicated CONNECT response buffer

To make it suitably independent of the receive buffer and its flexible
size.

7 years agotransfer: fix minor buffer_size mistake
Daniel Stenberg [Mon, 24 Apr 2017 22:50:50 +0000 (00:50 +0200)]
transfer: fix minor buffer_size mistake

7 years agofailf: use private buffer, don't clobber receive buffer
Daniel Stenberg [Mon, 24 Apr 2017 22:50:21 +0000 (00:50 +0200)]
failf: use private buffer, don't clobber receive buffer

7 years agopingpong: use the set buffer size
Daniel Stenberg [Mon, 24 Apr 2017 22:50:04 +0000 (00:50 +0200)]
pingpong: use the set buffer size

7 years agohttp2: use the correct set buffer size
Daniel Stenberg [Mon, 24 Apr 2017 22:49:23 +0000 (00:49 +0200)]
http2: use the correct set buffer size

7 years agohttp: don't clobber the receive buffer for timecond
Daniel Stenberg [Mon, 24 Apr 2017 22:48:56 +0000 (00:48 +0200)]
http: don't clobber the receive buffer for timecond

7 years agobuffer_size: make sure it always has the correct size
Daniel Stenberg [Mon, 24 Apr 2017 22:16:10 +0000 (00:16 +0200)]
buffer_size: make sure it always has the correct size

Removes the need for CURL_BUFSIZE

7 years agofile: use private buffer for C-L output
Daniel Stenberg [Mon, 24 Apr 2017 22:15:28 +0000 (00:15 +0200)]
file: use private buffer for C-L output

... instead of clobbering the download buffer.

7 years agoCURLOPT_BUFFERSIZE: 1024 bytes is now the minimum size
Daniel Stenberg [Mon, 24 Apr 2017 22:09:22 +0000 (00:09 +0200)]
CURLOPT_BUFFERSIZE: 1024 bytes is now the minimum size

The buffer is needed to receive FTP, HTTP CONNECT responses etc so
already at this size things risk breaking and smaller is certainly not
wise.

7 years agoftp: use private buffer for temp storage, not receive buffer
Daniel Stenberg [Mon, 24 Apr 2017 14:05:46 +0000 (16:05 +0200)]
ftp: use private buffer for temp storage, not receive buffer

7 years agohttp: use private user:password output buffer
Daniel Stenberg [Mon, 24 Apr 2017 13:33:57 +0000 (15:33 +0200)]
http: use private user:password output buffer

Don't clobber the receive buffer.

7 years agoanyauthput: remove unused code
Marcel Raad [Mon, 1 May 2017 19:51:02 +0000 (21:51 +0200)]
anyauthput: remove unused code

The definition of TRUE was introduced in
4a728747e6f8845e500910e397dfc99aaf4a7984 and is not used anymore since
e664cd5826d43930fcc5b5dbaedbec94af33184b.
The usage of intptr_t was removed in
32e38b8f42477cf5ce3c3fef2fcc9db82f7fb7be.

7 years agotool: Fix missing prototype warnings for CURL_DOES_CONVERSIONS
Jay Satiro [Mon, 1 May 2017 18:10:43 +0000 (14:10 -0400)]
tool: Fix missing prototype warnings for CURL_DOES_CONVERSIONS

- Include tool_convert.h where needed.

Bug: https://github.com/curl/curl/issues/1460
Reported-by: Gisle Vanem
7 years agocurl_setup: Ensure no more than one IDN lib is enabled
Jay Satiro [Mon, 1 May 2017 17:44:39 +0000 (13:44 -0400)]
curl_setup: Ensure no more than one IDN lib is enabled

Prior to this change it was possible for libcurl to be built with both
Windows' native IDN lib (normaliz) and libidn2 enabled. It appears that
doesn't offer any benefit --and could cause a bug-- since libcurl's IDN
handling is written to use either one but not both.

Bug: https://github.com/curl/curl/issues/1441#issuecomment-297689856
Reported-by: Gisle Vanem
7 years agogetpart: use correct variable type
Marcel Raad [Mon, 1 May 2017 11:17:57 +0000 (13:17 +0200)]
getpart: use correct variable type

This fixes the following clang warning:
getpart.c:201:17: warning: cast from function call of type 'CURLcode'
to non-matching type 'int' [-Wbad-function-cast]

7 years agotests: declare TU-local variables static
Marcel Raad [Mon, 1 May 2017 10:55:09 +0000 (12:55 +0200)]
tests: declare TU-local variables static

This fixes missing-variable-declarations warnings when building with
clang.

7 years agotool_cb_prg: fix double-promotion warning
Marcel Raad [Mon, 1 May 2017 09:46:44 +0000 (11:46 +0200)]
tool_cb_prg: fix double-promotion warning

clang complains:
tool_cb_prg.c:86:22: error: implicit conversion increases
floating-point precision: 'float' to 'double'
[-Werror,-Wdouble-promotion]

Fix this by using a double instead of a float constant.

7 years agoexamples: fixed too long line and too long string warnings
Dan Fandrich [Mon, 1 May 2017 07:16:12 +0000 (09:16 +0200)]
examples: fixed too long line and too long string warnings

7 years agoexamples: declare TU-local variables static
Marcel Raad [Sun, 30 Apr 2017 21:29:31 +0000 (23:29 +0200)]
examples: declare TU-local variables static

This fixes missing-variable-declarations warnings when building with
clang.

7 years agohttp2: declare TU-local variables static
Marcel Raad [Sun, 30 Apr 2017 20:33:33 +0000 (22:33 +0200)]
http2: declare TU-local variables static

This fixes the following clang warnings:

http2.c:184:27: error: no previous extern declaration for non-static
variable 'Curl_handler_http2' [-Werror,-Wmissing-variable-declarations]
http2.c:204:27: error: no previous extern declaration for non-static
variable 'Curl_handler_http2_ssl'
[-Werror,-Wmissing-variable-declarations]

7 years agounit1604: fixed indentation
Dan Fandrich [Sun, 30 Apr 2017 13:21:54 +0000 (15:21 +0200)]
unit1604: fixed indentation

7 years agounit1604: fixed compilation under Windows, broken in the previous commit
Dan Fandrich [Sun, 30 Apr 2017 11:35:17 +0000 (13:35 +0200)]
unit1604: fixed compilation under Windows, broken in the previous commit

7 years agotests: fixed OOM handling of unit tests to abort test
Dan Fandrich [Sun, 30 Apr 2017 08:54:26 +0000 (10:54 +0200)]
tests: fixed OOM handling of unit tests to abort test

It's dangerous to continue to run the test when a memory alloc fails.

7 years agocurl_rtmp: fix missing-variable-declarations warnings
Marcel Raad [Sat, 29 Apr 2017 17:17:51 +0000 (19:17 +0200)]
curl_rtmp: fix missing-variable-declarations warnings

clang complains:

curl_rtmp.c:61:27: error: no previous extern declaration for non-static variable 'Curl_handler_rtmp' [-Werror,-Wmissing-variable-declarations]
curl_rtmp.c:81:27: error: no previous extern declaration for non-static variable 'Curl_handler_rtmpt' [-Werror,-Wmissing-variable-declarations]
curl_rtmp.c:101:27: error: no previous extern declaration for non-static variable 'Curl_handler_rtmpe' [-Werror,-Wmissing-variable-declarations]
curl_rtmp.c:121:27: error: no previous extern declaration for non-static variable 'Curl_handler_rtmpte' [-Werror,-Wmissing-variable-declarations]
curl_rtmp.c:141:27: error: no previous extern declaration for non-static variable 'Curl_handler_rtmps' [-Werror,-Wmissing-variable-declarations]
curl_rtmp.c:161:27: error: no previous extern declaration for non-static variable 'Curl_handler_rtmpts' [-Werror,-Wmissing-variable-declarations]

Fix this by including the header file.

7 years agourl: fixed a memory leak on OOM while setting CURLOPT_BUFFERSIZE
Dan Fandrich [Sat, 29 Apr 2017 16:52:51 +0000 (18:52 +0200)]
url: fixed a memory leak on OOM while setting CURLOPT_BUFFERSIZE

7 years agotests: added --remote-time tests for remaining protocols that support it
Dan Fandrich [Sat, 29 Apr 2017 08:16:06 +0000 (10:16 +0200)]
tests: added --remote-time tests for remaining protocols that support it

7 years agoruntests.pl: support multiline <postcheck> commands
Dan Fandrich [Sat, 29 Apr 2017 08:00:15 +0000 (10:00 +0200)]
runtests.pl: support multiline <postcheck> commands

7 years agotool_operate: use utimes instead of obsolescent utime when available
Dan Fandrich [Wed, 26 Apr 2017 23:24:07 +0000 (01:24 +0200)]
tool_operate: use utimes instead of obsolescent utime when available

7 years agotest1443: test --remote-time
Dan Fandrich [Thu, 27 Apr 2017 20:29:06 +0000 (22:29 +0200)]
test1443: test --remote-time

7 years agohttp-proxy: removed unused argument in CURL_DISABLE_PROXY case
Dan Fandrich [Thu, 27 Apr 2017 09:42:04 +0000 (11:42 +0200)]
http-proxy: removed unused argument in CURL_DISABLE_PROXY case

Missed in commit 55c3c02e

7 years agocookie_interface.c: changed the other domain to example.com too
Daniel Stenberg [Wed, 26 Apr 2017 22:30:34 +0000 (00:30 +0200)]
cookie_interface.c: changed the other domain to example.com too

7 years agocookie_interface.c: fix cookie domain so the example works
Daniel Stenberg [Wed, 26 Apr 2017 22:27:59 +0000 (00:27 +0200)]
cookie_interface.c: fix cookie domain so the example works

7 years agoMakefile: fix make dist
Dan Fandrich [Wed, 26 Apr 2017 21:02:42 +0000 (23:02 +0200)]
Makefile: fix make dist

Commit 80a87e8a broke 'make dist' as it can't handle installing from
absolute target names. Rearranged the dependencies so the absolute name
is used for building but the relative name is use for distributing.

7 years agolib: remove unused code
Marcel Raad [Tue, 25 Apr 2017 06:36:13 +0000 (08:36 +0200)]
lib: remove unused code

This fixes the following clang warnings:
macro is not used [-Wunused-macros]
will never be executed [-Wunreachable-code]

Closes https://github.com/curl/curl/pull/1448

7 years agohttp-proxy: remove unused argument from Curl_proxyCONNECT()
Daniel Stenberg [Tue, 25 Apr 2017 22:34:22 +0000 (00:34 +0200)]
http-proxy: remove unused argument from Curl_proxyCONNECT()

7 years agourl: declare get_protocol_family() static
Martin Kepplinger [Tue, 25 Apr 2017 21:55:57 +0000 (23:55 +0200)]
url: declare get_protocol_family() static

get_protocol_family() is not defined static even though there is a
static local forward declaration. Let's simply make the definition match
it's declaration.

Bug: https://curl.haxx.se/mail/lib-2017-04/0127.html

7 years agoexamples: ftpuploadfrommem.c
Daniel Stenberg [Tue, 25 Apr 2017 13:58:51 +0000 (15:58 +0200)]
examples: ftpuploadfrommem.c

Uploads data to an FTP site, directly from memory.

Closes #1451

7 years agonss: load libnssckbi.so if no other trust is specified
Kamil Dudka [Mon, 10 Apr 2017 15:40:30 +0000 (17:40 +0200)]
nss: load libnssckbi.so if no other trust is specified

The module contains a more comprehensive set of trust information than
supported by nss-pem, because libnssckbi.so also includes information
about distrusted certificates.

Reviewed-by: Kai Engert
Closes #1414

7 years agonss: factorize out nss_{un,}load_module to separate fncs
Kamil Dudka [Mon, 10 Apr 2017 15:05:05 +0000 (17:05 +0200)]
nss: factorize out nss_{un,}load_module to separate fncs

No change of behavior is intended by this commit.

7 years agonss: do not leak PKCS #11 slot while loading a key
Kamil Dudka [Mon, 24 Apr 2017 13:01:04 +0000 (15:01 +0200)]
nss: do not leak PKCS #11 slot while loading a key

It could prevent nss-pem from being unloaded later on.

Bug: https://bugzilla.redhat.com/1444860

7 years agotypecheck-gcc: fix _curl_is_slist_info
Marcel Raad [Mon, 24 Apr 2017 15:56:19 +0000 (17:56 +0200)]
typecheck-gcc: fix _curl_is_slist_info

Info values starting with CURLINFO_SOCKET expect a curl_socket_t, not a
curl_slist argument.

This fixes the following GCC warning when building the examples with
--enable-optimize:

../../include/curl/typecheck-gcc.h:126:42: warning: call to
‘_curl_easy_getinfo_err_curl_slist’ declared with attribute warning:
curl_easy_getinfo expects a pointer to 'struct curl_slist *' for this
info [enabled by default]
sendrecv.c:90:11: note: in expansion of macro ‘curl_easy_getinfo’
res = curl_easy_getinfo(curl, CURLINFO_ACTIVESOCKET, &sockfd);

Closes https://github.com/curl/curl/pull/1447

7 years agocurl: set a 100K buffer size by default
Daniel Stenberg [Mon, 24 Apr 2017 10:03:08 +0000 (12:03 +0200)]
curl: set a 100K buffer size by default

Test command 'time curl http://localhost/80GB -so /dev/null' on a Debian
Linux.

Before (middle performing run out 9):

 real    0m28.078s
 user    0m11.240s
 sys     0m12.876s

After (middle performing run out 9)

 real    0m26.356s (93.9%)
 user    0m5.324s  (47.4%)
 sys     0m8.368s  (65.0%)

Also, doing SFTP over a 200 millsecond latency link is now about 6 times
faster.

Closes #1446

7 years agotransfer: remove 'uploadbuf' pointer and cleanup readwrite_upload()
Daniel Stenberg [Tue, 25 Apr 2017 08:49:53 +0000 (10:49 +0200)]
transfer: remove 'uploadbuf' pointer and cleanup readwrite_upload()

The data->req.uploadbuf struct member served no good purpose, instead we
use ->state.uploadbuffer directly. It makes it clearer in the code which
buffer that's being used.

Removed the 'SingleRequest *' argument from the readwrite_upload() proto
as it can be derived from the Curl_easy struct. Also made the code in
the readwrite_upload() function use the 'k->' shortcut to all references
to struct fields in 'data->req', which previously was made with a mix of
both.

7 years agoconfigure: stop prepending to LDFLAGS, CPPFLAGS
Jay Satiro [Mon, 24 Apr 2017 07:13:28 +0000 (03:13 -0400)]
configure: stop prepending to LDFLAGS, CPPFLAGS

- Change prepends to appends because user's LDFLAGS and CPPFLAGS should
  always come first so they're searched before ours.

Bug: https://github.com/curl/curl/issues/1420
Reported-by: Helmut K. C. Tessarek
7 years agoif2ip: fix -Wcast-align warning
Marcel Raad [Tue, 25 Apr 2017 07:19:59 +0000 (09:19 +0200)]
if2ip: fix -Wcast-align warning

Follow-up to 119037325de02579f5c58256ca2ed2a0aa592c86, which fixed the
warning in the HAVE_GETIFADDRS block, but not in the
HAVE_IOCTL_SIOCGIFADDR block.

7 years agoMakefile: avoid use of GNU-specific form of $<
Dan Fandrich [Sun, 23 Apr 2017 07:49:59 +0000 (09:49 +0200)]
Makefile: avoid use of GNU-specific form of $<

$< is only allowed in implicit rules in some non-GNU makes (e.g. BSD,
AIX) so avoid use elsewhere by referencing the dependent curl.1 file
directly instead. This is somewhat tricky because the file is supplied
in the packaged tar ball (but not in git) but must still be able to be
rebuilt when its dependencies change. The right thing must happen in
both tar ball and git source trees, as well as in both in-tree and
out-of-tree builds.

7 years agonss: adapt to the new Curl_llist API
Kamil Dudka [Mon, 24 Apr 2017 15:25:00 +0000 (17:25 +0200)]
nss: adapt to the new Curl_llist API

This commit fixes compilation failure caused by
cbae73e1dd95946597ea74ccb580c30f78e3fa73.

7 years agocurl-compilers.m4: accept -Og and -Ofast GCC flags
Marcel Raad [Sat, 22 Apr 2017 21:12:07 +0000 (23:12 +0200)]
curl-compilers.m4: accept -Og and -Ofast GCC flags

-Og, introduced in GCC 4.8, optimizes for debugging experience.
-Ofast, introduced in GCC 4.7, builds on -O3 and enables further
optimizations breaking strict standards compliance.
When specified in CFLAGS, these were always overridden by -O0 or -O2.
Fix this by adding them to flags_opt_all.

Ref: https://gcc.gnu.org/onlinedocs/gcc-4.8.0/gcc/Optimize-Options.html
Ref: https://github.com/curl/curl/pull/1404#issuecomment-296401570
Closes https://github.com/curl/curl/pull/1440

7 years agoRELEASE-NOTES: synced with c68fed875
Daniel Stenberg [Mon, 24 Apr 2017 08:09:31 +0000 (10:09 +0200)]
RELEASE-NOTES: synced with c68fed875

7 years agoconfigure: fix the -ldl check for openssl, add -lpthread check
Daniel Stenberg [Tue, 18 Apr 2017 11:36:23 +0000 (13:36 +0200)]
configure: fix the -ldl check for openssl, add -lpthread check

The check for if -ldl is needed to build with (a statically built)
openssl was broken. This repairs the check, and adds a check for
-lpthread as well since OpenSSL 1.1.0+ does in fact require -lpthread so
only adding -ldl for a static openssl build is no longer enough.

Reported-by: Jay Satiro
Ref: #1426
Closes #1427

7 years agollist: fix a comment after cbae73e1dd9
Daniel Stenberg [Sun, 23 Apr 2017 22:54:04 +0000 (00:54 +0200)]
llist: fix a comment after cbae73e1dd9

Pointed-it-by: Kevin Ji
URL: https://github.com/curl/curl/commit/cbae73e1dd95946597ea74ccb580c30f78e3fa73#commitcomment-21872622

7 years agoschannel: Don't treat encrypted partial record as pending data
Jay Satiro [Thu, 6 Apr 2017 07:27:28 +0000 (03:27 -0400)]
schannel: Don't treat encrypted partial record as pending data

- Track when the cached encrypted data contains only a partial record
  that can't be decrypted without more data (SEC_E_INCOMPLETE_MESSAGE).

- Change Curl_schannel_data_pending to return false in such a case.

Other SSL libraries have pending data functions that behave similarly.

Ref: https://github.com/curl/curl/pull/1387

Closes https://github.com/curl/curl/pull/1392

7 years agomulti: clarify condition in curl_multi_wait
Alan Jenkins [Sat, 22 Apr 2017 20:16:44 +0000 (21:16 +0100)]
multi: clarify condition in curl_multi_wait

`if(nfds || extra_nfds) {` is followed by `malloc(nfds * ...)`.

If `extra_fs` could be non-zero when `nfds` was zero, then we have
`malloc(0)` which is allowed to return `NULL`. But, malloc returning
NULL can be confusing. In this code, the next line would treat the NULL
as an allocation failure.

It turns out, if `nfds` is zero then `extra_nfds` must also be zero.
The final value of `nfds` includes `extra_nfds`.  So the test for
`extra_nfds` is redundant.  It can only confuse the reader.

Closes #1439

7 years agolib: fix maybe-uninitialized warnings
Marcel Raad [Sat, 22 Apr 2017 20:12:37 +0000 (22:12 +0200)]
lib: fix maybe-uninitialized warnings

With -Og, GCC complains:

easy.c:628:7: error: ‘mcode’ may be used uninitialized in this function [-Werror=maybe-uninitialized]

../lib/strcase.h:35:29: error: ‘tok_buf’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
vauth/digest.c:208:9: note: ‘tok_buf’ was declared here

../lib/strcase.h:35:29: error: ‘tok_buf’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
vauth/digest.c:566:15: note: ‘tok_buf’ was declared here

Fix this by initializing the variables.

7 years agognutls: removed some code when --disable-verbose is configured
Dan Fandrich [Sat, 22 Apr 2017 10:07:13 +0000 (12:07 +0200)]
gnutls: removed some code when --disable-verbose is configured

This reduces the binary size and fixes a compile warning.

7 years agollist: no longer uses malloc
Daniel Stenberg [Thu, 20 Apr 2017 13:10:04 +0000 (15:10 +0200)]
llist: no longer uses malloc

The 'list element' struct now has to be within the data that is being
added to the list. Removes 16.6% (tiny) mallocs from a simple HTTP
transfer. (96 => 80)

Also removed return codes since the llist functions can't fail now.

Test 1300 updated accordingly.

Closes #1435

7 years agotypecheck-gcc: handle function pointers properly
Marcel Raad [Mon, 10 Apr 2017 13:24:44 +0000 (15:24 +0200)]
typecheck-gcc: handle function pointers properly

All the callbacks passed to curl_easy_setopt are defined as function
pointers. The possibility to pass both functions and function pointers
was handled for the callbacks that typecheck-gcc.h defined as
compatible, but not for the public callback types themselves.

This makes all compatible callback types defined in typecheck-gcc.h
function pointers too and checks all functions uniformly with
_curl_callback_compatible, which handles both functions and function
pointers.

A symptom of the problem was a warning in tool_operate.c with
--disable-libcurl-option and without --enable-debug as that file
passes the callback functions to curl_easy_setopt directly.

Fixes https://github.com/curl/curl/issues/1403
Closes https://github.com/curl/curl/pull/1404

7 years agombedtls: enable NTLM (& SMB) even if MD4 support is unavailable
Dan Fandrich [Fri, 21 Apr 2017 20:33:17 +0000 (22:33 +0200)]
mbedtls: enable NTLM (& SMB) even if MD4 support is unavailable

In that case, use libcurl's internal MD4 routine. This fixes tests 1013
and 1014 which were failing due to configure assuming NTLM and SMB were
always available whenever mbed TLS was in use (which is now true).

7 years agotests: remove the html and PDF versions from the tarball
Daniel Stenberg [Fri, 21 Apr 2017 14:26:53 +0000 (16:26 +0200)]
tests: remove the html and PDF versions from the tarball

7 years agoopenssl: fix memory leak in servercert
Daniel Stenberg [Thu, 20 Apr 2017 13:46:03 +0000 (15:46 +0200)]
openssl: fix memory leak in servercert

... when failing to get the server certificate.

7 years agoRevert "src/Makefile.am: avoid explicit $<"
Daniel Stenberg [Thu, 20 Apr 2017 07:16:12 +0000 (09:16 +0200)]
Revert "src/Makefile.am: avoid explicit $<"

This reverts commit 5b4cbcf11d5100ff793a8e9edbaa6fe1fc7495f5.

Since it broke out-of-tree builds from tarballs. See discussion in #1432

7 years agobump: start working on next release
Daniel Stenberg [Wed, 19 Apr 2017 21:16:10 +0000 (23:16 +0200)]
bump: start working on next release

7 years agosrc/Makefile.am: avoid explicit $<
Daniel Stenberg [Wed, 19 Apr 2017 21:11:44 +0000 (23:11 +0200)]
src/Makefile.am: avoid explicit $<

... since apparently "BSD make" doesn't support it.

Reported-by: Thomas Klausner
Fixes #1432

7 years agoTHANKS: add contributors from 7.54.0 release notes curl-7_54_0
Daniel Stenberg [Tue, 18 Apr 2017 07:16:56 +0000 (09:16 +0200)]
THANKS: add contributors from 7.54.0 release notes

7 years agoRELEASE-NOTES: curl 7.54.0
Daniel Stenberg [Tue, 18 Apr 2017 06:41:23 +0000 (08:41 +0200)]
RELEASE-NOTES: curl 7.54.0

7 years agonss: fix MinGW compiler warnings
Marcel Raad [Thu, 6 Apr 2017 17:52:39 +0000 (19:52 +0200)]
nss: fix MinGW compiler warnings

This fixes 3 warnings issued by MinGW:
1. PR_ImportTCPSocket actually has a paramter of type PROsfd instead of
PRInt32, which is 64 bits on Windows. Fixed this by including the
corresponding header file instead of redeclaring the function, which is
supported even though it is in the private include folder. [1]
2. In 64-bit mode, size_t is 64 bits while CK_ULONG is 32 bits, so an explicit
narrowing cast is needed.
3. Curl_timeleft returns time_t instead of long since commit
21aa32d30dbf319f2d336e0cb68d3a3235869fbb.

[1] https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_ImportTCPSocket

Closes https://github.com/curl/curl/pull/1393

7 years agoTLS: Fix switching off SSL session id when client cert is used
Jay Satiro [Wed, 22 Mar 2017 05:59:49 +0000 (01:59 -0400)]
TLS: Fix switching off SSL session id when client cert is used

Move the sessionid flag to ssl_primary_config so that ssl and proxy_ssl
will each have their own sessionid flag.

Regression since HTTPS-Proxy support was added in cb4e2be. Prior to that
this issue had been fixed in 247d890, CVE-2016-5419.

Bug: https://github.com/curl/curl/issues/1341
Reported-by: lijian996@users.noreply.github.com
The new incarnation of this bug is called CVE-2017-7468 and is documented
here: https://curl.haxx.se/docs/adv_20170419.html

7 years agoopenssl: don't try to print nonexistant peer private keys
David Benjamin [Mon, 17 Apr 2017 14:20:26 +0000 (10:20 -0400)]
openssl: don't try to print nonexistant peer private keys

X.509 certificates carry public keys, not private keys. Fields
corresponding to the private half of the key will always be NULL.

Closes #1425

7 years agoopenssl: fix thread-safety bugs in error-handling
David Benjamin [Mon, 17 Apr 2017 14:01:40 +0000 (10:01 -0400)]
openssl: fix thread-safety bugs in error-handling

ERR_error_string with NULL parameter is not thread-safe. The library
writes the string into some static buffer. Two threads doing this at
once may clobber each other and run into problems. Switch to
ERR_error_string_n which avoids this problem and is explicitly
bounds-checked.

Also clean up some remnants of OpenSSL 0.9.5 around here. A number of
comments (fixed buffer size, explaining that ERR_error_string_n was
added in a particular version) date to when ossl_strerror tried to
support pre-ERR_error_string_n OpenSSLs.

Closes #1424

7 years agoopenssl: make SSL_ERROR_to_str more future-proof
David Benjamin [Mon, 17 Apr 2017 13:42:03 +0000 (09:42 -0400)]
openssl: make SSL_ERROR_to_str more future-proof

Rather than making assumptions about the values, use a switch-case.

Closes #1424

7 years agocode: fix typos and style in comments
Daniel Gustafsson [Mon, 17 Apr 2017 09:04:48 +0000 (11:04 +0200)]
code: fix typos and style in comments

A few random typos, and minor whitespace cleanups, found in comments
while reading code.

Closes #1423

7 years agoextern-scan.pl: strip trailing CR
Marcel Raad [Sun, 16 Apr 2017 12:58:08 +0000 (14:58 +0200)]
extern-scan.pl: strip trailing CR

This makes test 1135 pass with CRLF checkouts.

Ref: https://github.com/curl/curl/pull/1344#issuecomment-289243166
Closes https://github.com/curl/curl/pull/1422

7 years agoconfigure.ac: ignore CR after version numbers
Marcel Raad [Sat, 15 Apr 2017 06:32:23 +0000 (08:32 +0200)]
configure.ac: ignore CR after version numbers

Ignore everything after the version numbers in LIBCURL_VERSION and
LIBCURL_VERSION_NUM to ged rid of the extra CR character.
This makes tests 1022 and 1023 pass on Linux with a CRLF checkout.

Ref: https://github.com/curl/curl/pull/1344#issuecomment-289243166
Closes https://github.com/curl/curl/pull/1422

7 years ago.gitattributes: force shell scripts to LF
Marcel Raad [Fri, 14 Apr 2017 22:10:27 +0000 (00:10 +0200)]
.gitattributes: force shell scripts to LF

Bash on Linux errors out on CR characters.
This makes tests 1221 and 1222 pass on Linux with a CRLF checkout.

Ref: https://github.com/curl/curl/pull/1344#issuecomment-289243166
Closes https://github.com/curl/curl/pull/1422

7 years agounit1303: fix compiler warning
Marcel Raad [Sun, 16 Apr 2017 11:54:21 +0000 (13:54 +0200)]
unit1303: fix compiler warning

MinGW-w64 complains:
warning: conversion to 'long int' from 'time_t {aka long long int}' may
alter its value [-Wconversion]
Fix this by using the correct type.

7 years agoRELEASE-NOTES: synced with 1451271e0
Daniel Stenberg [Sun, 16 Apr 2017 08:37:18 +0000 (10:37 +0200)]
RELEASE-NOTES: synced with 1451271e0

7 years agohttp2: fix handle leak in error path
Larry Stefani [Thu, 13 Apr 2017 14:06:14 +0000 (10:06 -0400)]
http2: fix handle leak in error path

Add missing newhandle free call in push_promise().

Closes #1416

7 years agombedtls: fix memory leak in error path
Larry Stefani [Thu, 13 Apr 2017 14:10:42 +0000 (10:10 -0400)]
mbedtls: fix memory leak in error path

Add missing our_ssl_sessionid free call in mbed_connect_step3().

Closes #1417

7 years agocurl-compilers.m4: turn implicit function declarations into errors
Marcel Raad [Fri, 14 Apr 2017 10:48:27 +0000 (12:48 +0200)]
curl-compilers.m4: turn implicit function declarations into errors

This adds -Werror-implicit-function-declaration for GCC 2.95+ so that
these errors are visible at the point where they occur instead of only
at link time.
Implicit function declarations are illegal in C99 and C++ anyway, and
the same warning has been turned into an error for ICC in commit
3072c5b8a127057aa922b7c51051bbb4a630b091.

Ref: https://gcc.gnu.org/onlinedocs/gcc-2.95.2/gcc_2.html#SEC8
Ref: https://curl.haxx.se/mail/lib-2017-04/0001.html
Closes https://github.com/curl/curl/pull/1419

7 years agotest1541: also test for CURL_PULL_WS2TCPIP_H
Marcel Raad [Wed, 12 Apr 2017 06:32:24 +0000 (08:32 +0200)]
test1541: also test for CURL_PULL_WS2TCPIP_H

Ref: https://github.com/curl/curl/issues/1408
Closes https://github.com/curl/curl/pull/1412

7 years agotests/server/util: prefer <poll.h> over <sys/poll.h>
Marcel Raad [Wed, 12 Apr 2017 06:45:54 +0000 (08:45 +0200)]
tests/server/util: prefer <poll.h> over <sys/poll.h>

Follow-up to aa573c3c55cda72ec5ef677d87f6f46a53385f0c

Ref: https://github.com/curl/curl/pull/1406

7 years agoCurl_expire_latest: ignore already expired timers
Daniel Stenberg [Mon, 10 Apr 2017 21:53:33 +0000 (23:53 +0200)]
Curl_expire_latest: ignore already expired timers

If the existing timer is still in there but has expired, the new timer
should be added.

Reported-by: Rainer Canavan
Bug: https://curl.haxx.se/mail/lib-2017-04/0030.html
Closes #1407

7 years agosystem.h: fix mingw section
Daniel Stenberg [Tue, 11 Apr 2017 11:45:56 +0000 (13:45 +0200)]
system.h: fix mingw section

Reported-by: Marcel Raad
Fixes #1408
Closes #1409

7 years agopolarssl: unbreak build with versions < 1.3.8
Marcel Raad [Tue, 11 Apr 2017 10:55:23 +0000 (12:55 +0200)]
polarssl: unbreak build with versions < 1.3.8

ssl_session_init was only introduced in version 1.3.8, the penultimate
version. The function only contains a memset, so replace it with that.

Suggested-by: Jay Satiro
Fixes https://github.com/curl/curl/issues/1401

7 years agopoll: prefer <poll.h> over <sys/poll.h>
Marcel Raad [Mon, 10 Apr 2017 19:59:42 +0000 (21:59 +0200)]
poll: prefer <poll.h> over <sys/poll.h>

The POSIX standard location is <poll.h>. Using <sys/poll.h> results in
warning spam when using the musl standard library.

Closes https://github.com/curl/curl/pull/1406

7 years agoopenssl: fix this statement may fall through [-Wimplicit-fallthrough=]
Alexis La Goutte [Mon, 10 Apr 2017 10:59:30 +0000 (12:59 +0200)]
openssl: fix this statement may fall through [-Wimplicit-fallthrough=]

Closes #1402

7 years agonss: load CA certificates even with --insecure
Kamil Dudka [Mon, 6 Mar 2017 15:20:33 +0000 (16:20 +0100)]
nss: load CA certificates even with --insecure

... because they may include an intermediate certificate for a client
certificate and the intermediate certificate needs to be presented to
the server, no matter if we verify the peer or not.

Reported-by: thraidh
Closes #851

7 years agoRELEASE-NOTES: synced with f9d1e9a27f7e1
Daniel Stenberg [Mon, 10 Apr 2017 08:24:12 +0000 (10:24 +0200)]
RELEASE-NOTES: synced with f9d1e9a27f7e1

7 years agolibcurl-thread.3: fixed a bad macro that caused test 1140 to fail
Dan Fandrich [Mon, 10 Apr 2017 05:42:22 +0000 (07:42 +0200)]
libcurl-thread.3: fixed a bad macro that caused test 1140 to fail

7 years agolibcurl-thread.3: also mention threaded-resolver
Daniel Stenberg [Sun, 9 Apr 2017 21:09:50 +0000 (23:09 +0200)]
libcurl-thread.3: also mention threaded-resolver

Reported-by: Alex Bligh
Bug: https://curl.haxx.se/mail/lib-2017-04/0044.html

7 years ago.github/stale.yml: enable the stale bot
Daniel Stenberg [Fri, 7 Apr 2017 09:43:06 +0000 (11:43 +0200)]
.github/stale.yml: enable the stale bot

Issues and PRs with no activity for 180 days will get marked as stale,
and if no further activity happens within 14 more days, the issue gets
closed.

This follows our established policy of not letting stalled bugs "get in
the way": https://curl.haxx.se/docs/bugs.html#Closing_off_stalled_bugs

Closes #1398

7 years agoCURLINFO_SCHEME.3: fix variable type
Jay Satiro [Sat, 8 Apr 2017 19:44:39 +0000 (15:44 -0400)]
CURLINFO_SCHEME.3: fix variable type

- Change documented param type to char ** from incorrect long *.

7 years agoINSTALL.md: fix secure transport configure arguments
Marcel Raad [Sat, 8 Apr 2017 12:44:18 +0000 (14:44 +0200)]
INSTALL.md: fix secure transport configure arguments

--without-ssl is needed instead of --with-winssl.

7 years agovtls: fix unreferenced variable warnings
Marcel Raad [Sat, 8 Apr 2017 11:40:41 +0000 (13:40 +0200)]
vtls: fix unreferenced variable warnings

... by moving the variables into the correct #ifdef block.

7 years agoBUGS: "Bugs in old versions"
Daniel Stenberg [Fri, 7 Apr 2017 11:33:08 +0000 (13:33 +0200)]
BUGS: "Bugs in old versions"