]> granicus.if.org Git - curl/log
curl
6 years agoCURLOPT_INTERFACE.3: interface names not supported on Windows
Daniel Stenberg [Mon, 18 Jun 2018 21:14:28 +0000 (23:14 +0200)]
CURLOPT_INTERFACE.3: interface names not supported on Windows

6 years agotravis: run more tests for coverage check
Daniel Stenberg [Sat, 16 Jun 2018 09:55:04 +0000 (11:55 +0200)]
travis: run more tests for coverage check

... run a few more tortured based and run all tests event-based.

Closes #2664

6 years agomulti: fix memory leak when stopped during name resolve
Daniel Stenberg [Thu, 14 Jun 2018 14:28:59 +0000 (16:28 +0200)]
multi: fix memory leak when stopped during name resolve

When the application just started the transfer and then stops it while
the name resolve in the background thread hasn't completed, we need to
wait for the resolve to complete and then cleanup data accordingly.

Enabled test 1553 again and added test 1590 to also check when the host
name resolves successfully.

Detected by OSS-fuzz.
Closes #1968

6 years agomaketgz: delete .bak files, fix indentation
Viktor Szakats [Fri, 15 Jun 2018 23:28:34 +0000 (23:28 +0000)]
maketgz: delete .bak files, fix indentation

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

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

6 years agoruntests.pl: remove debug leftover from bb9a340c73f3
Daniel Stenberg [Fri, 15 Jun 2018 15:26:57 +0000 (17:26 +0200)]
runtests.pl: remove debug leftover from bb9a340c73f3

6 years agocurl-confopts.m4: fix typo from ed224f23d5beb
Daniel Stenberg [Fri, 15 Jun 2018 15:14:05 +0000 (17:14 +0200)]
curl-confopts.m4: fix typo from ed224f23d5beb

Fixes my local configure to detect a custom installed c-ares without
pkgconfig.

6 years agodocs/RELEASE-PROCEDURE.md: renamed to use .md extension
Daniel Stenberg [Fri, 15 Jun 2018 11:37:48 +0000 (13:37 +0200)]
docs/RELEASE-PROCEDURE.md: renamed to use .md extension

Closes #2663

6 years agoRELEASE-PROCEDURE: gpg sign the tags
Daniel Stenberg [Fri, 15 Jun 2018 11:32:41 +0000 (13:32 +0200)]
RELEASE-PROCEDURE: gpg sign the tags

6 years agoRELEASE-NOTES: synced
Daniel Stenberg [Fri, 15 Jun 2018 14:46:37 +0000 (16:46 +0200)]
RELEASE-NOTES: synced

6 years agoCURLOPT_HTTPAUTH.3: CURLAUTH_BEARER was added in 7.61.0
Daniel Stenberg [Fri, 15 Jun 2018 09:17:02 +0000 (11:17 +0200)]
CURLOPT_HTTPAUTH.3: CURLAUTH_BEARER was added in 7.61.0

6 years agomaketgz: fix sed issues on OSX
Mamta Upadhyay [Thu, 14 Jun 2018 16:29:43 +0000 (09:29 -0700)]
maketgz: fix sed issues on OSX

maketgz creates release tarballs and removes the -DEV string in curl
version (e.g. 7.58.0-DEV), else -DEV shows up on command line when curl
is run. maketgz works fine on linux but fails on OSX. Problem is with
the sed commands that use option -i without an extension. Maketgz
expects GNU sed instead of BSD and this simply won't work on OSX. Adding
a backup extension .bak after -i fixes this issue

Running the script as if on OSX gives this error:

sed: -e: No such file or directory

Adding a .bak extension resolves it

Closes #2660

6 years agoconfigure: enhance ability to detect/build with static openssl
Daniel Stenberg [Thu, 14 Jun 2018 14:52:43 +0000 (16:52 +0200)]
configure: enhance ability to detect/build with static openssl

Fix the -ldl and -ldl + -lpthread checks for OpenSSL, necessary for
building with static libs without pkg-config.

Reported-by: Marcel Raad
Fixes #2199
Closes #2659

6 years agoconfigure: use pkg-config for c-ares detection
Daniel Stenberg [Thu, 14 Jun 2018 11:19:09 +0000 (13:19 +0200)]
configure: use pkg-config for c-ares detection

First check if there's c-ares information given as pkg-config info and use
that as first preference.

Reported-by: pszemus on github
Fixes #2203
Closes #2658

6 years agoGOVERNANCE.md: explains how this project is run
Daniel Stenberg [Thu, 14 Jun 2018 07:13:46 +0000 (09:13 +0200)]
GOVERNANCE.md: explains how this project is run

Closes #2657

6 years agoKNOWN_BUGS: NTLM doen't support password with § character
Daniel Stenberg [Thu, 14 Jun 2018 12:04:48 +0000 (14:04 +0200)]
KNOWN_BUGS: NTLM doen't support password with § character

