]> granicus.if.org Git - curl/log
curl
7 years agoTODO: update the TOC too
Daniel Stenberg [Sat, 17 Jun 2017 22:30:16 +0000 (00:30 +0200)]
TODO: update the TOC too

7 years agoTODO: implement support for CURLOPT_PREQUOTE with SFTP
Daniel Stenberg [Sat, 17 Jun 2017 22:25:09 +0000 (00:25 +0200)]
TODO: implement support for CURLOPT_PREQUOTE with SFTP

... also updated the CURLOPT_PREQUOTE.3 man page to mention the correct
protocol support.

Closes #1514

7 years agotool_wrte_cb: remove check for config == NULL
Daniel Stenberg [Sat, 17 Jun 2017 21:58:03 +0000 (23:58 +0200)]
tool_wrte_cb: remove check for config == NULL

... as it really cannot have reached this far with config being NULL,
thus this is unnecesary and misleading.

Bug: https://news.ycombinator.com/item?id=14577585 and
https://daniel.haxx.se/blog/2017/06/17/curl-doesnt-spew-binary-anymore/comment-page-1/#comment-18356

Forwarded-to-us-by: Jakub Wilk
7 years agocurl: prevent binary output spewed to terminal
Daniel Stenberg [Fri, 16 Jun 2017 09:30:36 +0000 (11:30 +0200)]
curl: prevent binary output spewed to terminal

... unless "--output -" is used. Binary detection is done by simply
checking for a binary zero in early data.

Added test 1425 1426 to verify.

Closes #1512

7 years agoMakefile.m32: enable -W for MinGW32 build
Marcel Raad [Wed, 14 Jun 2017 21:22:26 +0000 (23:22 +0200)]
Makefile.m32: enable -W for MinGW32 build

The configure-based build also has this in addition to -Wall.

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

7 years agocurl-compilers.m4: enable comma clang warning
Marcel Raad [Fri, 16 Jun 2017 12:13:41 +0000 (14:13 +0200)]
curl-compilers.m4: enable comma clang warning

It usually warns when using commas instead of semicolons or other
operators by accident.

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

7 years agocurl-compilers.m4: enable missing-variable-declarations clang warning
Marcel Raad [Fri, 16 Jun 2017 12:08:28 +0000 (14:08 +0200)]
curl-compilers.m4: enable missing-variable-declarations clang warning

It usually warns when forgetting to declare TU-local variables static.

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

7 years agocurl-compilers.m4: enable double-promotion warning
Marcel Raad [Fri, 16 Jun 2017 12:06:23 +0000 (14:06 +0200)]
curl-compilers.m4: enable double-promotion warning

Enable -Wdouble-promotion for both GCC and clang. It warns on implicit
promotion from float to double.

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

7 years agocurl-compilers.m4: enable vla warning for clang
Marcel Raad [Wed, 14 Jun 2017 16:18:41 +0000 (18:18 +0200)]
curl-compilers.m4: enable vla warning for clang

Previously, that warning was only implicitly active in C90 mode.
Enable it unconditionally as already done for GCC.

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

7 years agohttp-proxy: fix chunked-encoded CONNECT responses
Daniel Stenberg [Fri, 16 Jun 2017 15:30:39 +0000 (17:30 +0200)]
http-proxy: fix chunked-encoded CONNECT responses

Regression since 5113ad0424.

... and remove 'flaky' from test 1061 again

Closes #1579

7 years agohttp-proxy: deal with EAGAIN
Daniel Stenberg [Fri, 16 Jun 2017 15:20:43 +0000 (17:20 +0200)]
http-proxy: deal with EAGAIN

... the previous code would reset the header length wrongly (since
5113ad0424). This makes test 1060 reliable again.

Also: make sws send even smaller chunks of data to increase the
likeliness of this happening.

7 years agolibtest/libntlmconnect: fix compiler warnings from f94fcdb
Daniel Stenberg [Fri, 16 Jun 2017 10:18:18 +0000 (12:18 +0200)]
libtest/libntlmconnect: fix compiler warnings from f94fcdb

