]> granicus.if.org Git - curl/log
curl
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

7 years agoopts: more than 100 more examples for man pages...
Daniel Stenberg [Wed, 31 May 2017 09:56:28 +0000 (11:56 +0200)]
opts: more than 100 more examples for man pages...

7 years agolibtest/lib574.c: use correct callback proto
Daniel Stenberg [Wed, 31 May 2017 07:55:44 +0000 (09:55 +0200)]
libtest/lib574.c: use correct callback proto

7 years agoexamples/sampleconv.c: indent changes, made callbacks static
Daniel Stenberg [Wed, 31 May 2017 07:32:04 +0000 (09:32 +0200)]
examples/sampleconv.c: indent changes, made callbacks static

7 years agoexample/externalsocket.c: make it use CLOSESOCKETFUNCTION too
Daniel Stenberg [Wed, 31 May 2017 07:26:51 +0000 (09:26 +0200)]
example/externalsocket.c: make it use CLOSESOCKETFUNCTION too

7 years agocurl-compilers.m4: enable -Wshift-sign-overflow for clang
Marcel Raad [Tue, 30 May 2017 08:07:47 +0000 (10:07 +0200)]
curl-compilers.m4: enable -Wshift-sign-overflow for clang

clang 2.9+ supports -Wshift-sign-overflow, which warns about undefined
behavior on signed left shifts when shifting by too many places.

Ref: https://github.com/curl/curl/issues/1516
Closes https://github.com/curl/curl/pull/1517

7 years agoCURLOPT_PROXY.3: fix test 1140 breakage
Daniel Stenberg [Wed, 31 May 2017 06:45:36 +0000 (08:45 +0200)]
CURLOPT_PROXY.3: fix test 1140 breakage

7 years agobuild-wolfssl: Sync config with wolfSSL 3.11
Jay Satiro [Wed, 31 May 2017 05:40:39 +0000 (01:40 -0400)]
build-wolfssl: Sync config with wolfSSL 3.11

wolfSSL configure script relevant changes from 3.10 to 3.11:

- Async threading support added; disabled by default without async
  crypto, which continues to be disabled by default.

wolfSSL configure script relevant changes from 3.11 to 3.11.1 (beta):

- TLS 1.3 beta support added; disabled by default.

For experimenting I put in a comment block the defines needed to enable
TLS 1.3 support (ie the equivalent of --enable-tls13).

7 years agoopts: more examples added to man pages
Daniel Stenberg [Tue, 30 May 2017 21:35:30 +0000 (23:35 +0200)]
opts: more examples added to man pages

7 years agodocs: clarify NO_PROXY further
Daniel Stenberg [Tue, 30 May 2017 20:43:34 +0000 (22:43 +0200)]
docs: clarify NO_PROXY further

Fixes #1208

7 years agoCURLOPT_PROXY.3: describe the environment variables more
Daniel Stenberg [Tue, 30 May 2017 16:05:33 +0000 (18:05 +0200)]
CURLOPT_PROXY.3: describe the environment variables more

7 years agotransfer: init the infilesize from the postfields...
Daniel Stenberg [Mon, 29 May 2017 22:45:54 +0000 (00:45 +0200)]
transfer: init the infilesize from the postfields...

... with a strlen() if no size was set, and do this in the pretransfer
function so that the info is set early. Otherwise, the default strlen()
done on the POSTFIELDS data never sets state.infilesize.

Reported-by: Vincas Razma
Bug: #1294

7 years agotest557: fix ubsan runtime error due to int left shift
Jay Satiro [Mon, 29 May 2017 22:04:53 +0000 (18:04 -0400)]
test557: fix ubsan runtime error due to int left shift

- Test curl_msnprintf negative int width arg using INT_MIN instead of
  1 << 31 which is undefined behavior.

Closes https://github.com/curl/curl/issues/1516

7 years agombedtls: fix variable shadow warning
Jay Satiro [Mon, 29 May 2017 21:38:33 +0000 (17:38 -0400)]
mbedtls: fix variable shadow warning