Closes #2120

6 years agoKNOWN_BUGS: slow connect to localhost on Windows
Daniel Stenberg [Thu, 14 Jun 2018 11:55:45 +0000 (13:55 +0200)]
KNOWN_BUGS: slow connect to localhost on Windows

Closes #2281

6 years agomk-ca-bundle.pl: make -u delete certdata.txt if found not changed
Matteo Bignotti [Wed, 13 Jun 2018 20:45:23 +0000 (13:45 -0700)]
mk-ca-bundle.pl: make -u delete certdata.txt if found not changed

certdata.txt should be deleted also when the process is interrupted by
"same certificate downloaded, exiting"

The certdata.txt is currently kept on disk even if you give the -u
option

Closes #2655

6 years agoprogress: remove a set of unused defines
Daniel Stenberg [Wed, 13 Jun 2018 12:38:34 +0000 (14:38 +0200)]
progress: remove a set of unused defines

Reported-by: Peter Wu
Closes #2654

6 years agoTODO: "Option to refuse usernames in URLs" done
Daniel Stenberg [Wed, 13 Jun 2018 09:24:34 +0000 (11:24 +0200)]
TODO: "Option to refuse usernames in URLs" done

Implemented by Björn in 946ce5b61f

6 years agoCurl_init_do: handle NULL connection pointer passed in
Lyman Epp [Tue, 12 Jun 2018 22:17:30 +0000 (17:17 -0500)]
Curl_init_do: handle NULL connection pointer passed in

Closes #2653

6 years agoruntests: support variables in <strippart>
Daniel Stenberg [Tue, 12 Jun 2018 13:48:47 +0000 (15:48 +0200)]
runtests: support variables in <strippart>

... and make use of that to make 1455 work better without using a fixed
local port number.

Fixes #2649
Closes #2650

6 years agoCurl_debug: remove dead printhost code
Daniel Stenberg [Mon, 11 Jun 2018 22:10:43 +0000 (00:10 +0200)]
Curl_debug: remove dead printhost code

The struct field is never set (since 5e0d9aea3) so remove the use of it
and remove the connectdata pointer from the prototype.

Reported-by: Tejas
Bug: https://curl.haxx.se/mail/lib-2018-06/0054.html
Closes #2647

6 years agoschannel: avoid incompatible pointer warning
Viktor Szakats [Tue, 12 Jun 2018 11:23:11 +0000 (11:23 +0000)]
schannel: avoid incompatible pointer warning

with clang-6.0:
```
vtls/schannel_verify.c: In function 'add_certs_to_store':
vtls/schannel_verify.c:212:30: warning: passing argument 11 of 'CryptQueryObject' from incompatible pointer type [-Wincompatible-pointer-types]
                              &cert_context)) {
                              ^
In file included from /usr/share/mingw-w64/include/schannel.h:10:0,
                 from /usr/share/mingw-w64/include/schnlsp.h:9,
                 from vtls/schannel.h:29,
                 from vtls/schannel_verify.c:40:
/usr/share/mingw-w64/include/wincrypt.h:4437:26: note: expected 'const void **' but argument is of type 'CERT_CONTEXT ** {aka struct _CERT_CONTEXT **}'
   WINIMPM WINBOOL WINAPI CryptQueryObject (DWORD dwObjectType, const void *pvObject, DWORD dwExpectedContentTypeFlags, DWORD dwExpectedFormatTypeFlags, DWORD dwFlags,
                          ^~~~~~~~~~~~~~~~
```
Ref: https://msdn.microsoft.com/library/windows/desktop/aa380264

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

6 years agoschannel: support selecting ciphers
Robert Prag [Sat, 2 Jun 2018 00:17:40 +0000 (17:17 -0700)]
schannel: support selecting ciphers

Given the contstraints of SChannel, I'm exposing these as the algorithms
themselves instead; while replicating the ciphersuite as specified by
OpenSSL would have been preferable, I found no way in the SChannel API
to do so.

To use this from the commandline, you need to pass the names of contants
defining the desired algorithms. For example, curl --ciphers
"CALG_SHA1:CALG_RSA_SIGN:CALG_RSA_KEYX:CALG_AES_128:CALG_DH_EPHEM"
https://github.com The specific names come from wincrypt.h

Closes #2630

6 years agotest 46: make test pass after 2025
Bernhard M. Wiedemann [Mon, 11 Jun 2018 14:06:23 +0000 (16:06 +0200)]
test 46: make test pass after 2025

shifting the expiry date to 2037 for now
to be before the possibly problematic year 2038

similar in spirit to commit e6293cf8764e9eecb

Closes #2646

6 years agocppcheck: fix warnings
Marian Klymov [Sat, 2 Jun 2018 20:52:56 +0000 (23:52 +0300)]
cppcheck: fix warnings

- Get rid of variable that was generating false positive warning
(unitialized)

- Fix issues in tests