7 years agoHTTPS-Proxy: don't offer h2 for https proxy connections
Jay Satiro [Tue, 14 Mar 2017 07:03:46 +0000 (03:03 -0400)]
HTTPS-Proxy: don't offer h2 for https proxy connections

Bug: https://github.com/curl/curl/issues/1254

Closes #1546

7 years agotests: stabilize test 2032 and 2033
Daniel Stenberg [Thu, 15 Jun 2017 21:47:42 +0000 (23:47 +0200)]
tests: stabilize test 2032 and 2033

Both these tests run the same underlying test code: libntlmconnect.c -
this test code made some assumptions about socket ordering when it used
curl_easy_fdset() and when we changed timing or got accidental changes
in libcurl the tests would fail.

The tests verify that the different transfers keep using the same
connections, which I now instead made sure by adding the number of bytes
each transfer gets and then verifies that they always get the same
amount as when these tests worked.

Closes #1576

7 years agotest1148: verify the -# progressbar
Daniel Stenberg [Tue, 13 Jun 2017 21:07:42 +0000 (23:07 +0200)]
test1148: verify the -# progressbar

Closes #1569

7 years agotest1061: mark as flaky
Daniel Stenberg [Fri, 16 Jun 2017 07:16:28 +0000 (09:16 +0200)]
test1061: mark as flaky

Fails intermittently on travis builds since a few days. Likely due to
5113ad0424.

7 years agourl: refactor the check for Windows drive letter in path
Jay Satiro [Wed, 14 Jun 2017 01:42:59 +0000 (21:42 -0400)]
url: refactor the check for Windows drive letter in path

- Move the logic to detect a Windows drive letter prefix
  (eg c: in c:foo) into a function-like macro.

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

7 years agomk-ca-bundle.pl: Check curl's exit code after certdata download
Jay Satiro [Fri, 16 Jun 2017 05:58:23 +0000 (01:58 -0400)]
mk-ca-bundle.pl: Check curl's exit code after certdata download

- No longer allow partial downloads of certdata.

Prior to this change partial downloads were (erroneously?) allowed since
only the server code was checked to be 200.

Bug: https://github.com/curl/curl/pull/1577
Reported-by: Matteo B.
7 years agodist: add the fuzz dir to the tarball
Daniel Stenberg [Thu, 15 Jun 2017 22:16:57 +0000 (00:16 +0200)]
dist: add the fuzz dir to the tarball

7 years agoconfigure: disable nghttp2 too if HTTP has been disabled
Daniel Stenberg [Thu, 15 Jun 2017 22:02:36 +0000 (00:02 +0200)]
configure: disable nghttp2 too if HTTP has been disabled

7 years agohttp-proxy: fix build with --disable-proxy or --disable-http
Daniel Stenberg [Thu, 15 Jun 2017 21:57:31 +0000 (23:57 +0200)]
http-proxy: fix build with --disable-proxy or --disable-http

Reported-by: Dan Fandrich
7 years agofuzz/README: document how to build
Daniel Stenberg [Thu, 15 Jun 2017 15:08:59 +0000 (17:08 +0200)]
fuzz/README: document how to build

Fixes #1476

7 years agofuzz: corpora file structure, initial commit
Frederik B [Tue, 9 May 2017 18:07:45 +0000 (20:07 +0200)]
fuzz: corpora file structure, initial commit

7 years agofuzz: bring oss-fuzz initial code converted to C89
Frederik B [Tue, 9 May 2017 18:07:28 +0000 (20:07 +0200)]
fuzz: bring oss-fuzz initial code converted to C89

7 years agohttp-proxy: only attempt FTP over HTTP proxy
Daniel Stenberg [Thu, 15 Jun 2017 11:45:57 +0000 (13:45 +0200)]
http-proxy: only attempt FTP over HTTP proxy

... all other non-HTTP protocol schemes are now defaulting to "tunnel
trough" mode if a HTTP proxy is specified. In reality there are no HTTP
proxies out there that allow those other schemes.

