]> granicus.if.org Git - curl/log
curl
6 years agovtls: add a MesaLink vtls backend
Yiming Jing [Mon, 10 Sep 2018 20:08:21 +0000 (13:08 -0700)]
vtls: add a MesaLink vtls backend

Closes #2984

6 years agoconfigure.ac: add a MesaLink vtls backend
Yiming Jing [Mon, 10 Sep 2018 20:07:40 +0000 (13:07 -0700)]
configure.ac: add a MesaLink vtls backend

6 years agocurl_url_set.3: properly escape \n in example code
Dave Reisner [Mon, 10 Sep 2018 13:39:33 +0000 (09:39 -0400)]
curl_url_set.3: properly escape \n in example code

This yields

  "the scheme is %s\n"

instead of

  "the scheme is %s0

Closes #2970

6 years agocurl_url_set.3: fix typo in reference to CURLU_APPENDQUERY
Dave Reisner [Mon, 10 Sep 2018 13:38:46 +0000 (09:38 -0400)]
curl_url_set.3: fix typo in reference to CURLU_APPENDQUERY

6 years agourlglob: improve error message
Daniel Stenberg [Tue, 11 Sep 2018 20:03:47 +0000 (22:03 +0200)]
urlglob: improve error message

to help user understand what the problem is

Reported-by: Daniel Shahaf
Fixes #2763
Closes #2977

6 years agotests/certs: rebuild certs with 2048-bit RSA keys
Yiming Jing [Mon, 10 Sep 2018 18:32:23 +0000 (11:32 -0700)]
tests/certs: rebuild certs with 2048-bit RSA keys

The previous test certificates contained RSA keys of only 1024 bits.
However, RSA claims that 1024-bit RSA keys are likely to become
crackable some time before 2010. The NIST recommends at least 2048-bit
keys for RSA for now.

Better use full 2048 also for testing.

Closes #2973

6 years agoTODO: fix typo in item
Daniel Gustafsson [Wed, 12 Sep 2018 11:12:15 +0000 (13:12 +0200)]
TODO: fix typo in item

Closes #2968
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
6 years agoanyauthput: fix compiler warning on 64-bit Windows
Marcel Raad [Mon, 10 Sep 2018 19:10:38 +0000 (21:10 +0200)]
anyauthput: fix compiler warning on 64-bit Windows

On Windows, the read function from <io.h> is used, which has its byte
count parameter as unsigned int instead of size_t.

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

6 years agolib: fix gcc8 warning on Windows
Viktor Szakats [Wed, 12 Sep 2018 08:52:40 +0000 (08:52 +0000)]
lib: fix gcc8 warning on Windows

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

6 years agoopenssl: fix gcc8 warning
Jay Satiro [Wed, 12 Sep 2018 07:14:20 +0000 (03:14 -0400)]
openssl: fix gcc8 warning

- Use memcpy instead of strncpy to copy a string without termination,
  since gcc8 warns about using strncpy to copy as many bytes from a
  string as its length.

Suggested-by: Viktor Szakats
Closes https://github.com/curl/curl/issues/2980

6 years agolibcurl-url.3: overview man page for the URL API
Daniel Stenberg [Mon, 10 Sep 2018 08:09:18 +0000 (10:09 +0200)]
libcurl-url.3: overview man page for the URL API

Closes #2967

6 years agoexample/asiohiper: insert warning comment about its status
Daniel Stenberg [Mon, 10 Sep 2018 15:42:39 +0000 (17:42 +0200)]
example/asiohiper: insert warning comment about its status

This example is simply not working correctly but there's nobody around
with the skills and energy to fix it.

Closes #2407

6 years agodocs/cmdline-opts: update the documentation of --tlsv1.0
Kamil Dudka [Fri, 7 Sep 2018 14:50:45 +0000 (16:50 +0200)]
docs/cmdline-opts: update the documentation of --tlsv1.0

... to reflect the changes in 6015cefb1b2cfde4b4850121c42405275e5e77d9

Closes #2955

6 years agodocs/examples: do not wait when no transfers are running
Kamil Dudka [Fri, 7 Sep 2018 14:15:24 +0000 (16:15 +0200)]
docs/examples: do not wait when no transfers are running

