Commit Graph

27848 Commits

Author SHA1 Message Date
Daniel Stenberg
3723ba62a5
tests: disable test 2043
It uses revoked.badssl.com which now is expired and therefor this now
permafails. We should not use external sites for tests, this test should
be converted to use our own infra.

Closes #7845
2021-10-13 00:02:30 +02:00
Daniel Stenberg
8a534f8838
runtests: split out ignored tests
Report ignore tests separately from the actual fails.

Don't exit non-zero if test servers couldn't get killed.

Assisted-by: Jay Satiro

Fixes #7818
Closes #7841
2021-10-12 17:00:50 +02:00
Daniel Stenberg
1fed8feaf1
http2: make getsock not wait for write if there's no remote window
While uploading, check for remote window availability in the getsock
function so that we don't wait for a writable socket if no data can be
sent.

Reported-by: Steini2000 on github
Fixes #7821
Closes #7839
2021-10-12 11:19:22 +02:00
Daniel Stenberg
e38d2e5a50
test368: verify dash is appended for "-r [num]"
Follow-up to 8758a26f88
2021-10-11 22:52:30 +02:00
Борис Верховский
8758a26f88
curl: actually append "-" to --range without number only
Closes #7837
2021-10-11 22:51:13 +02:00
Daniel Stenberg
1edc423883
RELEASE-NOTES: synced 2021-10-11 17:14:16 +02:00
Daniel Stenberg
9a8564a920
urlapi: URL decode percent-encoded host names
The host name is stored decoded and can be encoded when used to extract
the full URL. By default when extracting the URL, the host name will not
be URL encoded to work as similar as possible as before. When not URL
encoding the host name, the '%' character will however still be encoded.

Getting the URL with the CURLU_URLENCODE flag set will percent encode
the host name part.

As a bonus, setting the host name part with curl_url_set() no longer
accepts a name that contains space, CR or LF.

Test 1560 has been extended to verify percent encodings.

Reported-by: Noam Moshe
Reported-by: Sharon Brizinov
Reported-by: Raul Onitza-Klugman
Reported-by: Kirill Efimov
Fixes #7830
Closes #7834
2021-10-11 17:04:14 +02:00
Marc Hoersken
ab1671cafe
CI/makefiles: introduce dedicated test target
Make it easy to use the same set of test flags
throughout all current and future CI builds.

Reviewed-by: Jay Satiro

Follow up to #7690
Closes #7785
2021-10-08 20:16:15 +02:00
Daniel Stenberg
aceff6088c
maketgz: redirect updatemanpages.pl output to /dev/null 2021-10-08 15:16:34 +02:00
Daniel Stenberg
33882a066e
CURLOPT_HTTPHEADER.3: add descripion for specific headers
Settting Host: or Transfer-Encoding: chunked actually have special
meanings to libcurl. This change tries to document them

Closes #7829
2021-10-08 15:15:30 +02:00
Daniel Stenberg
4e0c28923a
c-hyper: use hyper_request_set_uri_parts to make h2 better
and make sure to not send Host: over h2.

Fixes #7679
Reported-by: David Cook
Closes #7827
2021-10-08 15:14:29 +02:00
Michael Afanasiev
9597d2def7
curl-openssl.m4: modify library order for openssl linking
lcrypto may depend on lz, and configure corrently fails with when
statically linking as the order is "-lz -lcrypto". This commit switches
the order to "-lcrypto -lz".

Closes #7826
2021-10-08 10:50:57 +02:00
Marcel Raad
94696e1b51 sha256: use high-level EVP interface for OpenSSL
Available since OpenSSL 0.9.7. The low-level SHA256 interface is
deprecated in OpenSSL v3, and its usage was discouraged even before.

Closes https://github.com/curl/curl/pull/7808
2021-10-07 18:41:27 +02:00
Marcel Raad
802d864450 curl_ntlm_core: use OpenSSL only if DES is available
This selects another SSL backend then if available, or otherwise at
least gives a meaningful error message.

Closes https://github.com/curl/curl/pull/7808
2021-10-07 18:41:23 +02:00
Marcel Raad
b352e03ec8 md5: fix compilation with OpenSSL 3.0 API
Only use OpenSSL's MD5 code if it's available.

Also fix wolfSSL build with `NO_MD5`, in which case neither the
wolfSSL/OpenSSL implementation nor the fallback implementation was
used.

Closes https://github.com/curl/curl/pull/7808
2021-10-07 18:40:03 +02:00
Daniel Stenberg
8dd0f1aa46
print_category: printf %*s needs an int argument
... not a size_t!

Detected by Coverity: CID 1492331.
Closes #7823
2021-10-07 11:15:12 +02:00
Jay Satiro
5044909ca2 version_win32: use actual version instead of manifested version
- Use RtlVerifyVersionInfo instead of VerifyVersionInfo, when possible.

Later versions of Windows have normal version functions that compare and
return versions based on the way the application is manifested, instead
of the actual version of Windows the application is running on. We
prefer the actual version of Windows so we'll now call the Rtl variant
of version functions (RtlVerifyVersionInfo) which does a proper
comparison of the actual version.