Assisted-by: Ray Satiro, Michael Kaufmann
Closes #1505

7 years agoTODO: the generated include file is gone
Daniel Stenberg [Thu, 15 Jun 2017 11:30:57 +0000 (13:30 +0200)]
TODO: the generated include file is gone

... since commit 73a2fcea0b

7 years agocurl_setup.h: error out on CURL_WANTS_CA_BUNDLE_ENV use
Daniel Stenberg [Thu, 15 Jun 2017 09:11:15 +0000 (11:11 +0200)]
curl_setup.h: error out on CURL_WANTS_CA_BUNDLE_ENV use

... to make it really apparent if there's any user using this on purpose.

Suggested-by: Jay Satiro
Closes #1542

7 years agolib/curl_setup.h: remove CURL_WANTS_CA_BUNDLE_ENV
Daniel Stenberg [Thu, 15 Jun 2017 09:11:15 +0000 (11:11 +0200)]
lib/curl_setup.h: remove CURL_WANTS_CA_BUNDLE_ENV

When this define was set, libcurl would check the environment variable
named CURL_CA_BUNDLE at run-time and use that CA cert bundle. This
feature was only defined by the watcom and m32 makefiles and caused
inconsistent behaviours among libcurls built on different platforms.

The curl tool does already feature its own similar logic and the library
does not really need it, and it isn't documented libcurl behavior. So
this change removes it.

Ref: #1538

7 years agotest1147: verify -H on a file
Daniel Stenberg [Thu, 15 Jun 2017 09:08:31 +0000 (11:08 +0200)]
test1147: verify -H on a file

7 years agocurl: allow --header and --proxy-header read from file
Daniel Stenberg [Thu, 15 Jun 2017 09:08:31 +0000 (11:08 +0200)]
curl: allow --header and --proxy-header read from file

So many headers can be provided as @filename.

Suggested-by: Timothe Litt
Closes #1486

7 years agoRELEASE-NOTES: synced with 2ad80eec5
Daniel Stenberg [Thu, 15 Jun 2017 08:49:20 +0000 (10:49 +0200)]
RELEASE-NOTES: synced with 2ad80eec5

7 years agocurl/curlver.h: start working on 7.55.0
Daniel Stenberg [Thu, 15 Jun 2017 08:49:02 +0000 (10:49 +0200)]
curl/curlver.h: start working on 7.55.0

7 years agohttp-proxy: do the HTTP CONNECT process entirely non-blocking
Daniel Stenberg [Wed, 7 Jun 2017 21:02:26 +0000 (23:02 +0200)]
http-proxy: do the HTTP CONNECT process entirely non-blocking

Mentioned as a problem since 2007 (8f87c15bdac63) and of course it
existed even before that.

Closes #1547

7 years agoprogress: let "current speed" be UL + DL speeds combined
Daniel Stenberg [Fri, 9 Jun 2017 09:16:18 +0000 (11:16 +0200)]
progress: let "current speed" be UL + DL speeds combined

Bug #1556
Reported-by: Paul Harris
Closes #1559

7 years agosystem.h: fix MinGW build
Marcel Raad [Wed, 14 Jun 2017 19:49:47 +0000 (21:49 +0200)]
system.h: fix MinGW build

CURLSYS_PULL_WS2TCPIP_H got renamed to CURL_PULL_WS2TCPIP_H in commit
73a2fcea0b4adea6ba342cd7ed1149782c214ae3.

7 years agotimers: store internal time stamps as time_t instead of doubles
Daniel Stenberg [Wed, 7 Jun 2017 11:16:56 +0000 (13:16 +0200)]
timers: store internal time stamps as time_t instead of doubles

This gives us accurate precision and it allows us to avoid storing "no
time" for systems with too low timer resolution as we then bump the time
up to 1 microsecond. Should fix test 573 on windows.

Remove the now unused curlx_tvdiff_secs() function.

Maintains the external getinfo() API with using doubles.

Fixes #1531

7 years agodist: make the hugehelp.c not get regenerated unnecessarily
Daniel Stenberg [Tue, 13 Jun 2017 20:03:37 +0000 (22:03 +0200)]
dist: make the hugehelp.c not get regenerated unnecessarily