Closes #2948

6 years agocookies: Move failure case label to end of function
Daniel Gustafsson [Sun, 9 Sep 2018 22:20:34 +0000 (00:20 +0200)]
cookies: Move failure case label to end of function

Rather than jumping backwards to where failure cleanup happens
to be performed, move the failure case to end of the function
where it is expected per existing coding convention.

Closes #2965

6 years agomisc: fix typos in comments
Daniel Gustafsson [Sun, 9 Sep 2018 19:29:39 +0000 (21:29 +0200)]
misc: fix typos in comments

Closes #2963

6 years agocookies: fix leak when writing cookies to file
Daniel Gustafsson [Sat, 8 Sep 2018 20:23:33 +0000 (22:23 +0200)]
cookies: fix leak when writing cookies to file

If the formatting fails, we error out on a fatal error and
clean up on the way out. The array was however freed within
the wrong scope and was thus never freed in case the cookies
were written to a file instead of STDOUT.

Closes #2957

6 years agocookies: Remove redundant expired check
Daniel Gustafsson [Sun, 9 Sep 2018 06:52:04 +0000 (08:52 +0200)]
cookies: Remove redundant expired check

Expired cookies have already been purged at a later expiration time
before this check, so remove the redundant check.

closes #2962

6 years agontlm_wb: bail out if the response gets overly large
Daniel Stenberg [Sat, 8 Sep 2018 21:03:53 +0000 (23:03 +0200)]
ntlm_wb: bail out if the response gets overly large

Exit the realloc() loop if the response turns out ridiculously large to
avoid worse problems.

Reported-by: Harry Sintonen
Closes #2959

6 years agourl.c: fix comment typo and indentation
Daniel Gustafsson [Sat, 8 Sep 2018 21:05:21 +0000 (23:05 +0200)]
url.c: fix comment typo and indentation

Closes #2960

6 years agourlapi: avoid derefencing a possible NULL pointer
Daniel Stenberg [Sat, 8 Sep 2018 20:57:36 +0000 (22:57 +0200)]
urlapi: avoid derefencing a possible NULL pointer

Coverity CID 1439134

6 years agoRELEASE-NOTES: synced
Daniel Stenberg [Sat, 8 Sep 2018 20:45:45 +0000 (22:45 +0200)]
RELEASE-NOTES: synced

6 years agotest324: fix after 3f3b26d6feb0667714902e836af608094235fca2
Marcel Raad [Sat, 8 Sep 2018 20:30:28 +0000 (22:30 +0200)]
test324: fix after 3f3b26d6feb0667714902e836af608094235fca2

The expected error code is now 60. 51 is dead.

6 years agocurl_url_set.3: correct description
Daniel Stenberg [Sat, 8 Sep 2018 17:39:57 +0000 (19:39 +0200)]
curl_url_set.3: correct description

6 years agocurl_url-docs: fix AVAILABILITY as Added in curl 7.62.0
Daniel Stenberg [Sat, 8 Sep 2018 14:02:25 +0000 (16:02 +0200)]
curl_url-docs: fix AVAILABILITY as Added in curl 7.62.0

6 years agoURL-API
Daniel Stenberg [Sun, 5 Aug 2018 09:51:07 +0000 (11:51 +0200)]
URL-API

See header file and man pages for API. All documented API details work
and are tested in the 1560 test case.

Closes #2842

6 years agocurl_easy_upkeep: removed 'conn' from the name
Daniel Stenberg [Fri, 7 Sep 2018 08:28:57 +0000 (10:28 +0200)]
curl_easy_upkeep: removed 'conn' from the name

... including the associated option.

Fixes #2951
Closes #2952

6 years agoupkeep: add a connection upkeep API: curl_easy_conn_upkeep()
Max Dymond [Wed, 18 Apr 2018 15:40:17 +0000 (16:40 +0100)]
upkeep: add a connection upkeep API: curl_easy_conn_upkeep()

Add functionality so that protocols can do custom keepalive on their
connections, when an external API function is called.

Add docs for the new options in 7.62.0

Closes #1641