- Reduce scope of several variables all over

etc

Closes #2631

6 years agoopenssl: assume engine support in 1.0.1 or later
Daniel Stenberg [Fri, 8 Jun 2018 14:36:47 +0000 (16:36 +0200)]
openssl: assume engine support in 1.0.1 or later

Previously it was checked for in configure/cmake, but that would then
leave other build systems built without engine support.

While engine support probably existed prior to 1.0.1, I decided to play
safe. If someone experience a problem with this, we can widen the
version check.

Fixes #2641
Closes #2644

6 years agoRELEASE-NOTES: synced
Daniel Stenberg [Mon, 11 Jun 2018 07:09:16 +0000 (09:09 +0200)]
RELEASE-NOTES: synced

6 years agoRELEASE-PROCEDURE: update the release calendar for 2019
Daniel Stenberg [Mon, 11 Jun 2018 06:36:30 +0000 (08:36 +0200)]
RELEASE-PROCEDURE: update the release calendar for 2019

6 years agoboringssl + schannel: undef X509_NAME in lib/schannel.h
Gisle Vanem [Fri, 8 Jun 2018 13:10:05 +0000 (15:10 +0200)]
boringssl + schannel: undef X509_NAME in lib/schannel.h

Fixes the build problem when both boringssl and schannel are enabled.

Fixes #2634
Closes #2643

6 years agomk-ca-bundle.pl: leave certificate name untouched in decode()
Vladimir Kotal [Thu, 7 Jun 2018 08:44:30 +0000 (10:44 +0200)]
mk-ca-bundle.pl: leave certificate name untouched in decode()

Closes #2640

6 years agotests/libtests/Makefile.am: Add lib1521.c to CLEANFILES
Rikard Falkeborn [Thu, 31 May 2018 22:00:45 +0000 (00:00 +0200)]
tests/libtests/Makefile.am: Add lib1521.c to CLEANFILES

This removes the generated lib1521.c when running make clean.

Closes #2633

6 years agotests/libtest: Add lib1521 to nodist_SOURCES
Rikard Falkeborn [Mon, 4 Jun 2018 18:28:59 +0000 (20:28 +0200)]
tests/libtest: Add lib1521 to nodist_SOURCES

Since 467da3af0, lib1521.c is generated instead of checked in. According
to the commit message, the intention was to remove it from the tarball
as well. However, it is still present when running make dist. To remove
it, add it to nodist_lib1521_SOURCES. This also means there is no need
for the manually added dist-rule in the Makefile.

Also update CMakelists.txt to handle the fact that we now may have
nodist_SOURCES.

6 years agosystem.h: add support for IBM xlc C compiler
Stephan Mühlstrasser [Wed, 6 Jun 2018 07:49:02 +0000 (09:49 +0200)]
system.h: add support for IBM xlc C compiler

Added a section to system.h guarded with __xlc__ for the IBM xml C
compiler. Before this change the section titled 'generic "safe guess" on
old 32 bit style' was used, which resulted in a wrong definition of
CURL_TYPEOF_CURL_SOCKLEN_T, and for 64-bit also CURL_TYPEOF_CURL_OFF_T
was wrong.

Compilation warnings fixed with this change:

  CC       libcurl_la-ftp.lo
"ftp.c", line 290.55: 1506-280 (W) Function argument assignment between types "unsigned long* restrict" and "int*" is not allowed.
"ftp.c", line 293.48: 1506-280 (W) Function argument assignment between types "unsigned long* restrict" and "int*" is not allowed.
"ftp.c", line 1070.49: 1506-280 (W) Function argument assignment between types "unsigned long* restrict" and "int*" is not allowed.
"ftp.c", line 1154.53: 1506-280 (W) Function argument assignment between types "unsigned long* restrict" and "int*" is not allowed.
"ftp.c", line 1187.51: 1506-280 (W) Function argument assignment between types "unsigned long* restrict" and "int*" is not allowed.
  CC       libcurl_la-connect.lo
"connect.c", line 448.56: 1506-280 (W) Function argument assignment between types "unsigned long* restrict" and "int*" is not allowed.
"connect.c", line 516.66: 1506-280 (W) Function argument assignment between types "unsigned long* restrict" and "int*" is not allowed.
"connect.c", line 687.55: 1506-280 (W) Function argument assignment between types "unsigned long* restrict" and "int*" is not allowed.
"connect.c", line 696.55: 1506-280 (W) Function argument assignment between types "unsigned long* restrict" and "int*" is not allowed.
  CC       libcurl_la-tftp.lo
"tftp.c", line 1115.33: 1506-280 (W) Function argument assignment between types "unsigned long* restrict" and "int*" is not allowed.

Closes #2637

6 years agocmdline-opts/cert-type.d: mention "p12" as a recognized type as well
Daniel Stenberg [Tue, 5 Jun 2018 12:53:33 +0000 (14:53 +0200)]
cmdline-opts/cert-type.d: mention "p12" as a recognized type as well