vtls/mbedtls.c:804:69: warning: declaration of 'entropy' shadows a global declaration [-Wshadow]
 CURLcode Curl_mbedtls_random(struct Curl_easy *data, unsigned char *entropy,
                                                                     ^~~~~~~

7 years agoRELEASE-NOTES: synced with 3aaac8c2f
Daniel Stenberg [Mon, 29 May 2017 07:42:03 +0000 (09:42 +0200)]
RELEASE-NOTES: synced with 3aaac8c2f

7 years agotests: removed some redundant empty <stdout> sections
Dan Fandrich [Sun, 28 May 2017 21:07:35 +0000 (23:07 +0200)]
tests: removed some redundant empty <stdout> sections

7 years agoruntests.pl: removed <precommand> feature
Dan Fandrich [Sun, 28 May 2017 18:57:47 +0000 (20:57 +0200)]
runtests.pl: removed <precommand> feature

This hasn't been used in over a decade. <precheck> can still be used to
run commands before the main test.

7 years agoopts: more examples added in option man pages
Daniel Stenberg [Sat, 27 May 2017 21:11:26 +0000 (23:11 +0200)]
opts: more examples added in option man pages

7 years agoruntests.pl: removed unused arguments to valgrindparse
Dan Fandrich [Sat, 27 May 2017 12:30:24 +0000 (14:30 +0200)]
runtests.pl: removed unused arguments to valgrindparse

7 years agoTODO: 6.4 is done, send telnet data in chunks
Daniel Stenberg [Thu, 25 May 2017 19:54:26 +0000 (21:54 +0200)]
TODO: 6.4 is done, send telnet data in chunks

7 years agodocs/CURLOPT_SSLVERSION.3: Correct define name in example
Phil Crump [Thu, 25 May 2017 11:51:35 +0000 (12:51 +0100)]
docs/CURLOPT_SSLVERSION.3: Correct define name in example

Closes #1509

7 years agossh: fix 'left' may be used uninitialized
Daniel Stenberg [Thu, 25 May 2017 11:01:44 +0000 (13:01 +0200)]
ssh: fix 'left' may be used uninitialized

follow-up to f31760e63b4e

Reported-by: Michael Kaufmann
Bug: https://github.com/curl/curl/pull/1495#issuecomment-303982793

7 years agotime: fix type conversions and compiler warnings
Michael Kaufmann [Sat, 20 May 2017 17:39:51 +0000 (19:39 +0200)]
time: fix type conversions and compiler warnings

Fix bugs and compiler warnings on systems with 32-bit long and
64-bit time_t.

Reviewed-by: Daniel Stenberg
Closes #1499

7 years agoexamples: fix Wimplicit-fallthrough warnings
Marcel Raad [Wed, 24 May 2017 09:56:38 +0000 (11:56 +0200)]
examples: fix Wimplicit-fallthrough warnings

This is contained in -Wextra with GCC 7.

7 years agowinbuild: fix the nghttp2 build
Anatol Belski [Fri, 10 Mar 2017 11:59:36 +0000 (12:59 +0100)]
winbuild: fix the nghttp2 build

Closes #1321

7 years agoLDAP: documentation update per #878 changes (#1506)
Sergei Nikulov [Tue, 23 May 2017 22:03:29 +0000 (01:03 +0300)]
LDAP: documentation update per #878 changes (#1506)

7 years agoredirect: store the "would redirect to" URL when max redirs is reached
Daniel Stenberg [Tue, 23 May 2017 08:32:18 +0000 (10:32 +0200)]
redirect: store the "would redirect to" URL when max redirs is reached

Test 1261 added to verify.

Reported-by: Lloyd Fournier
Fixes #1489
Closes #1497

7 years agoLDAP: fixed checksrc issue
Sergei Nikulov [Tue, 23 May 2017 21:14:13 +0000 (00:14 +0300)]
LDAP: fixed checksrc issue

7 years agoLDAP: using ldap_bind_s on Windows with methods (#878)
Sergei Nikulov [Tue, 23 May 2017 19:45:39 +0000 (22:45 +0300)]
LDAP: using ldap_bind_s on Windows with methods (#878)

* LDAP: using ldap_bind_s on Windows with methods(BASIC/DIGEST/NTLM/AUTONEG)

* ldap: updated per build options handling

* ldap: fixed logic for auth selection

7 years agocmake: fix build on Ubuntu 14.04
Akhil Kedia [Mon, 22 May 2017 08:34:45 +0000 (17:34 +0900)]
cmake: fix build on Ubuntu 14.04

Fixed a syntax error with setting cache variables (The type and
docstring were missing), resulting in build errors.  Quoted the
CURL_CA_PATH and CURL_CA_BUNDLE otherwise the path was written without
quotes in C code, resulting in build errors.

Closes #1503

Signed-off-by: Akhil <akhil.kedia@samsung.com>
7 years agourl: fix declaration of 'pipe' shadows a global declaration
Daniel Stenberg [Tue, 23 May 2017 05:41:52 +0000 (07:41 +0200)]
url: fix declaration of 'pipe' shadows a global declaration

follow-up to 4cdb1be8246c

7 years agomemdebug: fix compilation failure
Kamil Dudka [Mon, 22 May 2017 17:00:15 +0000 (19:00 +0200)]
memdebug: fix compilation failure

.... caused by a typo in the last commit (fixing issue #1504):

memdebug.c: In function ‘curl_fclose’:
memdebug.c:444:3: error: implicit declaration of function
‘DEBUGDEBUGASSERT’ [-Werror=implicit-function-declaration]

7 years agoassert: avoid, use DEBUGASSERT instead!
Daniel Stenberg [Mon, 22 May 2017 11:58:17 +0000 (13:58 +0200)]
assert: avoid, use DEBUGASSERT instead!

... as it does extra checks to actually work.

Reported-by: jonrumsey at github
Fixes #1504

7 years agocmake: remove unused variables: GNUTLS_ENABLED, NSS_ENABLED
Simon Warta [Mon, 1 May 2017 22:26:08 +0000 (00:26 +0200)]
cmake: remove unused variables: GNUTLS_ENABLED, NSS_ENABLED

7 years agocmake: remove CURL_CA_BUNDLE from cmake TODO
Simon Warta [Mon, 1 May 2017 22:18:18 +0000 (00:18 +0200)]
cmake: remove CURL_CA_BUNDLE from cmake TODO

7 years agocmake: auto detection of CURL_CA_BUNDLE/CURL_CA_PATH
Simon Warta [Mon, 1 May 2017 22:12:55 +0000 (00:12 +0200)]
cmake: auto detection of CURL_CA_BUNDLE/CURL_CA_PATH

Closes #1461

7 years agocmake: add CURL_CA_BUNDLE/CURL_CA_FALLBACK/CURL_CA_PATH options
Simon Warta [Mon, 1 May 2017 20:15:15 +0000 (22:15 +0200)]
cmake: add CURL_CA_BUNDLE/CURL_CA_FALLBACK/CURL_CA_PATH options

7 years agocmake: Add CURL_CA_FALLBACK to curl_config.h.cmake
Simon Warta [Sun, 26 Feb 2017 21:41:33 +0000 (22:41 +0100)]
cmake: Add CURL_CA_FALLBACK to curl_config.h.cmake

This is for symmetry with the autoconf generated curl_config.h.in

7 years agoRELEASE-NOTES: synced with 052a14e3c
Daniel Stenberg [Sat, 20 May 2017 22:26:27 +0000 (00:26 +0200)]
RELEASE-NOTES: synced with 052a14e3c

7 years agotests: stabilize test 1034
Michael Kaufmann [Tue, 16 May 2017 19:29:59 +0000 (21:29 +0200)]
tests: stabilize test 1034

Pass the invalid domain name on stdin. On some systems, the test
framework cannot pass invalid UTF-8 sequences on the command line.

Closes #1488

7 years agossh: ignore timeouts during disconnect
Daniel Stenberg [Thu, 18 May 2017 11:04:52 +0000 (13:04 +0200)]
ssh: ignore timeouts during disconnect

... as otherwise it risks not cleaning up the libssh2 handle properly
which leads to memory leak!

Assisted-by: Joel Depooter
Closes #1495
Closes #1479

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

7 years agoghiper.c/hiperfifo.c: add comment about missing timer functionality
Daniel Stenberg [Fri, 19 May 2017 12:25:16 +0000 (14:25 +0200)]
ghiper.c/hiperfifo.c: add comment about missing timer functionality

It takes someone to read up on the APIs of these libraries to figure out
how to do this correctly.

Reported-by: Michael Kaufmann
Closes #1253

7 years agoasiohiper.cpp / evhiperfifo.c: deal with negative timerfunction input
Daniel Stenberg [Fri, 19 May 2017 12:16:37 +0000 (14:16 +0200)]
asiohiper.cpp / evhiperfifo.c: deal with negative timerfunction input

That means delete the timer.

Reported-by: Michael Kaufmann
Ref: #1253

7 years agocmdline-opts/write-out.d: s/-L/--location
Daniel Stenberg [Thu, 18 May 2017 21:11:45 +0000 (23:11 +0200)]
cmdline-opts/write-out.d: s/-L/--location

Since the man page generator wants the long option name version to
generate the proper output.

7 years agomkhelp.pl: do not add current time into curl binary
Bernhard M. Wiedemann [Wed, 17 May 2017 13:54:19 +0000 (15:54 +0200)]
mkhelp.pl: do not add current time into curl binary

... as part of hugehelpgz rodata to make build reproducible.

See https://reproducible-builds.org/ for why this is good

Closes #1490

7 years agooauth2-bearer.d: mention the <token> argument
Daniel Stenberg [Wed, 17 May 2017 08:55:12 +0000 (10:55 +0200)]
oauth2-bearer.d: mention the <token> argument

7 years agodarwinssl: Fix exception when processing a client-side certificate file
Nick Zitzmann [Wed, 17 May 2017 00:21:12 +0000 (19:21 -0500)]
darwinssl: Fix exception when processing a client-side certificate file
if no error was raised by the API but the SecIdentityRef was null

Fixes #1450

7 years agocurl_sasl: fix build error with CURL_DISABLE_CRYPTO_AUTH + USE_NTLM
Daniel Stenberg [Tue, 16 May 2017 14:13:03 +0000 (16:13 +0200)]
curl_sasl: fix build error with CURL_DISABLE_CRYPTO_AUTH + USE_NTLM

Reported-by: wyattoday at github
Fixes #1487

7 years agodocs/cmdline-opts/config.d: edit for language
Daniel Stenberg [Tue, 16 May 2017 06:49:11 +0000 (08:49 +0200)]
docs/cmdline-opts/config.d: edit for language

7 years agoRELEASE-NOTES: synced with eb16305e6
Daniel Stenberg [Mon, 15 May 2017 21:19:45 +0000 (23:19 +0200)]
RELEASE-NOTES: synced with eb16305e6

7 years agoSecureTransport/DarwinSSL: Implement public key pinning
moparisthebest [Mon, 17 Apr 2017 23:47:51 +0000 (19:47 -0400)]
SecureTransport/DarwinSSL: Implement public key pinning

Closes #1400

7 years agoman pages: fix example syntax errors
Daniel Stenberg [Mon, 15 May 2017 11:00:48 +0000 (13:00 +0200)]
man pages: fix example syntax errors

follow-up to 5ddad099b42b50

7 years agodocs/libcurl/opts: added more examples in man pages
Daniel Stenberg [Mon, 15 May 2017 09:45:19 +0000 (11:45 +0200)]
docs/libcurl/opts: added more examples in man pages

7 years agoCURLOPT_HTTPPROXYTUNNEL: clarify, add example
Daniel Stenberg [Mon, 15 May 2017 08:11:23 +0000 (10:11 +0200)]
CURLOPT_HTTPPROXYTUNNEL: clarify, add example

7 years agocurl: show the libcurl release date in --version output
Daniel Stenberg [Sun, 14 May 2017 15:09:45 +0000 (17:09 +0200)]
curl: show the libcurl release date in --version output

... and support and additional "security patched" date for those who
enhance older versions that way. Pass on the define CURL_PATCHSTAMP with
a date for that.

Building with non-release headers shows the date as [unreleased].

Also: this changes the date format generated in the curlver.h file to be
"YYYY-MM-DD" (no name of the day or month, no time, no time zone) to
make it easier on the eye and easier to parse. Example (new) date
string: 2017-05-09

Suggested-by: Brian Childs
Closes #1474

7 years agourl.c: add a compile-time check that CURL_MAX_WRITE_SIZE is large enough
Dan Fandrich [Sat, 13 May 2017 20:54:59 +0000 (22:54 +0200)]
url.c: add a compile-time check that CURL_MAX_WRITE_SIZE is large enough

Some code (e.g. Curl_fillreadbuffer) assumes that this buffer is not
exceedingly tiny and will break if it is. This same check is already
done at run time in the CURLOPT_BUFFERSIZE option.

7 years agolib510: don't write past the end of the buffer if it's too small
Dan Fandrich [Sat, 13 May 2017 20:57:49 +0000 (22:57 +0200)]
lib510: don't write past the end of the buffer if it's too small

7 years agotests: added missing keywords "chunked Transfer-Encoding"
Dan Fandrich [Sat, 13 May 2017 20:35:15 +0000 (22:35 +0200)]
tests: added missing keywords "chunked Transfer-Encoding"

7 years agoTHANKS: add a few missing names
Daniel Stenberg [Sat, 13 May 2017 19:14:59 +0000 (21:14 +0200)]
THANKS: add a few missing names

... I found them in the commit logs from the early years

7 years agotests: made a couple of prechecks consistent with others
Dan Fandrich [Sat, 13 May 2017 17:04:10 +0000 (19:04 +0200)]
tests: made a couple of prechecks consistent with others

Also removed a TODO suggesting caching the precheck results. Tests
showed this would save about 0.1 sec on the total test run time on a
relatively modern system, an unnoticeable gain at the cost of longer and
more complicated code. There would also be a danger that a cached test
result would be inappropriately returned, such as when other test
dependencies (like environment variables) are different or when the
precheck causes side effects (like filesystem changes).

7 years agoFAQ: add 7.4 to toc
Daniel Stenberg [Fri, 12 May 2017 17:58:06 +0000 (19:58 +0200)]
FAQ: add 7.4 to toc

... and delete trailing whitespace

Fixes #1484

7 years agomulti: remove leftover debug infof() calls from e9fd794a6
Daniel Stenberg [Fri, 12 May 2017 15:19:30 +0000 (17:19 +0200)]
multi: remove leftover debug infof() calls from e9fd794a6

7 years agopipeline: fix mistakenly trying to pipeline POSTs
Daniel Stenberg [Fri, 12 May 2017 14:29:06 +0000 (16:29 +0200)]
pipeline: fix mistakenly trying to pipeline POSTs

The function IsPipeliningPossible() would return TRUE if either
pipelining OR HTTP/2 were possible on a connection, which would lead to
it returning TRUE even for POSTs on HTTP/1 connections.

It now returns a bitmask so that the caller can differentiate which kind
the connection allows.

Fixes #1481
Closes #1483
Reported-by: stootill at github
7 years agombedtls: Support server renegotiation request
Ron Eldor [Tue, 9 May 2017 13:57:19 +0000 (16:57 +0300)]
mbedtls: Support server renegotiation request

Tested with servers: IIS 7.5; OpenSSL 1.0.2.

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

7 years agocookie_interface: fix -Wcomma warning
Marcel Raad [Thu, 11 May 2017 07:59:56 +0000 (09:59 +0200)]
cookie_interface: fix -Wcomma warning

clang 5.0 complains:
possible misuse of comma operator here [-Wcomma]

7 years agoformdata: fix -Wcomma warning
Marcel Raad [Thu, 11 May 2017 08:01:58 +0000 (10:01 +0200)]
formdata: fix -Wcomma warning

clang 5.0 complains:
possible misuse of comma operator here [-Wcomma]

Change the comma to a semicolon to fix that.

7 years agomulti: use a fixed array of timers instead of malloc
Daniel Stenberg [Tue, 9 May 2017 10:47:49 +0000 (12:47 +0200)]
multi: use a fixed array of timers instead of malloc

... since the total amount is low this is faster, easier and reduces
memory overhead.

Also, Curl_expire_done() can now mark an expire timeout as done so that
it never times out.

Closes #1472

7 years agomulti: assign IDs to all timers and make each timer singleton
Daniel Stenberg [Tue, 9 May 2017 10:47:49 +0000 (12:47 +0200)]
multi: assign IDs to all timers and make each timer singleton

 A) reduces the timeout lists drastically

 B) prevents a lot of superfluous loops for timers that expires "in vain"
    when it has actually already been extended to fire later on

7 years agotests: remove superfluous test 1399
Richard Hsu [Tue, 9 May 2017 21:30:15 +0000 (14:30 -0700)]
tests: remove superfluous test 1399

@MarcelRaad noted that `test1399` causes infinite loop on MinGW.
Looking into this, seems like it is related to how Windows handles
CRLF. See https://github.com/curl/curl/commit/9e093f by @mback2k.
Removing `test1399` as it's identical to `test1326` then with such a
fix.

Test 1399 was broughy by commit 862b02f8947039e

Closes #1478

7 years agotests: make test file names more unique
Dan Fandrich [Tue, 9 May 2017 17:49:17 +0000 (19:49 +0200)]
tests: make test file names more unique

Include the test number in the names of files written out by tests to
reduce the chance of accidental duplication and to make it more clear
which test is associated with which file.

7 years agotests: removed redundant --trace-ascii arguments
Dan Fandrich [Tue, 9 May 2017 17:43:22 +0000 (19:43 +0200)]
tests: removed redundant --trace-ascii arguments

This is already added by the test suite; it's not clear why all these
tests had it, unless it's cargo-culting.

7 years agotool: fix remaining -Wcast-qual warnings
Marcel Raad [Tue, 9 May 2017 17:20:28 +0000 (19:20 +0200)]
tool: fix remaining -Wcast-qual warnings

Avoid casting away low-level const.

7 years agoformboundary: convert assert into run-time check
Daniel Stenberg [Tue, 9 May 2017 07:08:25 +0000 (09:08 +0200)]
formboundary: convert assert into run-time check

... to really make sure the boundary fits in the target buffer.

Fixes unused parameter 'buflen' warning.

Reported-by: Michael Kaufmann
Bug: https://github.com/curl/curl/pull/1468#issuecomment-300078754

7 years agotests: list the primary server first in the server section
Dan Fandrich [Mon, 8 May 2017 22:36:38 +0000 (00:36 +0200)]
tests: list the primary server first in the server section

7 years agocurl: generate the --help output
Daniel Stenberg [Mon, 8 May 2017 21:30:29 +0000 (23:30 +0200)]
curl: generate the --help output

... using the docs/cmdline-opts/gen.pl script, so that we get all the
command line option documentation from the same source.

The generation of the list has to be done manually and pasted into the
source code.

Closes #1465

7 years agotests: updated for modified fake random
Daniel Stenberg [Mon, 8 May 2017 21:23:29 +0000 (23:23 +0200)]
tests: updated for modified fake random

7 years agorand: treat fake entropy the same regardless of endianness
Jay Satiro [Mon, 8 May 2017 21:23:28 +0000 (23:23 +0200)]
rand: treat fake entropy the same regardless of endianness

When the random seed is purposely made predictable for testing purposes
by using the CURL_ENTROPY environment variable, process that data in an
endian agnostic way so the the initial random seed is the same
regardless of endianness.

- Change Curl_rand to write to a char array instead of int array.

- Add Curl_rand_hex to write random hex characters to a buffer.

Fixes #1315
Closes #1468

Co-authored-by: Daniel Stenberg
Reported-by: Michael Kaufmann
7 years agotests: give each stunnel.conf file a unique name
Dan Fandrich [Sun, 7 May 2017 13:02:02 +0000 (15:02 +0200)]
tests: give each stunnel.conf file a unique name

Otherwise, subsequent uses of stunnel overwrite the configuration file
of previous invocations so they can no longer be inspected.

7 years agotool_msgs: remove wrong cast
Marcel Raad [Mon, 8 May 2017 18:23:44 +0000 (20:23 +0200)]
tool_msgs: remove wrong cast

Commit 481e0de00a9003b9c5220b120e3fc302d9b0932d changed the variable
type from int to size_t, so don't cast the result of strlen to int
anymore.

7 years agotftpd: fix signed/unsigned mismatch warnings
Marcel Raad [Mon, 8 May 2017 18:09:32 +0000 (20:09 +0200)]
tftpd: fix signed/unsigned mismatch warnings

alarm's argument is unsigned.

7 years agolibtest: fix MinGW-w64 warnings
Marcel Raad [Mon, 8 May 2017 17:59:46 +0000 (19:59 +0200)]
libtest: fix MinGW-w64 warnings

long is 32 bits while size_t is 64 bits on MinGW-w64, so
typecheck-gcc.h complains when using size_t for a long option.
Also, curl_socket_t is unsigned long long rather than int.

7 years agocurl.1: depend the build on the Makefile.inc too
Daniel Stenberg [Mon, 8 May 2017 13:10:09 +0000 (15:10 +0200)]
curl.1: depend the build on the Makefile.inc too

... to also make it update when we remove files, like we did for
--environment in commit a8e388dd1095.

7 years agoRELEASE-NOTES: synced with e3f84efc32d6b01a
Daniel Stenberg [Mon, 8 May 2017 08:18:30 +0000 (10:18 +0200)]
RELEASE-NOTES: synced with e3f84efc32d6b01a

7 years agoruntests: fix "use of undefined value" warning in -R handling
Daniel Stenberg [Mon, 8 May 2017 08:08:48 +0000 (10:08 +0200)]
runtests: fix "use of undefined value" warning in -R handling

7 years agotest537: use correct variable type
Marcel Raad [Fri, 5 May 2017 07:37:05 +0000 (09:37 +0200)]
test537: use correct variable type

Avoids narrowing conversion warnings because rlim_t is usually
unsigned long.

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

7 years agosendrecv: fix MinGW-w64 warning
Marcel Raad [Sun, 7 May 2017 20:14:28 +0000 (22:14 +0200)]
sendrecv: fix MinGW-w64 warning

The first argument to select is an int, while curl_socket_t is
unsigned long long when using WinSock. It's ignored anyway [1].

[1] https://msdn.microsoft.com/en-us/library/windows/desktop/ms740141.aspx

7 years agotool_parsecfg: fix -Wcast-qual warning
Marcel Raad [Sun, 7 May 2017 18:27:12 +0000 (20:27 +0200)]
tool_parsecfg: fix -Wcast-qual warning

Don't convert string literal to char * before assigning it to
const char *.

7 years agoasyn-thread: fix unused macro warnings
Marcel Raad [Sun, 7 May 2017 17:02:34 +0000 (19:02 +0200)]
asyn-thread: fix unused macro warnings

Don't do anything in this file if CURLRES_THREADED is not defined.

7 years agotftp: silence bad-function-cast warning
Marcel Raad [Sun, 7 May 2017 14:26:19 +0000 (16:26 +0200)]
tftp: silence bad-function-cast warning

The cases this warns about are handled elsewhere, so just use an
intermediate variable to silence the warning.

7 years agobuildconf: fix hang on IRIX
canavan at github [Sat, 6 May 2017 22:06:56 +0000 (00:06 +0200)]
buildconf: fix hang on IRIX

Apparently, /usr/bin/m4 ignores the --version parameter and waits for
input from stdin.

Fixes #1471

7 years agoopts: fix bad example formatting \n => \\n
Daniel Stenberg [Sat, 6 May 2017 21:51:29 +0000 (23:51 +0200)]
opts: fix bad example formatting \n => \\n

...to render properly nroff.

7 years agoopts: examples added to 8 more libcurl option man pages
Daniel Stenberg [Sat, 6 May 2017 21:38:39 +0000 (23:38 +0200)]
opts: examples added to 8 more libcurl option man pages

7 years agocurl: remove tool_writeenv.[ch]
Daniel Stenberg [Wed, 3 May 2017 12:28:40 +0000 (14:28 +0200)]
curl: remove tool_writeenv.[ch]

... and USE_ENVIRONMENT and --environment. It was once added for RISC OS
support and its platform specific behavior has been annoying ever
since. Added in commit c3c8bbd3b2688da8e, mostly unchanged since
then. Most probably not actually used for years.

Closes #1463

7 years agoruntests.pl: simplify the datacheck read section
Dan Fandrich [Sat, 6 May 2017 07:04:00 +0000 (09:04 +0200)]
runtests.pl: simplify the datacheck read section

Also, document that numbered datacheck sections are possible.

7 years agotests: fix -Wcast-qual warnings
Marcel Raad [Fri, 5 May 2017 19:29:50 +0000 (21:29 +0200)]
tests: fix -Wcast-qual warnings

Avoid casting string literals to non-const char *.

7 years agodocs/opts: 24 more man pages now have examples
Daniel Stenberg [Fri, 5 May 2017 15:26:08 +0000 (17:26 +0200)]
docs/opts: 24 more man pages now have examples