6 years agoconfigure: add option to disable automatic OpenSSL config loading
Philipp Waehnert [Wed, 25 Jul 2018 09:00:15 +0000 (11:00 +0200)]
configure: add option to disable automatic OpenSSL config loading

Sometimes it may be considered a security risk to load an external
OpenSSL configuration automatically inside curl_global_init(). The
configuration option --disable-ssl-auto-load-config disables this
automatism. The Windows build scripts winbuild/Makefile.vs provide a
corresponding option ENABLE_SSL_AUTO_LOAD_CONFIG accepting a boolean
value.

Setting neither of these options corresponds to the previous behavior
loading the external OpenSSL configuration automatically.

Fixes #2724
Closes #2791

6 years agodoh: minor edits to please Coverity
Daniel Stenberg [Fri, 7 Sep 2018 07:26:08 +0000 (09:26 +0200)]
doh: minor edits to please Coverity

The gcc typecheck macros and coverity combined made it warn on the 2nd
argument for ERROR_CHECK_SETOPT(). Here's minor rearrange to please it.

Coverity CID 1439115 and CID 1439114.

6 years agoschannel: avoid switch-cases that go to default anyway
Daniel Stenberg [Thu, 6 Sep 2018 20:53:42 +0000 (22:53 +0200)]
schannel: avoid switch-cases that go to default anyway

SEC_E_APPLICATION_PROTOCOL_MISMATCH isn't defined in some versions of
mingw and would require an ifdef otherwise.

Reported-by: Thomas Glanzmann
Approved-by: Marc Hörsken
Bug: https://curl.haxx.se/mail/lib-2018-09/0020.html
Closes #2950

6 years agoimap: change from "FETCH" to "UID FETCH"
Nicklas Avén [Tue, 31 Jul 2018 11:12:18 +0000 (13:12 +0200)]
imap: change from "FETCH" to "UID FETCH"

... and add "MAILINDEX".

As described in #2789, this is a suggested solution.  Changing UID=xx to
actually get mail with UID xx and add "MAILINDEX" to get a mail with a
special index in the mail box (old behavior).  So MAILINDEX=1 gives the
first non deleted mail in the mail box.

Fixes #2789
Closes #2815

6 years agoCURLOPT_UPLOAD_BUFFERSIZE: set upload buffer size
Daniel Stenberg [Sat, 18 Aug 2018 14:17:05 +0000 (16:17 +0200)]
CURLOPT_UPLOAD_BUFFERSIZE: set upload buffer size

This is step 3 of #2888.

Fixes #2888
Closes #2896

6 years agotravis: add the DOH tests to the torture testing
Daniel Stenberg [Wed, 20 Jun 2018 20:58:13 +0000 (22:58 +0200)]
travis: add the DOH tests to the torture testing

6 years agoDOH: add test case 1650 and 2100
Daniel Stenberg [Tue, 19 Jun 2018 14:08:05 +0000 (16:08 +0200)]
DOH: add test case 1650 and 2100

6 years agocurl: --doh-url added
Daniel Stenberg [Thu, 6 Sep 2018 07:16:02 +0000 (09:16 +0200)]
curl: --doh-url added

6 years agosetopt: add CURLOPT_DOH_URL
Daniel Stenberg [Thu, 6 Sep 2018 07:16:02 +0000 (09:16 +0200)]
setopt: add CURLOPT_DOH_URL

Closes #2668

6 years agossl: deprecate CURLE_SSL_CACERT in favour of a unified error code
Han Han [Wed, 22 Aug 2018 18:13:32 +0000 (11:13 -0700)]
ssl: deprecate CURLE_SSL_CACERT in favour of a unified error code

Long live CURLE_PEER_FAILED_VERIFICATION

6 years agox509asn1: return CURLE_PEER_FAILED_VERIFICATION on failure to parse cert
Han Han [Mon, 20 Aug 2018 22:10:40 +0000 (15:10 -0700)]
x509asn1: return CURLE_PEER_FAILED_VERIFICATION on failure to parse cert

CURLE_PEER_FAILED_VERIFICATION makes more sense because Curl_parseX509
does not allocate memory internally as its first argument is a pointer
to the certificate structure. The same error code is also returned by
Curl_verifyhost when its call to Curl_parseX509 fails so the change
makes error handling more consistent.