6 years agospelling fixes
Viktor Szakats [Sun, 3 Jun 2018 12:14:45 +0000 (12:14 +0000)]
spelling fixes

Detected using the `codespell` tool (version 1.13.0).

Also secure and fix an URL.

6 years agoaxtls: follow-up spell fix of comment
Daniel Stenberg [Sat, 2 Jun 2018 11:40:32 +0000 (13:40 +0200)]
axtls: follow-up spell fix of comment

6 years agoaxTLS: not considered fit for use
Daniel Stenberg [Fri, 1 Jun 2018 12:41:41 +0000 (14:41 +0200)]
axTLS: not considered fit for use

URL: https://curl.haxx.se/mail/lib-2018-06/0000.html

This is step one. It adds #error statements that require source edits to
make curl build again if asked to use axTLS. At a later stage we might
remove the axTLS specific code completely.

Closes #2628

6 years agobuild: remove the Borland specific makefiles
Daniel Stenberg [Fri, 1 Jun 2018 12:57:50 +0000 (14:57 +0200)]
build: remove the Borland specific makefiles

According to the user survey 2018, not even one out of 670 users use
them. Nobody on the mailing list spoke up for them either.

Closes #2629

6 years agocurl_addrinfo: use same #ifdef conditions in source as header
Daniel Stenberg [Fri, 1 Jun 2018 12:40:35 +0000 (14:40 +0200)]
curl_addrinfo: use same #ifdef conditions in source as header

... for curl_dofreeaddrinfo

6 years agomulti: remove a DEBUGF()
Daniel Stenberg [Fri, 1 Jun 2018 10:55:41 +0000 (12:55 +0200)]
multi: remove a DEBUGF()

... it might call infof() with a NULL first argument that isn't harmful
but makes it not do anything. The infof() line is not very useful
anymore, it has served it purpose. Good riddance!

Fixes #2627

6 years agoCURLOPT_RESOLVE: always purge old entry first
Alibek.Jorajev [Wed, 30 May 2018 14:23:35 +0000 (15:23 +0100)]
CURLOPT_RESOLVE: always purge old entry first

If there's an existing entry using the selected name.

Closes #2622

6 years agofnmatch: use the system one if available
Daniel Stenberg [Thu, 31 May 2018 13:57:54 +0000 (15:57 +0200)]
fnmatch: use the system one if available

If configure detects fnmatch to be available, use that instead of our
custom one for FTP wildcard pattern matching. For standard compliance,
to reduce our footprint and to use already well tested and well
exercised code.

A POSIX fnmatch behaves slightly different than the internal function
for a few test patterns currently and the macOS one yet slightly
different. Test case 1307 is adjusted for these differences.

Closes #2626

6 years agoos400: add new option in ILE/RPG binding
Patrick Monnerat [Thu, 31 May 2018 17:08:03 +0000 (19:08 +0200)]
os400: add new option in ILE/RPG binding

Follow-up to commit 946ce5b

6 years agotests/libtest/.gitignore: follow-up fix to ignore lib5* too
Daniel Stenberg [Thu, 31 May 2018 15:42:52 +0000 (17:42 +0200)]
tests/libtest/.gitignore: follow-up fix to ignore lib5* too

6 years agoKNOWN_BUGS: CURL_GLOBAL_SSL
Daniel Stenberg [Thu, 31 May 2018 15:41:42 +0000 (17:41 +0200)]
KNOWN_BUGS: CURL_GLOBAL_SSL

Closes #2276

6 years agoconfigure: check for declaration of getpwuid_r
Bernhard Walle [Sun, 27 May 2018 17:51:04 +0000 (19:51 +0200)]
configure: check for declaration of getpwuid_r

On our x86 Android toolchain, getpwuid_r is implemented but the header
is missing:

 netrc.c:81:7: error: implicit declaration of function 'getpwuid_r' [-Werror=implicit-function-declaration]

Unfortunately, the function is used in curl_ntlm_wb.c, too, so I moved
the prototype to curl_setup.h.

Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
Closes #2609

6 years agotests: update .gitignore for libtests
Rikard Falkeborn [Wed, 30 May 2018 21:35:27 +0000 (23:35 +0200)]
tests: update .gitignore for libtests

Closes #2624

6 years agostrictness: correct {infof, failf} format specifiers
Rikard Falkeborn [Mon, 28 May 2018 19:46:22 +0000 (21:46 +0200)]
strictness: correct {infof, failf} format specifiers

Closes #2623

6 years agooption: disallow username in URL
Björn Stenberg [Sun, 25 Feb 2018 19:17:25 +0000 (20:17 +0100)]
option: disallow username in URL

Adds CURLOPT_DISALLOW_USERNAME_IN_URL and --disallow-username-in-url. Makes
libcurl reject URLs with a username in them.

Closes #2340