The maketgz script now makes sure the generated hugehelp.c file in the
tarball is newer than the generated curl.1 man page, so that it doesn't
have to get unnecessarily rebuilt first thing in a typical build. It
thus also removes the need for perl to build off a plain release
tarball.

Fixes #1565

7 years agoincludes: remove curl/curlbuild.h and curl/curlrules.h
Daniel Stenberg [Mon, 22 May 2017 07:05:10 +0000 (09:05 +0200)]
includes: remove curl/curlbuild.h and curl/curlrules.h

Rely entirely on curl/system.h now.

Introduced in Aug 2008 with commit 14240e9e109f. Now gone.

Fixes #1456

7 years agorelease: 7.54.1 curl-7_54_1
Daniel Stenberg [Tue, 13 Jun 2017 07:44:50 +0000 (09:44 +0200)]
release: 7.54.1

7 years agomk-lib1521.pl: updated to match the test changes in 916ec30a
Dan Fandrich [Tue, 13 Jun 2017 20:03:35 +0000 (22:03 +0200)]
mk-lib1521.pl: updated to match the test changes in 916ec30a

7 years agolibressl: OCSP and intermediate certs workaround no longer needed
Stuart Henderson [Tue, 13 Jun 2017 10:06:03 +0000 (12:06 +0200)]
libressl: OCSP and intermediate certs workaround no longer needed

lib/vtls/openssl.c has a workaround for a bug with OCSP responses signed
by intermediate certs, this was fixed in LibreSSL in
https://github.com/libressl-portable/openbsd/commit/912c64f68f7ac4f225b7d1fdc8fbd43168912ba0

Bug: https://curl.haxx.se/mail/lib-2017-06/0038.html

7 years agourl: fix buffer overwrite with file protocol (CVE-2017-9502)
Daniel Stenberg [Tue, 6 Jun 2017 22:21:04 +0000 (00:21 +0200)]
url: fix buffer overwrite with file protocol (CVE-2017-9502)

Bug: https://github.com/curl/curl/issues/1540
Advisory: https://curl.haxx.se/docs/adv_20170614.html

Assisted-by: Ray Satiro
Reported-by: Marcel Raad
7 years agourlglob: fix division by zero
Daniel Stenberg [Sat, 10 Jun 2017 12:35:07 +0000 (14:35 +0200)]
urlglob: fix division by zero

The multiply() function that is used to avoid integer overflows, was
itself reason for a possible division by zero error when passed a
specially formatted glob.

Reported-by: GwanYeong Kim
7 years agoconfigure: update the copyright year in the output
Daniel Stenberg [Mon, 12 Jun 2017 06:42:11 +0000 (08:42 +0200)]
configure: update the copyright year in the output

7 years agoBINDINGS: update SP-Forth and OCaml urls
ygrek [Sun, 11 Jun 2017 19:59:18 +0000 (12:59 -0700)]
BINDINGS: update SP-Forth and OCaml urls

7 years agoFindWin32CACert: Use a temporary buffer on the stack
Michael Kaufmann [Tue, 6 Jun 2017 20:15:17 +0000 (22:15 +0200)]
FindWin32CACert: Use a temporary buffer on the stack

Don't malloc() the temporary buffer, and use the correct type:
SearchPath() works with TCHAR, but SearchPathA() works with char.
Set the buffer size to MAX_PATH, because the terminating null byte
is already included in MAX_PATH.

Reviewed-by: Daniel Stenberg
Reviewed-by: Marcel Raad
Closes #1548

7 years agotest1521: fixed OOM handling
Dan Fandrich [Sun, 11 Jun 2017 09:49:31 +0000 (11:49 +0200)]
test1521: fixed OOM handling

7 years agoRELEASE-PROCEDURE: updated future release dates
Daniel Stenberg [Fri, 9 Jun 2017 13:58:51 +0000 (15:58 +0200)]
RELEASE-PROCEDURE: updated future release dates

