]> granicus.if.org Git - curl/log
curl
6 years agoopenssl: make the requested TLS version the *minimum* wanted
Daniel Stenberg [Thu, 28 Jun 2018 21:24:21 +0000 (23:24 +0200)]
openssl: make the requested TLS version the *minimum* wanted

The code treated the set version as the *exact* version to require in
the TLS handshake, which is not what other TLS backends do and probably
not what most people expect either.

Reported-by: Andreas Olsson
Assisted-by: Gaurav Malhotra
Fixes #2691
Closes #2694

6 years agoRELEASE-NOTES: synced
Daniel Stenberg [Fri, 29 Jun 2018 08:31:27 +0000 (10:31 +0200)]
RELEASE-NOTES: synced

6 years agoopenssl: allow TLS 1.3 by default
Daniel Stenberg [Thu, 28 Jun 2018 21:05:05 +0000 (23:05 +0200)]
openssl: allow TLS 1.3 by default

Reported-by: Andreas Olsson
Fixes #2692
Closes #2693

6 years agoCURLINFO_TLS_SSL_PTR.3: improve the example
Adrian Peniak [Thu, 28 Jun 2018 05:56:16 +0000 (06:56 +0100)]
CURLINFO_TLS_SSL_PTR.3: improve the example

The previous example was a little bit confusing, because SSL* structure
(or other "in use" SSL connection pointer) is not accessible after the
transfer is completed, therefore working with the raw TLS library
specific pointer needs to be done during transfer.

Closes #2690

6 years agotravis: add a build using the synchronous name resolver
Daniel Stenberg [Wed, 27 Jun 2018 09:33:45 +0000 (11:33 +0200)]
travis: add a build using the synchronous name resolver

... since default uses the threaded one and we test the c-ares build
already.

Closes #2689

6 years agoconfigure: remove CURL_CHECK_NI_WITHSCOPEID too
Daniel Stenberg [Wed, 27 Jun 2018 11:52:57 +0000 (13:52 +0200)]
configure: remove CURL_CHECK_NI_WITHSCOPEID too

Since it isn't used either and requires the getnameinfo check

Follow-up to 0aeca41702d2

6 years agogetnameinfo: not used
Daniel Stenberg [Wed, 27 Jun 2018 06:20:28 +0000 (08:20 +0200)]
getnameinfo: not used

Closes #2687

6 years agoeasy_perform: use *multi_timeout() to get wait times
Daniel Stenberg [Tue, 26 Jun 2018 16:11:32 +0000 (18:11 +0200)]
easy_perform: use *multi_timeout() to get wait times

... and trim the threaded Curl_resolver_getsock() to return zero
millisecond wait times during the first three milliseconds so that
localhost or names in the OS resolver cache gets detected and used
faster.

Closes #2685

6 years agoconfigure: Add dependent libraries after crypto
Max Dymond [Tue, 26 Jun 2018 08:29:48 +0000 (09:29 +0100)]
configure: Add dependent libraries after crypto

The linker is pretty dumb and processes things left to right, keeping a
tally of symbols it hasn't resolved yet. So, we need -ldl to appear
after -lcrypto otherwise the linker won't find the dl functions.

Closes #2684

6 years agoGOVERNANCE: linkify, changed some titles
Daniel Stenberg [Wed, 27 Jun 2018 07:41:36 +0000 (09:41 +0200)]
GOVERNANCE: linkify, changed some titles

6 years agoGOVERNANCE: add maintainer details/duties
Daniel Stenberg [Wed, 27 Jun 2018 06:21:05 +0000 (08:21 +0200)]
GOVERNANCE: add maintainer details/duties

6 years agourl: check Curl_conncache_add_conn return code
Daniel Stenberg [Sun, 24 Jun 2018 21:22:35 +0000 (23:22 +0200)]
url: check Curl_conncache_add_conn return code

... it was previously unchecked in two places and thus errors could
remain undetected and cause trouble.

Closes #2681

6 years agoinclude/README: remove "hacking" advice, not the right place
Daniel Stenberg [Mon, 25 Jun 2018 13:01:12 +0000 (15:01 +0200)]
include/README: remove "hacking" advice, not the right place

6 years agoRELEASE-NOTES: synced
Daniel Stenberg [Sun, 24 Jun 2018 21:32:45 +0000 (23:32 +0200)]
RELEASE-NOTES: synced

6 years agoCURLOPT_SSL_VERIFYPEER.3: fix syntax mistake
Daniel Stenberg [Sun, 24 Jun 2018 21:18:52 +0000 (23:18 +0200)]
CURLOPT_SSL_VERIFYPEER.3: fix syntax mistake

Follow-up to b6a16afa0aa5

6 years agonetrc: use a larger buffer
Daniel Stenberg [Sat, 23 Jun 2018 19:32:22 +0000 (21:32 +0200)]
netrc: use a larger buffer

... to work with longer passwords etc. Grow it from a 256 to a 4096
bytes buffer.

Reported-by: Dario Nieuwenhuis
Fixes #2676
Closes #2680

6 years agoCURLOPT_SSL_VERIFYPEER.3: Add performance note
Patrick Schlangen [Thu, 21 Jun 2018 19:14:40 +0000 (21:14 +0200)]
CURLOPT_SSL_VERIFYPEER.3: Add performance note

Closes #2673

6 years agomulti: fix crash due to dangling entry in connect-pending list
Javier Blazquez [Sat, 23 Jun 2018 03:11:26 +0000 (20:11 -0700)]
multi: fix crash due to dangling entry in connect-pending list

Fixes #2677
Closes #2679

6 years agoConnectionExists: make sure conn->data is set when "taking" a connection
Daniel Stenberg [Thu, 21 Jun 2018 22:13:29 +0000 (00:13 +0200)]
ConnectionExists: make sure conn->data is set when "taking" a connection

Follow-up to 2c15693.

Bug #2674
Closes #2675

6 years agosystem.h: fix for gcc on 32 bit OpenServer
Kevin R. Bulgrien [Thu, 21 Jun 2018 23:00:37 +0000 (01:00 +0200)]
system.h: fix for gcc on 32 bit OpenServer

Bug: https://curl.haxx.se/mail/lib-2018-06/0100.html

6 years agocmake: allow multiple SSL backends
Raphael Gozzo [Sun, 17 Jun 2018 16:26:44 +0000 (13:26 -0300)]
cmake: allow multiple SSL backends

This will make possible to select the SSL backend (using
curl_global_sslset()) even when the libcurl is built using CMake

Closes #2665

6 years agourl: fix dangling conn->data pointer
Daniel Stenberg [Wed, 20 Jun 2018 21:00:36 +0000 (23:00 +0200)]
url: fix dangling conn->data pointer

By masking sure to use the *current* easy handle with extracted
connections from the cache, and make sure to NULLify the ->data pointer
when the connection is put into the cache to make this mistake easier to
detect in the future.

Reported-by: Will Dietz
Fixes #2669
Closes #2672

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