6 years agolibcurl-security.3: improved layout for two rememdy lists
Daniel Stenberg [Thu, 31 May 2018 09:19:05 +0000 (11:19 +0200)]
libcurl-security.3: improved layout for two rememdy lists

6 years agolibcurl-security.3: refer to URL instead of in-source markdown file
Daniel Stenberg [Thu, 31 May 2018 09:11:38 +0000 (11:11 +0200)]
libcurl-security.3: refer to URL instead of in-source markdown file

6 years agocurl.rc: embed manifest for correct Windows version detection
Viktor Szakats [Wed, 30 May 2018 12:08:26 +0000 (12:08 +0000)]
curl.rc: embed manifest for correct Windows version detection

* enable it in `src/Makefile.m32`
* enable it in `winbuild/MakefileBuild.vc` if a custom manifest is
  _not_ enabled via the existing `EMBED_MANIFEST` option
* enable it for all Windows CMake builds (also disable the built-in
  minimal manifest, added by CMake by default.)

For other build systems, add the `-DCURL_EMBED_MANIFEST` option to
the list of RC (Resource Compiler) flags to enable the manifest
included in `src/curl.rc`. This may require to disable whatever
automatic or other means in which way another manifest is added to
`curl.exe`.

Notice that Borland C doesn't support this method due to a
long-pending resource compiler bug. Watcom C may also not handle
it correctly when the `-zm` `wrc` option is used (this option may
be unnecessary though) and regardless of options in certain earlier
revisions of the 2.0 beta version.

Closes https://github.com/curl/curl/pull/1221
Fixes https://github.com/curl/curl/issues/2591

6 years agoos400: sync EBCDIC wrappers and ILE/RPG binding with latest options
Patrick Monnerat [Tue, 29 May 2018 23:45:40 +0000 (01:45 +0200)]
os400: sync EBCDIC wrappers and ILE/RPG binding with latest options

6 years agoos400: implement mime api EBCDIC wrappers
Patrick Monnerat [Tue, 29 May 2018 22:38:37 +0000 (00:38 +0200)]
os400: implement mime api EBCDIC wrappers

Also sync ILE/RPG binding to define the new functions.

6 years agosetopt: add TLS 1.3 ciphersuites
Daniel Stenberg [Tue, 29 May 2018 14:12:52 +0000 (16:12 +0200)]
setopt: add TLS 1.3 ciphersuites

Adds CURLOPT_TLS13_CIPHERS and CURLOPT_PROXY_TLS13_CIPHERS.

curl: added --tls13-ciphers and --proxy-tls13-ciphers

Fixes #2435
Reported-by: zzq1015 on github
Closes #2607

6 years agoconfigure: override AR_FLAGS to silence warning
Daniel Stenberg [Tue, 29 May 2018 08:26:06 +0000 (10:26 +0200)]
configure: override AR_FLAGS to silence warning

The automake default ar flags are 'cru', but the 'u' flag in there
causes warnings on many modern Linux distros. Removing 'u' may have a
minor performance impact on older distros but should not cause harm.

Explained on the automake mailing list already back in April 2015:

https://www.mail-archive.com/automake-patches@gnu.org/msg07705.html

Reported-by: elephoenix on github
Fixes #2617
Closes #2619

6 years agocmake: fixed comments in compile checks code
Sergei Nikulov [Mon, 28 May 2018 06:01:48 +0000 (09:01 +0300)]
cmake: fixed comments in compile checks code

6 years agoINSTALL: LDFLAGS=-Wl,-R/usr/local/ssl/lib
Daniel Stenberg [Mon, 28 May 2018 21:54:19 +0000 (23:54 +0200)]
INSTALL: LDFLAGS=-Wl,-R/usr/local/ssl/lib

... the older description doesn't work

Reported-by: Peter Varga
Fixes #2615
Closes #2616

6 years agoKNOWN_BUGS: restore text regarding #2101.
Will Dietz [Tue, 29 May 2018 03:17:07 +0000 (22:17 -0500)]
KNOWN_BUGS: restore text regarding #2101.

This was added earlier but appears to have been removed accidentally.

AFAICT this is very much still an issue.

-----

I say "accidentally" because the text seems to have harmlessly snuck
into [1] (which makes no mention of it).  [1] was later reverted for
unspecified reasons in [2], presumably because the mentioned issue was
fixed or invalid.

[1] de9fac00c40db321d44fa6fbab6eb62ec4c83998
[2] 16d1f369403cbb04bd7b085eabbeebf159473fc2

Closes #2618

6 years agofnmatch: insist on escaped bracket to match
Daniel Stenberg [Sun, 27 May 2018 21:24:27 +0000 (23:24 +0200)]
fnmatch: insist on escaped bracket to match