7 years agogitignore: ignore all vim swap files
Paul Harris [Fri, 9 Jun 2017 02:30:39 +0000 (10:30 +0800)]
gitignore: ignore all vim swap files

Closes #1561

7 years agolib1521: fix compiler warnings on the use of bad 'long' values
Daniel Stenberg [Thu, 8 Jun 2017 23:02:12 +0000 (01:02 +0200)]
lib1521: fix compiler warnings on the use of bad 'long' values

Reported-by: Marcel Raad
Bug: https://github.com/curl/curl/commit/cccac4fb2b20d6ed87da7978408c3ecacc464fe4#commitcomment-22453387

7 years agosetopt: check CURLOPT_ADDRESS_SCOPE option range
Daniel Stenberg [Thu, 8 Jun 2017 23:00:23 +0000 (01:00 +0200)]
setopt: check CURLOPT_ADDRESS_SCOPE option range

... and return error instead of triggering an assert() when being way
out of range.

7 years agocmake: Fix inconsistency regarding mbed TLS include directory
TheAssassin [Sun, 4 Jun 2017 23:02:56 +0000 (01:02 +0200)]
cmake: Fix inconsistency regarding mbed TLS include directory

Previously, one had to set MBEDTLS_INCLUDE_DIR to make CMake find the
headers, but the system complained that mbed TLS wasn't found due to
MBEDTLS_INCLUDE_DIRS (note the trailing s) was not set. This commit
attempts to fix that.

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

7 years agoexamples/multi-uv.c: fix deprecated symbol
Ryuichi KAWAMATA [Thu, 8 Jun 2017 14:17:59 +0000 (23:17 +0900)]
examples/multi-uv.c: fix deprecated symbol

Closes #1557

7 years agoasyn-ares: s/Curl_expire_latest/Curl_expire
Daniel Stenberg [Thu, 8 Jun 2017 09:06:19 +0000 (11:06 +0200)]
asyn-ares: s/Curl_expire_latest/Curl_expire

7 years agoexpire: remove Curl_expire_latest()
Daniel Stenberg [Thu, 8 Jun 2017 06:34:32 +0000 (08:34 +0200)]
expire: remove Curl_expire_latest()

With the introduction of expire IDs and the fact that existing timers
can be removed now and thus never expire, the concept with adding a
"latest" timer is not working anymore as it risks to not expire at all.

So, to be certain the timers actually are in line and will expire, the
plain Curl_expire() needs to be used. The _latest() function was added
as a sort of shortcut in the past that's quite simply not necessary
anymore.

Follow-up to 31b39c40cf90

Reported-by: Paul Harris
Closes #1555

7 years agoconfigure: fix link with librtmp when specifying path
Chris Carlmar [Wed, 7 Jun 2017 21:34:24 +0000 (23:34 +0200)]
configure: fix link with librtmp when specifying path

Bug: https://curl.haxx.se/mail/lib-2017-06/0017.html

7 years agofile: make speedcheck use current time for checks
Daniel Stenberg [Wed, 7 Jun 2017 11:29:46 +0000 (13:29 +0200)]
file: make speedcheck use current time for checks

... as it would previously just get the "now" timestamp before the
transfer starts and then not update it again.

Closes #1550

7 years agometalink: remove unused printf() argument
Daniel Stenberg [Wed, 7 Jun 2017 12:00:23 +0000 (14:00 +0200)]
metalink: remove unused printf() argument

7 years agotravis: let some builds *not* use --enable-debug
Daniel Stenberg [Tue, 6 Jun 2017 12:40:36 +0000 (14:40 +0200)]
travis: let some builds *not* use --enable-debug

typecheck-gcc and other things require optimized builds

Closes #1544

7 years agoREADME.md: show the coverall coverage on github
Daniel Stenberg [Tue, 6 Jun 2017 12:40:36 +0000 (14:40 +0200)]
README.md: show the coverall coverage on github

7 years agolib1521: fix compiler warnings
Daniel Stenberg [Mon, 5 Jun 2017 22:21:12 +0000 (00:21 +0200)]
lib1521: fix compiler warnings