6 years agoopenssl: return CURLE_PEER_FAILED_VERIFICATION on failure to parse issuer
Han Han [Thu, 16 Aug 2018 19:41:31 +0000 (12:41 -0700)]
openssl: return CURLE_PEER_FAILED_VERIFICATION on failure to parse issuer

Failure to extract the issuer name from the server certificate should
return a more specific error code like on other TLS backends.

6 years agoschannel: unified error code handling
Han Han [Thu, 16 Aug 2018 02:57:16 +0000 (19:57 -0700)]
schannel: unified error code handling

Closes #2901

6 years agodarwinssl: more specific and unified error codes
Han Han [Tue, 14 Aug 2018 23:53:18 +0000 (16:53 -0700)]
darwinssl: more specific and unified error codes

Closes #2901

6 years agoCURLOPT_DNS_USE_GLOBAL_CACHE: deprecated
Daniel Stenberg [Tue, 4 Sep 2018 22:05:46 +0000 (00:05 +0200)]
CURLOPT_DNS_USE_GLOBAL_CACHE: deprecated

Disable the CURLOPT_DNS_USE_GLOBAL_CACHE option and mark it for
deprecation and complete removal in six months.

Bug: https://curl.haxx.se/mail/lib-2018-09/0010.html
Closes #2942

6 years agourl: default to CURL_HTTP_VERSION_2TLS if built h2-enabled
Daniel Stenberg [Wed, 5 Sep 2018 12:35:57 +0000 (14:35 +0200)]
url: default to CURL_HTTP_VERSION_2TLS if built h2-enabled

Closes #2709

6 years agomultiplex: enable by default
Daniel Stenberg [Wed, 5 Sep 2018 12:35:57 +0000 (14:35 +0200)]
multiplex: enable by default

Starting 7.62.0, multiplexing is enabled by default in multi handles.

6 years agotests: add unit tests for url.c
Jim Fuller [Fri, 13 Jul 2018 15:17:19 +0000 (15:17 +0000)]
tests: add unit tests for url.c

Approved-by: Daniel Gustafsson
Closes #2937

6 years agotest1452: mark as flaky
Daniel Stenberg [Wed, 5 Sep 2018 09:36:58 +0000 (11:36 +0200)]
test1452: mark as flaky

makes it not run in the CI builds

Closes #2941

6 years agopipelining: deprecated
Daniel Stenberg [Wed, 5 Sep 2018 09:33:51 +0000 (11:33 +0200)]
pipelining: deprecated

Transparently. The related curl_multi_setopt() options all still returns
OK when pipelining is selected.

To re-enable the support, the single line change in lib/multi.c needs to
be reverted.

See docs/DEPRECATE.md

Closes #2705

6 years agoRELEASE-NOTES: start working on 7.62.0
Daniel Stenberg [Wed, 5 Sep 2018 08:22:54 +0000 (10:22 +0200)]
RELEASE-NOTES: start working on 7.62.0

6 years agoTHANKS: 7.61.1 status curl-7_61_1
Daniel Stenberg [Tue, 4 Sep 2018 21:49:50 +0000 (23:49 +0200)]
THANKS: 7.61.1 status

6 years agoRELEASE-NOTES: 7.61.1
Daniel Stenberg [Tue, 4 Sep 2018 21:49:50 +0000 (23:49 +0200)]
RELEASE-NOTES: 7.61.1

6 years agoCurl_getoff_all_pipelines: ignore unused return values
Daniel Stenberg [Tue, 4 Sep 2018 17:21:16 +0000 (19:21 +0200)]
Curl_getoff_all_pipelines: ignore unused return values

Since scan-build would warn on the dead "Dead store/Dead increment"

6 years agosftp: fix indentation
Viktor Szakats [Tue, 4 Sep 2018 14:44:47 +0000 (14:44 +0000)]
sftp: fix indentation

6 years agosftp: don't send post-qoute sequence when retrying a connection
Przemysław Tomaszewski [Tue, 4 Sep 2018 06:44:34 +0000 (08:44 +0200)]
sftp: don't send post-qoute sequence when retrying a connection

Fixes #2939
Closes #2940