A non-escaped bracket ([) is for a character group - as documented. It
will *not* match an individual bracket anymore. Test case 1307 updated
accordingly to match.

Problem detected by OSS-Fuzz, although this fix is probably not a final
fix for the notorious timeout issues.

Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8525
Closes #2614

6 years agopsl: use latest psl and refresh it periodically
Patrick Monnerat [Mon, 28 May 2018 18:29:15 +0000 (20:29 +0200)]
psl: use latest psl and refresh it periodically

The latest psl is cached in the multi or share handle. It is refreshed
before use after 72 hours.
New share lock CURL_LOCK_DATA_PSL controls the psl cache sharing.
If the latest psl is not available, the builtin psl is used.

Reported-by: Yaakov Selkowitz
Fixes #2553
Closes #2601

6 years agoconfigure: fix ssh2 linking when built with a static mbedtls
Fabrice Fontaine [Mon, 21 May 2018 10:07:00 +0000 (12:07 +0200)]
configure: fix ssh2 linking when built with a static mbedtls

The ssh2 pkg-config file could contain the following lines when build
with a static version of mbedtls:
   Libs: -L${libdir} -lssh2 /xxx/libmbedcrypto.a
   Libs.private: /xxx/libmbedcrypto.a

This static mbedtls library must be used to correctly detect ssh2
support and this library must be copied in libcurl.pc otherwise
compilation of any application (such as upmpdcli) with libcurl will fail
when trying to found mbedtls functions included in libssh2.  So, replace
pkg-config --libs-only-l by pkg-config --libs.

Fixes:
 - http://autobuild.buildroot.net/results/43e24b22a77f616d6198c10435dcc23cc3b9088a

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Closes #2613

6 years agoRELEASE-NOTES: synced
Daniel Stenberg [Mon, 28 May 2018 15:44:38 +0000 (17:44 +0200)]
RELEASE-NOTES: synced

6 years agocmake: check for getpwuid_r
Bernhard Walle [Sun, 27 May 2018 08:38:07 +0000 (10:38 +0200)]
cmake: check for getpwuid_r

The autotools-based build system does it, so we do it also in CMake.

Bug: #2609
Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
6 years agocmdline-opts/gen.pl: warn if mutexes: or see-also: list non-existing options
Daniel Stenberg [Mon, 28 May 2018 12:59:37 +0000 (14:59 +0200)]
cmdline-opts/gen.pl: warn if mutexes: or see-also: list non-existing options

6 years agocurl.1: Fix cmdline-opts reference errors.
Frank Gevaerts [Mon, 28 May 2018 12:17:51 +0000 (14:17 +0200)]
curl.1: Fix cmdline-opts reference errors.

--data, --form, and --ntlm were declared to be mutually exclusive with
non-existing options. --data and --form referred to --upload (which is
short for --upload-file and therefore did work, so this one was merely
a bit confusing), --ntlm referred to --negotiated instead of --negotiate.

Closes #2612

6 years agodocs: fix cmdline-opts metadata headers case consistency.
Frank Gevaerts [Mon, 28 May 2018 12:16:27 +0000 (14:16 +0200)]
docs: fix cmdline-opts metadata headers case consistency.

Almost all headers start with an uppercase letter, but some didn't.

6 years agomailmap: Max Savenkov
Daniel Stenberg [Mon, 28 May 2018 05:45:51 +0000 (07:45 +0200)]
mailmap: Max Savenkov

6 years agoFix the test for fsetxattr and strerror_r tests in CMake to work without compiling
maxed [Sat, 31 Mar 2018 10:17:45 +0000 (13:17 +0300)]
Fix the test for fsetxattr and strerror_r tests in CMake to work without compiling

6 years agomailmap: a Richard Alcock fixup
Daniel Stenberg [Sun, 27 May 2018 21:32:47 +0000 (23:32 +0200)]
mailmap: a Richard Alcock fixup

6 years agoschannel: add failf calls for client certificate failures
ralcock [Thu, 24 May 2018 15:00:19 +0000 (16:00 +0100)]
schannel: add failf calls for client certificate failures

Closes #2604

6 years agowinbuild: In MakefileBuild.vc fix typo DISTDIR->DIRDIST
richardthe3rd [Thu, 24 May 2018 20:35:38 +0000 (21:35 +0100)]
winbuild: In MakefileBuild.vc fix typo DISTDIR->DIRDIST

Change requirement from $(DISTDIR) to $(DIRDIST)

closes #2603

6 years agowinbuild: only delete OUTFILE if it exists
richardthe3rd [Thu, 24 May 2018 14:11:44 +0000 (15:11 +0100)]
winbuild: only delete OUTFILE if it exists

This removes the slightly annoying "Could not file LIBCURL_OBJS.inc" and
"Could not find CURL_OBJS.inc.inc" message when building into a clean
folder.

closes #2602

6 years agocontent_encoding: handle zlib versions too old for Z_BLOCK
Alejandro R. Sedeño [Fri, 25 May 2018 02:08:04 +0000 (22:08 -0400)]
content_encoding: handle zlib versions too old for Z_BLOCK

Fallback on Z_SYNC_FLUSH when Z_BLOCK is not available.

Fixes #2606
Closes #2608

6 years agomulti: provide a socket to wait for in Curl_protocol_getsock
Daniel Stenberg [Wed, 23 May 2018 22:21:37 +0000 (00:21 +0200)]
multi: provide a socket to wait for in Curl_protocol_getsock

... even when there's no protocol specific handler setup.

Bug: https://curl.haxx.se/mail/lib-2018-05/0062.html
Reported-by: Sean Miller
Closes #2600

6 years agohttpauth: add support for Bearer tokens
Linus Lewandowski [Tue, 22 May 2018 10:28:41 +0000 (12:28 +0200)]
httpauth: add support for Bearer tokens

Closes #2102

6 years agoTODO: CURLINFO_PAUSE_STATE
Daniel Stenberg [Thu, 24 May 2018 18:35:39 +0000 (20:35 +0200)]
TODO: CURLINFO_PAUSE_STATE

Closes #2588

6 years agocmake: set -d postfix for debug builds if not specified
Sergei Nikulov [Wed, 23 May 2018 21:37:53 +0000 (00:37 +0300)]
cmake: set -d postfix for debug builds if not specified
       using -DCMAKE_DEBUG_POSTFIX explicitly

       fixes #2121, obsoletes #2384

6 years agoconfigure: add basic test of --with-ssl prefix
Daniel Stenberg [Wed, 23 May 2018 12:26:49 +0000 (14:26 +0200)]
configure: add basic test of --with-ssl prefix

When given a prefix, the $PREFIX_OPENSSL/lib/openssl.pc or
$PREFIX_OPENSSL/include/openssl/ssl.h files must be present or cause an
error. Helps users detect when giving configure the wrong path.

Reported-by: Oleg Pudeyev
Assisted-by: Per Malmberg
Fixes #2580

6 years agohttp resume: skip body if http code 416 (range error) is ignored.
Patrick Monnerat [Tue, 22 May 2018 11:23:02 +0000 (13:23 +0200)]
http resume: skip body if http code 416 (range error) is ignored.

This avoids appending error data to already existing good data.

Test 92 is updated to match this change.
New test 1156 checks all combinations of --range/--resume, --fail,
Content-Range header and http status code 200/416.

Fixes #1163
Reported-By: Ithubg on github
Closes #2578

6 years agotftp: make sure error is zero terminated before printfing it
Daniel Stenberg [Tue, 22 May 2018 08:10:39 +0000 (10:10 +0200)]
tftp: make sure error is zero terminated before printfing it

6 years agoconfigure: add missing m4/ax_compile_check_sizeof.m4
Daniel Stenberg [Tue, 22 May 2018 06:03:06 +0000 (08:03 +0200)]
configure: add missing m4/ax_compile_check_sizeof.m4

follow-up to mistake in 6876ccf90b4

6 years agoschannel: make CAinfo parsing resilient to CR/LF
Johannes Schindelin [Mon, 21 May 2018 22:01:08 +0000 (00:01 +0200)]
schannel: make CAinfo parsing resilient to CR/LF

OpenSSL has supported --cacert for ages, always accepting LF-only line
endings ("Unix line endings") as well as CR/LF line endings ("Windows
line endings").

When we introduced support for --cacert also with Secure Channel (or in
cURL speak: "WinSSL"), we did not take care to support CR/LF line
endings, too, even if we are much more likely to receive input in that
form when using Windows.

Let's fix that.

Happily, CryptQueryObject(), the function we use to parse the ca-bundle,
accepts CR/LF input already, and the trailing LF before the END
CERTIFICATE marker catches naturally any CR/LF line ending, too. So all
we need to care about is the BEGIN CERTIFICATE marker. We do not
actually need to verify here that the line ending is CR/LF. Just
checking for a CR or an LF is really plenty enough.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Closes https://github.com/curl/curl/pull/2592

6 years agoCURLOPT_ACCEPT_ENCODING.3: add brotli and clarify a bit
Daniel Stenberg [Tue, 22 May 2018 06:23:30 +0000 (08:23 +0200)]
CURLOPT_ACCEPT_ENCODING.3: add brotli and clarify a bit

6 years agoRELEASE-NOTES: synced
Daniel Stenberg [Mon, 21 May 2018 22:01:13 +0000 (00:01 +0200)]
RELEASE-NOTES: synced

6 years agoKNOWN_BUGS: mention the -O with %-encoded file names
Daniel Stenberg [Mon, 21 May 2018 21:43:36 +0000 (23:43 +0200)]
KNOWN_BUGS: mention the -O with %-encoded file names

Closes #2573

6 years agochecksrc: make sure sizeof() is used *with* parentheses
Daniel Stenberg [Fri, 11 May 2018 21:40:58 +0000 (23:40 +0200)]
checksrc: make sure sizeof() is used *with* parentheses

... and unify the source code to adhere.

Closes #2563

6 years agocurl: added --styled-output
Daniel Stenberg [Thu, 17 May 2018 12:09:17 +0000 (14:09 +0200)]
curl: added --styled-output

It is enabled by default, so --no-styled-output will switch off the
detection/use of bold headers.

Closes #2538

6 years agocurl: show headers in bold
Daniel Stenberg [Thu, 17 May 2018 11:56:35 +0000 (13:56 +0200)]
curl: show headers in bold

The feature is only enabled if the output is believed to be a tty.

-J: There's some minor differences and improvements in -J handling, as
now J should work with -i and it actually creates a file first using the
initial name and then *renames* that to the one found in
Content-Disposition (if any).

-i: only shows headers for HTTP transfers now (as documented).
Previously it would also show for pieces of the transfer that were HTTP
(for example when doing FTP over a HTTP proxy).

-i: now shows trailers as well. Previously they were not shown at all.

--libcurl: the CURLOPT_HEADER is no longer set, as the header output is
now done in the header callback.

6 years agoconfigure: compile-time SIZEOF checks
Daniel Stenberg [Mon, 21 May 2018 17:54:16 +0000 (19:54 +0200)]
configure: compile-time SIZEOF checks

... instead of exeucting code to get the size. Removes the use of
LD_LIBRARY_PATH for this.

Fixes #2586
Closes #2589
Reported-by: Bernhard Walle
6 years agoconfigure: replace AC_TRY_RUN with CURL_RUN_IFELSE
Daniel Stenberg [Sat, 19 May 2018 09:24:33 +0000 (11:24 +0200)]
configure: replace AC_TRY_RUN with CURL_RUN_IFELSE

... and export LD_LIBRARY_PATH properly. This is a follow-up from
2d4c215.

Fixes #2586
Reported-by: Bernhard Walle
6 years agodocs: clarify CURLOPT_HTTPGET somewhat
Daniel Stenberg [Mon, 21 May 2018 08:26:24 +0000 (10:26 +0200)]
docs: clarify CURLOPT_HTTPGET somewhat

Reported-by: bsammon on github
Fixes #2590

6 years agocurl_fnmatch: only allow two asterisks for matching
Daniel Stenberg [Fri, 18 May 2018 14:48:13 +0000 (16:48 +0200)]
curl_fnmatch: only allow two asterisks for matching

The previous limit of 5 can still end up in situation that takes a very
long time and consumes a lot of CPU.

If there is still a rare use case for this, a user can provide their own
fnmatch callback for a version that allows a larger set of wildcards.

This commit was triggered by yet another OSS-Fuzz timeout due to this.
Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8369

Closes #2587

6 years agochecksrc: fix too long line
Daniel Stenberg [Fri, 18 May 2018 15:56:18 +0000 (17:56 +0200)]
checksrc: fix too long line

follow-up to e05ad5d

6 years agodocs: mention HAproxy protocol "version 1"
Aleks [Fri, 18 May 2018 15:47:47 +0000 (17:47 +0200)]
docs: mention HAproxy protocol "version 1"

...as there's also a version 2.

Closes #2579

6 years agoexamples/progressfunc: make it build on older libcurls
Daniel Stenberg [Fri, 18 May 2018 08:28:17 +0000 (10:28 +0200)]
examples/progressfunc: make it build on older libcurls

This example was changed in ce2140a8c1 to use the new microsecond based
getinfo option. This change makes it conditionally keep using the older
option so that the example still builds with older libcurl versions.

Closes #2584

6 years agostub_gssapi: fix numerous 'unused parameter' warnings
Daniel Stenberg [Thu, 17 May 2018 22:06:59 +0000 (00:06 +0200)]
stub_gssapi: fix numerous 'unused parameter' warnings

follow-up to d9e92fd9fd1d

6 years agogetinfo: add microsecond precise timers for various intervals
Philip Prindeville [Thu, 17 May 2018 11:37:36 +0000 (13:37 +0200)]
getinfo: add microsecond precise timers for various intervals

Provide a set of new timers that return the time intervals using integer
number of microseconds instead of floats.

The new info names are as following:

CURLINFO_APPCONNECT_TIME_T
CURLINFO_CONNECT_TIME_T
CURLINFO_NAMELOOKUP_TIME_T
CURLINFO_PRETRANSFER_TIME_T
CURLINFO_REDIRECT_TIME_T
CURLINFO_STARTTRANSFER_TIME_T
CURLINFO_TOTAL_TIME_T

Closes #2495

6 years agoopenssl: acknowledge --tls-max for default version too
Daniel Stenberg [Tue, 15 May 2018 08:41:25 +0000 (10:41 +0200)]
openssl: acknowledge --tls-max for default version too

... previously it only used the max setting if a TLS version was also
explicitly asked for.

Reported-by: byte_bucket
Fixes #2571
Closes #2572