Reported-by: Wyatt O'Day

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

Fixes https://github.com/curl/curl/issues/7742
Closes https://github.com/curl/curl/pull/7810
2021-10-07 03:18:22 -04:00
Daniel Stenberg
a031614a84
RELEASE-NOTES: synced 2021-10-06 22:52:09 +02:00
Daniel Stenberg
87907d56f0
http: fix Basic auth with empty name field in URL
Add test 367 to verify.

Reported-by: Rick Lane
Fixes #7819
Closes #7820
2021-10-06 22:45:52 +02:00
Jeffrey Tolar
5f563495f1
CURLOPT_MAXLIFETIME_CONN: maximum allowed lifetime for conn reuse
... and close connections that are too old instead of reusing them.

By default, this behavior is disabled.

Bug: https://curl.se/mail/lib-2021-09/0058.html
Closes #7751
2021-10-06 14:38:59 +02:00
Daniel Gustafsson
013cb2ff7d docs/examples: add missing binaries to gitignore
Commit f65d7889b added getreferrer, and commit ae8e11ed5 multi-legacy,
both of which missed adding .gitignore clauses for the built binaries.

Closes #7817
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
2021-10-06 10:46:00 +02:00
Josip Medved
2ac10a9ea0
HTTP3: fix the HTTP/3 Explained book link
Closes #7813
2021-10-05 08:40:24 +02:00
Lucas Holt
18480f71be
misc: fix a few issues on MidnightBSD
Closes #7812
2021-10-05 08:35:24 +02:00
8U61ife
5ce380d65a tool_main: fix typo in comment
Closes: #7811
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
2021-10-04 23:38:58 +02:00
Ryan Mast
a232788ad8
BINDINGS: URL updates
For cpr, BBHTTP, Eiffel, Harbour, Haskell, Mono, and Rust

Closes #7809
2021-10-04 22:44:38 +02:00
Daniel Stenberg
343644fc32
scripts/delta: hide a git error message we don't care about
fatal: path 'src/tool_listhelp.c' exists on disk, but not in [tag]
2021-10-02 23:36:51 +02:00
Patrick Monnerat
3e2c1dcda8
sasl: binary messages
Capabilities of sasl module are extended to exchange messages in binary
as an alternative to base64.

If http authentication flags have been set, those are used as sasl
default preferred mechanisms.

Closes #6930
2021-10-02 23:30:37 +02:00
Hayden Roche
e12dc2dd97
wolfssl: use for SHA256, MD4, MD5, and setting DES odd parity
Prior to this commit, OpenSSL could be used for all these functions, but
not wolfSSL. This commit makes it so wolfSSL will be used if USE_WOLFSSL
is defined.

Closes #7806
2021-10-02 13:55:31 +02:00
Daniel Stenberg
8bb5f4ddf3
scripts/delta: count command line options in the new file
... which makes the shown delta number wrong until next release.
2021-10-01 08:49:12 +02:00
Daniel Stenberg
147c39b99c
RELEASE-NOTES: synced 2021-10-01 08:46:30 +02:00
Daniel Stenberg
24ffdc8826
print_category: print help descriptions aligned
Adjust the description position to make an aligned column when doing
help listings, which is more pleasing to the eye.

Suggested-by: Gisle Vanem
Closes #7792
2021-10-01 08:35:59 +02:00
Daniel Stenberg
85f91248cf
lib/mk-ca-bundle.pl: skip certs passed Not Valid After date
With this change applied, the now expired 'DST Root CA X3' cert will no
longer be included in the output.

Details: https://letsencrypt.org/docs/dst-root-ca-x3-expiration-september-2021/

Closes #7801
2021-09-30 23:37:55 +02:00
Daniel Stenberg
ffb634d4ef
tool_listhelp: easier to generate with gen.pl
tool_listhelp.c is now a separate file with only the command line --help
output, exactly as generated by gen.pl. This makes it easier to generate
updates according to what's in the docs/cmdline-opts docs.

  cd $srcroot/docs/cmdline-opts
  ./gen.pl listhelp *.d > $srcroot/src/tool_listhelp.c

With a configure build, this also works:

  make -C src listhelp

Closes #7787
2021-09-30 17:50:48 +02:00
Anthony Hu
d10a0af2f3
wolfssl: allow setting of groups/curves
In particular, the quantum safe KEM and hybrid curves if wolfSSL is
built to support them.

Closes #7728
2021-09-30 17:28:56 +02:00
Jan Mazur
0fe9018e1a
connnect: use sysaddr_un fron sys/un.h or custom-defined for windows
Closes #7737
2021-09-30 12:27:47 +02:00
Rikard Falkeborn
5de119d0b8 hostip: Move allocation to clarify there is no memleak
By just glancing at the code, it looks like there is a memleak if the
call to Curl_inet_pton() fails. Looking closer, it is clear that the
call to Curl_inet_pton() can not fail, so the code will never leak
memory. However, we can make this obvious by moving the allocation
after the if-statement.