6 years agourl, vtls: make CURLOPT{,_PROXY}_TLS13_CIPHERS work
Kamil Dudka [Mon, 3 Sep 2018 11:04:00 +0000 (13:04 +0200)]
url, vtls: make CURLOPT{,_PROXY}_TLS13_CIPHERS work

This is a follow-up to PR #2607 and PR #2926.

Closes #2936

6 years agotool_operate: Add http code 408 to transient list for --retry
Jay Satiro [Fri, 31 Aug 2018 19:27:54 +0000 (15:27 -0400)]
tool_operate: Add http code 408 to transient list for --retry

- Treat 408 request timeout as transient so that curl will retry the
  request if --retry was used.

Closes #2925

6 years agoopenssl: Fix setting TLS 1.3 cipher suites
Jay Satiro [Fri, 31 Aug 2018 23:46:29 +0000 (19:46 -0400)]
openssl: Fix setting TLS 1.3 cipher suites

The flag indicating TLS 1.3 cipher support in the OpenSSL backend was
missing.

Bug: https://github.com/curl/curl/pull/2607#issuecomment-417283187
Reported-by: Kamil Dudka
Closes #2926

6 years agoCurl_ntlm_core_mk_nt_hash: return error on too long password
Daniel Stenberg [Mon, 13 Aug 2018 08:35:52 +0000 (10:35 +0200)]
Curl_ntlm_core_mk_nt_hash: return error on too long password

... since it would cause an integer overflow if longer than (max size_t
/ 2).

This is CVE-2018-14618

Bug: https://curl.haxx.se/docs/CVE-2018-14618.html
Closes #2756
Reported-by: Zhaoyang Wu
6 years agohttp2: Use correct format identifier for stream_id
Rikard Falkeborn [Sat, 25 Aug 2018 19:15:47 +0000 (21:15 +0200)]
http2: Use correct format identifier for stream_id

Closes #2928

6 years agotest1148: fix precheck output
Marcel Raad [Sun, 2 Sep 2018 10:51:00 +0000 (12:51 +0200)]
test1148: fix precheck output

"precheck command error" is not very helpful.

6 years agoall: s/int/size_t cleanup
Daniel Stenberg [Fri, 31 Aug 2018 08:17:40 +0000 (10:17 +0200)]
all: s/int/size_t cleanup

Assisted-by: Rikard Falkeborn
Closes #2922

6 years agossh-libssh: use FALLTHROUGH to silence gcc8
Daniel Stenberg [Thu, 30 Aug 2018 22:10:10 +0000 (00:10 +0200)]
ssh-libssh: use FALLTHROUGH to silence gcc8

6 years agotool_operate: Fix setting proxy TLS 1.3 ciphers
Jay Satiro [Fri, 31 Aug 2018 23:40:55 +0000 (19:40 -0400)]
tool_operate: Fix setting proxy TLS 1.3 ciphers

6 years agocookies: support creation-time attribute for cookies
Daniel Gustafsson [Tue, 28 Aug 2018 09:28:50 +0000 (11:28 +0200)]
cookies: support creation-time attribute for cookies

According to RFC6265 section 5.4, cookies with equal path lengths
SHOULD be sorted by creation-time (earlier first). This adds a
creation-time record to the cookie struct in order to make cookie
sorting more deterministic. The creation-time is defined as the
order of the cookies in the jar, the first cookie read fro the
jar being the oldest. The creation-time is thus not serialized
into the jar. Also remove the strcmp() matching in the sorting as
there is no lexicographic ordering in RFC6265. Existing tests are
updated to match.

Closes #2524

6 years agoDon't use Windows path %PWD for SSH tests
Marcel Raad [Thu, 30 Aug 2018 06:35:21 +0000 (08:35 +0200)]
Don't use Windows path %PWD for SSH tests

All these tests failed on Windows because something like
sftp://%HOSTIP:%SSHPORT%PWD/
expanded to
sftp://127.0.0.1:1234c:/msys64/home/bla/curl
and then curl complained about the port number ending with a letter.

Use the original POSIX path instead of the Windows path created in
checksystem to fix this.

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