7 years agotest1521: make the code < 80 columns wide
Daniel Stenberg [Mon, 5 Jun 2017 13:21:26 +0000 (15:21 +0200)]
test1521: make the code < 80 columns wide

7 years agotest1121: use stricter types to work with typcheck-gcc
Daniel Stenberg [Mon, 5 Jun 2017 12:56:32 +0000 (14:56 +0200)]
test1121: use stricter types to work with typcheck-gcc

7 years agotypecheck-gcc: allow CURLOPT_STDERR to be NULL too
Daniel Stenberg [Mon, 5 Jun 2017 12:56:13 +0000 (14:56 +0200)]
typecheck-gcc: allow CURLOPT_STDERR to be NULL too

7 years agotest1521: test *all* curl_easy_setopt options
Daniel Stenberg [Mon, 5 Jun 2017 09:57:47 +0000 (11:57 +0200)]
test1521: test *all* curl_easy_setopt options

mk-lib1521.pl generates a test program (lib1521.c) that calls
curl_easy_setopt() for every known option with a few typical values to
make sure they work (ignoring the return codes).

Some small changes were necessary to avoid asserts and NULL accesses
when doing this.

The perl script needs to be manually rerun when we add new options.

Closes #1543

7 years agotest1538: added "verbose logs" keyword
Dan Fandrich [Mon, 5 Jun 2017 09:26:39 +0000 (11:26 +0200)]
test1538: added "verbose logs" keyword

These error messages are not displayed with --disable-verbose

7 years agotest1262: verify ftp download with -z for "if older than this"
Daniel Stenberg [Mon, 5 Jun 2017 08:33:51 +0000 (10:33 +0200)]
test1262: verify ftp download with -z for "if older than this"

7 years agocurl_ntlm_core: use Curl_raw_toupper instead of toupper
Marcel Raad [Sun, 4 Jun 2017 22:27:29 +0000 (00:27 +0200)]
curl_ntlm_core: use Curl_raw_toupper instead of toupper

This was the only remaining use of toupper in the entire source code.

Suggested-by: Daniel Stenberg
7 years agoRELEASE-NOTES: synced with 65ba92650
Daniel Stenberg [Sun, 4 Jun 2017 21:26:41 +0000 (23:26 +0200)]
RELEASE-NOTES: synced with 65ba92650

7 years agocurl_ntlm_core: pass unsigned char to toupper
Marcel Raad [Sun, 4 Jun 2017 14:46:03 +0000 (16:46 +0200)]
curl_ntlm_core: pass unsigned char to toupper

Otherwise, clang on Cygwin64 warns:
curl_ntlm_core.c:525:35: error: array subscript is of type 'char'
[-Werror,-Wchar-subscripts]
    dest[2 * i] = (unsigned char)(toupper(src[i]));
                                  ^~~~~~~~~~~~~~~
/usr/include/ctype.h:152:25: note: expanded from macro 'toupper'
      (void) __CTYPE_PTR[__x]; (toupper) (__x);})
                        ^~~~

7 years agoBINDINGS: add Ring binding
Mahmoud Samir Fayed [Sun, 4 Jun 2017 03:32:43 +0000 (06:32 +0300)]
BINDINGS: add Ring binding

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

7 years agoCONTRIBUTE.md: mention tests done on pull requests
Daniel Stenberg [Sat, 3 Jun 2017 22:19:57 +0000 (00:19 +0200)]
CONTRIBUTE.md: mention tests done on pull requests

7 years agotravis: add coverage, distcheck and cmake builds
Daniel Stenberg [Sat, 3 Jun 2017 21:27:13 +0000 (23:27 +0200)]
travis: add coverage, distcheck and cmake builds

Closes #1534

7 years agolibtest: fix int-in-bool-context warnings
Marcel Raad [Sat, 3 Jun 2017 18:18:34 +0000 (20:18 +0200)]
libtest: fix int-in-bool-context warnings

GCC 7 complained:
‘*’ in boolean context, suggest ‘&&’ instead [-Wint-in-bool-context]

