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
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.
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.
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.
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
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.
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
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.
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.
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.
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.
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.
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]
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.