6 years agoCURLOPT_SSL_CTX_FUNCTION.3: clarify connection reuse warning
Jay Satiro [Wed, 29 Aug 2018 14:08:16 +0000 (10:08 -0400)]
CURLOPT_SSL_CTX_FUNCTION.3: clarify connection reuse warning

Reported-by: Daniel Stenberg
Closes https://github.com/curl/curl/issues/2916

6 years agoTHANKS-filter: dedup Daniel Jeliński
Daniel Stenberg [Mon, 27 Aug 2018 22:51:53 +0000 (00:51 +0200)]
THANKS-filter: dedup Daniel Jeliński

6 years agoRELEASE-NOTES: synced
Daniel Stenberg [Mon, 27 Aug 2018 21:33:45 +0000 (23:33 +0200)]
RELEASE-NOTES: synced

6 years agoCURLOPT_ACCEPT_ENCODING.3: list them comma-separated [ci skip]
Daniel Stenberg [Mon, 27 Aug 2018 09:15:21 +0000 (11:15 +0200)]
CURLOPT_ACCEPT_ENCODING.3: list them comma-separated [ci skip]

6 years agoCURLOPT_SSL_CTX_FUNCTION.3: might cause unintended connection reuse [ci skip]
Daniel Stenberg [Mon, 27 Aug 2018 06:30:57 +0000 (08:30 +0200)]
CURLOPT_SSL_CTX_FUNCTION.3: might cause unintended connection reuse [ci skip]

Added a warning!

Closes #2915

6 years agocurl: fix time-of-check, time-of-use race in dir creation
Daniel Stenberg [Fri, 24 Aug 2018 08:01:42 +0000 (10:01 +0200)]
curl: fix time-of-check, time-of-use race in dir creation

Patch-by: Jay Satiro
Detected by Coverity
Fixes #2739
Closes #2912

6 years agocmdline-opts/page-footer: fix edit mistake
Daniel Stenberg [Sat, 25 Aug 2018 21:37:00 +0000 (23:37 +0200)]
cmdline-opts/page-footer: fix edit mistake

There was a missing newline.

follow-up to a7ba60bb7250

6 years agodocs: clarify NO_PROXY env variable functionality
Daniel Stenberg [Fri, 24 Aug 2018 07:30:47 +0000 (09:30 +0200)]
docs: clarify NO_PROXY env variable functionality

Reported-by: Kirill Marchuk
Fixes #2773
Closes #2911

6 years agolib1522: fix curl_easy_setopt argument type
Marcel Raad [Fri, 24 Aug 2018 19:06:26 +0000 (21:06 +0200)]
lib1522: fix curl_easy_setopt argument type

CURLOPT_POSTFIELDSIZE is a long option.

6 years agocurl_threads: silence bad-function-cast warning
Marcel Raad [Thu, 23 Aug 2018 07:55:40 +0000 (09:55 +0200)]
curl_threads: silence bad-function-cast warning

As uintptr_t and HANDLE are always the same size, this warning is
harmless. Just silence it using an intermediate uintptr_t variable.

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

6 years agoREADME: add appveyor build badge [ci skip]
Daniel Stenberg [Fri, 24 Aug 2018 11:23:31 +0000 (13:23 +0200)]
README: add appveyor build badge [ci skip]

Closes #2913

6 years agoschannel: client certificate store opening fix
Ihor Karpenko [Thu, 23 Aug 2018 11:18:17 +0000 (14:18 +0300)]
schannel: client certificate store opening fix

1) Using CERT_STORE_OPEN_EXISTING_FLAG ( or CERT_STORE_READONLY_FLAG )
while opening certificate store would be sufficient in this scenario and
less-demanding in sense of required user credentials ( for example,
IIS_IUSRS will get "Access Denied" 0x05 error for existing CertOpenStore
call without any of flags mentioned above ),

2) as 'cert_store_name' is a DWORD, attempt to format its value like a
string ( in "Failed to open cert store" error message ) will throw null
pointer exception

3) adding GetLastError(), in my opinion, will make error message more
useful.

Bug: https://curl.haxx.se/mail/lib-2018-08/0198.html

Closes #2909