7 years agolibtest: fix implicit-fallthrough warnings with GCC 7
Marcel Raad [Sat, 3 Jun 2017 18:12:23 +0000 (20:12 +0200)]
libtest: fix implicit-fallthrough warnings with GCC 7

7 years agox509asn1: fix implicit-fallthrough warning with GCC 7
Marcel Raad [Sat, 3 Jun 2017 18:10:52 +0000 (20:10 +0200)]
x509asn1: fix implicit-fallthrough warning with GCC 7

7 years agocurl_sasl: fix unused-variable warning
Marcel Raad [Sat, 3 Jun 2017 09:59:38 +0000 (11:59 +0200)]
curl_sasl: fix unused-variable warning

This fixes the following warning with CURL_DISABLE_CRYPTO_AUTH,
as seen in the autobuilds:

curl_sasl.c:417:9: warning: unused variable 'serverdata'
[-Wunused-variable]

7 years agoupdatemanpages.pl: error out on too old git version
Daniel Stenberg [Fri, 2 Jun 2017 22:45:02 +0000 (00:45 +0200)]
updatemanpages.pl: error out on too old git version

7 years agocyassl: define build macros before including ssl.h
Marcel Raad [Fri, 2 Jun 2017 21:02:54 +0000 (23:02 +0200)]
cyassl: define build macros before including ssl.h

cyassl/ssl.h needs the macros from cyassl/options.h, so define them
before including cyassl/ssl.h the first time, which happens in
urldata.h.
This broke the build on Ubuntu Xenial, which comes with WolfSSL 3.4.8
and therefore redefines the symbols from cyassl/options.h instead of
including the header.

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

7 years agotool_util: remove unused tvdiff_secs and remove tool_ prefix
Daniel Stenberg [Fri, 2 Jun 2017 12:13:02 +0000 (14:13 +0200)]
tool_util: remove unused tvdiff_secs and remove tool_ prefix

Closes #1532

7 years agodedotdot: fixed output for ".." and "." only input
Daniel Stenberg [Fri, 2 Jun 2017 15:50:45 +0000 (17:50 +0200)]
dedotdot: fixed output for ".." and "." only input

Found when updating test 1395, which I did to increase test coverage of
this source file...

Closes #1535

7 years agombedtls: make TU-local variable static
Marcel Raad [Fri, 2 Jun 2017 20:05:01 +0000 (22:05 +0200)]
mbedtls: make TU-local variable static

mbedtls_x509_crt_profile_fr is only used locally.
This fixes a missing-variable-declarations warning with clang.

7 years agoMD(4|5): silence cast-align clang warning
Marcel Raad [Fri, 2 Jun 2017 19:58:48 +0000 (21:58 +0200)]
MD(4|5): silence cast-align clang warning

Unaligned access is on purpose here and the warning is harmless on
affected architectures. GCC knows that, while clang warns on all
architectures.

7 years agotest1538: fix typo
Daniel Stenberg [Fri, 2 Jun 2017 13:52:59 +0000 (15:52 +0200)]
test1538: fix typo

7 years agotest1538: verify the libcurl strerror API calls
Daniel Stenberg [Fri, 2 Jun 2017 11:52:55 +0000 (13:52 +0200)]
test1538: verify the libcurl strerror API calls

7 years agocurl_endian: remove unused functions
Daniel Stenberg [Fri, 2 Jun 2017 06:32:36 +0000 (08:32 +0200)]
curl_endian: remove unused functions

Closes #1529

7 years agotest1537: dedicated tests of the URL (un)escape API calls
Daniel Stenberg [Fri, 2 Jun 2017 11:16:13 +0000 (13:16 +0200)]
test1537: dedicated tests of the URL (un)escape API calls

Closes #1530

7 years agocoverage: run event tests too
Daniel Stenberg [Fri, 2 Jun 2017 07:25:02 +0000 (09:25 +0200)]
coverage: run event tests too

... the torture ones are commented out only because they are slooooow.