Closes https://github.com/curl/curl/pull/7796
2021-09-30 03:27:46 -04:00
Daniel Stenberg
0b2260b036
gen.pl: make the output date format work better
Follow-up to 15910dfd14

The previous strftime format used didn't work correctly on Windows, so
change to %B %d %Y which today looks like "September 29 2021".

Reported-by: Gisle Vanem
Bug: #7782
Closes #7793
2021-09-30 09:15:34 +02:00
Daniel Stenberg
f870715114
typecheck-gcc.h: add CURLOPT_PREREQDATA awareness
Follow-up to a517378de5

To make test 1912 happy again

Closes #7799
2021-09-30 09:00:37 +02:00
Marcel Raad
e2b3f9eaea configure: remove HAVE_WINSOCK_H definition
It's not used anymore.

Closes https://github.com/curl/curl/pull/7795
2021-09-29 15:54:40 +02:00
Marcel Raad
2bde1774ff CMake: remove HAVE_WINSOCK_H definition
It's not used anymore.

Closes https://github.com/curl/curl/pull/7795
2021-09-29 15:54:36 +02:00
Marcel Raad
60300291fd config: remove HAVE_WINSOCK_H definition
It's not used anymore.

Closes https://github.com/curl/curl/pull/7795
2021-09-29 15:54:33 +02:00
Marcel Raad
0259e8c35f lib: remove HAVE_WINSOCK_H usage
WinSock v1 is not supported anymore. Exclusively use `HAVE_WINSOCK2_H`
instead.

Closes https://github.com/curl/curl/pull/7795
2021-09-29 15:54:31 +02:00
Daniel Stenberg
f53b89314d
easyoptions: add the two new PRE* options
Follow-up to a517378de5

Also fix optiontable.pl to do the correct remainder on the entry.

Reported-by: Gisle Vanem
Bug: a517378de5 (commitcomment-57224830)
Closes #7791
2021-09-29 14:48:02 +02:00
Daniel Stenberg
180180a44d
Revert "build: remove checks for WinSock 1"
Due to CI issues

This reverts commit c2ea04f92b.

Closes #7790
2021-09-29 10:42:49 +02:00
Daniel Gustafsson
12246eddc5 lib: avoid fallthrough cases in switch statements
Commit b5a434f7f0 inhibits the warning
on implicit fallthrough cases, since the current coding of indicating
fallthrough with comments is falling out of fashion with new compilers.
This attempts to make the issue smaller by rewriting fallthroughs to no
longer fallthrough, via either breaking the cases or turning switch
statements into if statements.

  lib/content_encoding.c: the fallthrough codepath is simply copied
    into the case as it's a single line.
  lib/http_ntlm.c: the fallthrough case skips a state in the state-
    machine and fast-forwards to NTLMSTATE_LAST. Do this before the
    switch statement instead to set up the states that we actually
    want.
  lib/http_proxy.c: the fallthrough is just falling into exiting the
    switch statement which can be done easily enough in the case.
  lib/mime.c: switch statement rewritten as if statement.
  lib/pop3.c: the fallthrough case skips to the next state in the
    statemachine, do this explicitly instead.
  lib/urlapi.c: switch statement rewritten as if statement.
  lib/vssh/wolfssh.c: the fallthrough cases fast-forwards the state
    machine, do this by running another iteration of the switch
    statement instead.
  lib/vtls/gtls.c: switch statement rewritten as if statement.
  lib/vtls/nss.c: the fallthrough codepath is simply copied into the
    case as it's a single line. Also twiddle a comment to not be
    inside a non-brace if statement.

Closes: #7322
See-also: #7295
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
2021-09-29 10:00:52 +02:00
Marcel Raad
2b7e56aab3
config-win32ce: enable WinSock 2
WinSock 2.2 is supported by Windows CE .NET 4.1 (from 2002, out of
support since 2013).

Ref: https://docs.microsoft.com/en-us/previous-versions/windows/embedded/ms899586(v=msdn.10)

Closes https://github.com/curl/curl/pull/7778
2021-09-28 19:29:30 +02:00
Marcel Raad
7a0c160473
externalsocket: use WinSock 2.2
That's the only version we support.

Closes https://github.com/curl/curl/pull/7778
2021-09-28 19:29:29 +02:00
Marcel Raad
c2ea04f92b
build: remove checks for WinSock 1
It's not supported anymore.

Closes https://github.com/curl/curl/pull/7778
2021-09-28 19:29:27 +02:00
Daniel Stenberg
acfe94c08f
scripts/copyright: .muse is .lift now
And update 5 files with old copyright year range
2021-09-28 16:42:18 +02:00
Daniel Stenberg
ce6e3e5320
cmdline-opts: made the 'Added:' field mandatory
Since "too old" versions are no longer included in the generated man
page, this field is now mandatory so that it won't be forgotten and then
not included in the documentation.

Closes #7786
2021-09-28 16:20:12 +02:00