6 years agogopher: Do not translate `?' to `%09'
Leonardo Taccari [Thu, 23 Aug 2018 21:27:34 +0000 (23:27 +0200)]
gopher: Do not translate `?' to `%09'

Since GOPHER support was added in curl `?' character was automatically
translated to `%09' (`\t').

However, this behaviour does not seems documented in RFC 4266 and for
search selectors it is documented to directly use `%09' in the URL.
Apart that several gopher servers in the current gopherspace have CGI
support where `?' is used as part of the selector and translating it to
`%09' often leads to surprising results.

Closes #2910

6 years agocookie tests: treat files as text
Marcel Raad [Thu, 23 Aug 2018 11:11:20 +0000 (13:11 +0200)]
cookie tests: treat files as text

Fixes test failures because of wrong line endings on Windows.

6 years agolibcurl-thread.3: expand somewhat on the NO_SIGNAL motivation
Daniel Stenberg [Tue, 21 Aug 2018 12:52:17 +0000 (14:52 +0200)]
libcurl-thread.3: expand somewhat on the NO_SIGNAL motivation

Multi-threaded applictions basically MUST set CURLOPT_NO_SIGNAL to 1L to
avoid the risk of getting a SIGPIPE.

Either way, a multi-threaded application that uses libcurl/openssl needs
to have a signhandler for or ignore SIGPIPE on its own.

Based on discussions in #2800
Closes #2904

6 years agoRELEASE-NOTES: synced
Daniel Stenberg [Wed, 22 Aug 2018 08:52:06 +0000 (10:52 +0200)]
RELEASE-NOTES: synced

6 years agoTests: fixes for Windows
Marcel Raad [Wed, 22 Aug 2018 10:26:21 +0000 (12:26 +0200)]
Tests: fixes for Windows

- test 1268 requires unix sockets
- test 2072 must be disabled also for MSYS/MinGW

6 years agohttp2: abort the send_callback if not setup yet
Daniel Stenberg [Wed, 22 Aug 2018 07:47:22 +0000 (09:47 +0200)]
http2: abort the send_callback if not setup yet

When Curl_http2_done() gets called before the http2 data is setup all
the way, we cannot send anything and this should just return an error.

Detected by OSS-Fuzz
Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10012

6 years agohttp2: remove four unused nghttp2 callbacks
Daniel Stenberg [Tue, 21 Aug 2018 08:07:38 +0000 (10:07 +0200)]
http2: remove four unused nghttp2 callbacks

Closes #2903

6 years agox509asn1: use FALLTHROUGH
Daniel Stenberg [Tue, 21 Aug 2018 20:26:36 +0000 (22:26 +0200)]
x509asn1: use FALLTHROUGH

... as no other comments are accepted since 014ed7c22f51463

6 years agotest1148: disable if decimal separator is not point
Marcel Raad [Tue, 24 Jul 2018 21:26:45 +0000 (23:26 +0200)]
test1148: disable if decimal separator is not point

Modifying the locale with environment variables doesn't work for native
Windows applications. Just disable the test in this case if the decimal
separator is something different than a point. Use a precheck with a
small C program to achieve that.

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

6 years agoEnable more GCC warnings
Marcel Raad [Sat, 7 Jul 2018 07:00:29 +0000 (09:00 +0200)]
Enable more GCC warnings

This enables the following additional warnings:
-Wold-style-definition
-Warray-bounds=2 instead of the default 1
-Wformat=2, but only for GCC 4.8+ as Wno-format-nonliteral is not
 respected for older versions
-Wunused-const-variable, which enables level 2 instead of the default 1
-Warray-bounds also in debug mode through -ftree-vrp
-Wnull-dereference also in debug mode through
 -fdelete-null-pointer-checks

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

6 years agocurl-compilers: enable -Wimplicit-fallthrough=4 for GCC
Marcel Raad [Mon, 9 Jul 2018 16:52:05 +0000 (18:52 +0200)]
curl-compilers: enable -Wimplicit-fallthrough=4 for GCC

This enables level 4 instead of the default level 3, which of the
currently used comments only allows /* FALLTHROUGH */ to silence the
warning.

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

6 years agocurl-compilers: enable -Wbad-function-cast on GCC
Marcel Raad [Mon, 9 Jul 2018 16:43:55 +0000 (18:43 +0200)]
curl-compilers: enable -Wbad-function-cast on GCC

This warning used to be enabled only for clang as it's a bit stricter
on GCC. Silence the remaining occurrences and enable it on GCC too.

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

6 years agoconfigure: conditionally enable pedantic-errors
Marcel Raad [Mon, 9 Jul 2018 16:38:23 +0000 (18:38 +0200)]
configure: conditionally enable pedantic-errors

Enable pedantic-errors for GCC >= 5 with --enable-werror. Before GCC 5,
pedantic-errors was synonymous to -Werror=pedantic [0], which is still
the case for clang [1]. With GCC 5, it became complementary [2].

Also fix a resulting error in acinclude.m4 as main's return type was
missing, which is illegal in C99.

[0] https://gcc.gnu.org/onlinedocs/gcc-4.9.0/gcc/Warning-Options.html
[1] https://clang.llvm.org/docs/UsersManual.html#options-to-control-error-and-warning-messages
[2] https://gcc.gnu.org/onlinedocs/gcc-5.1.0/gcc/Warning-Options.html

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

6 years agoRemove unused definitions
Marcel Raad [Mon, 9 Jul 2018 16:28:26 +0000 (18:28 +0200)]
Remove unused definitions

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

6 years agox509asn1: make several functions static
Daniel Stenberg [Tue, 21 Aug 2018 07:44:22 +0000 (09:44 +0200)]
x509asn1: make several functions static

and remove the private SIZE_T_MAX define and use the generic one.

Closes #2902

6 years agoINTERNALS: require GnuTLS >= 2.11.3
Daniel Stenberg [Tue, 21 Aug 2018 08:45:20 +0000 (10:45 +0200)]
INTERNALS: require GnuTLS >= 2.11.3

Since the public pinning support was brought in e644866caf4. GnuTLS
2.11.3 was released in October 2010.

Figured out in #2890

6 years agohttp2: avoid set_stream_user_data() before stream is assigned
Daniel Stenberg [Mon, 20 Aug 2018 11:19:08 +0000 (13:19 +0200)]
http2: avoid set_stream_user_data() before stream is assigned

... before the stream is started, we have it set to -1.

Fixes #2894
Closes #2898

6 years agoSSLCERTS: improve the openssl command line
Daniel Stenberg [Mon, 20 Aug 2018 12:05:28 +0000 (14:05 +0200)]
SSLCERTS: improve the openssl command line

... for extracting certs from a live HTTPS server to make a cacerts.pem
from them.

6 years agodocs/SECURITY-PROCESS: now we name the files after the CVE id
Daniel Stenberg [Mon, 20 Aug 2018 09:49:58 +0000 (11:49 +0200)]
docs/SECURITY-PROCESS: now we name the files after the CVE id

6 years agoRELEASE-NOTES: synced
Daniel Stenberg [Sat, 18 Aug 2018 22:06:44 +0000 (00:06 +0200)]
RELEASE-NOTES: synced

6 years agoupload: change default UPLOAD_BUFSIZE to 64KB
Daniel Stenberg [Fri, 17 Aug 2018 09:36:12 +0000 (11:36 +0200)]
upload: change default UPLOAD_BUFSIZE to 64KB

To make uploads significantly faster in some circumstances.

Part 2 of #2888
Closes #2892

6 years agoupload: allocate upload buffer on-demand
Daniel Stenberg [Thu, 16 Aug 2018 22:49:37 +0000 (00:49 +0200)]
upload: allocate upload buffer on-demand

Saves 16KB on the easy handle for operations that don't need that
buffer.

Part 1 of #2888

6 years agovtls: reinstantiate engine on duplicated handles
Laurent Bonnans [Fri, 17 Aug 2018 15:39:01 +0000 (17:39 +0200)]
vtls: reinstantiate engine on duplicated handles

Handles created with curl_easy_duphandle do not use the SSL engine set
up in the original handle. This fixes the issue by storing the engine
name in the internal url state and setting the engine from its name
inside curl_easy_duphandle.

Reported-by: Anton Gerasimov
Signed-of-by: Laurent Bonnans
Fixes #2829
Closes #2833