7 years agobuild: provide easy code coverage measuring
Daniel Stenberg [Thu, 1 Jun 2017 22:59:35 +0000 (00:59 +0200)]
build: provide easy code coverage measuring

Closes #1528

7 years agotypecheck-gcc.h: check CURLINFO_CERTINFO
Daniel Stenberg [Thu, 1 Jun 2017 13:03:30 +0000 (15:03 +0200)]
typecheck-gcc.h: check CURLINFO_CERTINFO

... and update the certinfo.c example accordingly.

Fixes https://github.com/curl/curl/issues/846

7 years agotypecheck-gcc.h: check CURLINFO_TLS_SSL_PTR and CURLINFO_TLS_SESSION
Daniel Stenberg [Thu, 1 Jun 2017 12:55:05 +0000 (14:55 +0200)]
typecheck-gcc.h: check CURLINFO_TLS_SSL_PTR and CURLINFO_TLS_SESSION

... so that they get the required "struct curl_tlssessioninfo **"
arguments.

7 years agotypecheck-gcc.h: separate getinfo slist checks from other pointers
Daniel Stenberg [Thu, 1 Jun 2017 12:47:18 +0000 (14:47 +0200)]
typecheck-gcc.h: separate getinfo slist checks from other pointers

Fixes #1524

7 years agocurl-compilers.m4: escape square brackets in regex
Marcel Raad [Thu, 1 Jun 2017 15:46:32 +0000 (17:46 +0200)]
curl-compilers.m4: escape square brackets in regex

Otherwise, they are removed in the final configure file.
Also changed sed to "$SED" like in most other calls in this file.

7 years agocurl-compilers.m4: fix compiler_num for clang
Marcel Raad [Wed, 31 May 2017 20:21:42 +0000 (22:21 +0200)]
curl-compilers.m4: fix compiler_num for clang

"clang -dumpversion" always returns "4.2.1", the GCC version that clang
was initially compatible to. Use "clang -v" instead, which returns the
actual clang version.

Fixes https://github.com/curl/curl/issues/1522
Closes https://github.com/curl/curl/pull/1523

7 years agoexamples/externalsocket.c: s/closesocket/closecb
Daniel Stenberg [Wed, 31 May 2017 21:22:46 +0000 (23:22 +0200)]
examples/externalsocket.c: s/closesocket/closecb

... since closesocket is a function in WinSock.

Reported-by: Marcel Raad
Bug: https://github.com/curl/curl/commit/55fcb8485914700132fd1854c9509b66c955efbe#co
mmitcomment-22347818

7 years agolib583: fix compiler warning
Marcel Raad [Wed, 31 May 2017 17:05:50 +0000 (19:05 +0200)]
lib583: fix compiler warning

Use CURLMcode for variable 'res' and cast to int where necessary
instead of the other way around. Other tests do the same.

This fixes the following clang warning:
lib583.c:68:15: warning: cast from function call of type 'CURLMcode' to
non-matching type 'int' [-Wbad-function-cast]

7 years agoCURLOPT_SSH_KEY*.3: typos
Daniel Stenberg [Wed, 31 May 2017 11:52:03 +0000 (13:52 +0200)]
CURLOPT_SSH_KEY*.3: typos

Reported-by: Gisle Vanem
7 years agoCURLOPT_STREAM_DEPENDS.3: typo
Daniel Stenberg [Wed, 31 May 2017 11:39:56 +0000 (13:39 +0200)]
CURLOPT_STREAM_DEPENDS.3: typo

7 years agoCURLOPT_FNMATCH_FUNCTION.3: also modified example to avoid fcpp issues
Daniel Stenberg [Wed, 31 May 2017 11:36:51 +0000 (13:36 +0200)]
CURLOPT_FNMATCH_FUNCTION.3: also modified example to avoid fcpp issues

7 years agoCURLOPT_FNMATCH_DATA.3: modified example to avoid fcpp issues
Daniel Stenberg [Wed, 31 May 2017 11:30:04 +0000 (13:30 +0200)]
CURLOPT_FNMATCH_DATA.3: modified example to avoid fcpp issues