Commit Graph

28037 Commits

Author SHA1 Message Date
Daniel Stenberg
4825d0cd3a
test302[12]: run only with the libssh2 backend
... as the others don't support --hostpubsha256

Reported-by: Paul Howarth
Fixes #8009
Closes #8010
2021-11-14 16:13:50 +01:00
Daniel Stenberg
f4cafa4f0d
runtests: make the SSH library a testable feature
libssh2, libssh and wolfssh
2021-11-14 16:13:44 +01:00
Jacob Hoffman-Andrews
00f4ed2aad
rustls: read of zero bytes might be okay
When we're reading out plaintext from rustls' internal buffers, we might
get a read of zero bytes (meaning a clean TCP close, including
close_notify). However, we shouldn't return immediately when that
happens, since we may have already copied out some plaintext bytes.
Break out of the loop when we get a read of zero bytes, and figure out
which path we're dealing with.

Acked-by: Kevin Burke

Closes #8003
2021-11-13 22:57:51 +01:00
Jacob Hoffman-Andrews
be8d77b146
rustls: remove incorrect EOF check
The update to rustls-ffi 0.8.0 changed handling of EOF and close_notify.
From the CHANGELOG:

> Handling of unclean close and the close_notify TLS alert. Mirroring
> upstream changes, a rustls_connection now tracks TCP closed state like
> so: rustls_connection_read_tls considers a 0-length read from its
> callback to mean "TCP stream was closed by peer."  If that happens
> before the peer sent close_notify, rustls_connection_read will return
> RUSTLS_RESULT_UNEXPECTED_EOF once the available plaintext bytes are
> exhausted. This is useful to protect against truncation attacks. Note:
> some TLS implementations don't send close_notify. If you are already
> getting length information from your protocol (e.g. Content-Length in
> HTTP) you may choose to ignore UNEXPECTED_EOF so long as the number of
> plaintext bytes was as expected.

That means we don't need to check for unclean EOF in `cr_recv()`,
because `process_new_packets()` will give us an error if appropriate.

Closes #8003
2021-11-13 22:57:20 +01:00
Daniel Stenberg
26247a0d7e
lib1939: make it endure torture tests
Follow-up to f0b7099a10

Closes #8007
2021-11-13 22:44:34 +01:00
Daniel Stenberg
ca847ba5cf
azure: make the "w/o HTTP/SMTP/IMAP" build disable SSL proper
The configure line would previously depend on a configure mistake using
--without-openssl that is fixed and now this configure line needs
adjusting to use --without-ssl.

Follow-up to b589696f03

Closes #8006
2021-11-13 14:16:48 +01:00
Jacob Hoffman-Andrews
72a63aa466
configure: add -lm to configure for rustls build.
Note: The list of libraries that rustc tells us we need to include is
longer, but also includes some more platform-specific libraries that I
am not sure how to effectively incorporate. Adding just -lm seems to
solve an immediate problem, so I'm adding just that.

Closes #8002
2021-11-13 11:14:00 +01:00
Daniel Stenberg
541adbe2d8
curl_share_setopt.3: refer to CURLSHOPT_USERDATA(3) properly 2021-11-12 15:27:04 +01:00
Daniel Stenberg
ec1d4e6466
curl_share_setopt.3: split out options into their own manpages
CURLSHOPT_LOCKFUNC.3
CURLSHOPT_SHARE.3
CURLSHOPT_UNLOCKFUNC.3
CURLSHOPT_UNSHARE.3
CURLSHOPT_USERDATA.3

Closes #7998
2021-11-12 15:14:40 +01:00
Daniel Stenberg
2989b11377
http_proxy: make Curl_connect_done() work for proxy disabled builds
... by making it an empty macro then.

Follow-up to f0b7099a10
Reported-by: Vincent Grande
Fixes #7995
Closes #7996
2021-11-12 14:48:45 +01:00
Daniel Stenberg
b89a4b5191
Curl_connect_done: handle being called twice
Follow-up to f0b7099a10

When torture testing 1021, it turns out the Curl_connect_done function
might be called twice and that previously then wrongly cleared the HTTP
pointer in the second invoke.

Closes #7999
2021-11-12 14:46:01 +01:00
Stan Hu
b589696f03
configure: don't enable TLS when --without-* flags are used
Previously specifying `--without-gnutls` would unexpectedly attempt to
compile with GnuTLS, effectively interpreting this as
`--with-gnutls`. This caused a significant amount of confusion when
`libcurl` was built with SSL disabled since GnuTLS wasn't present.

68d89f24 dropped the `--without-*` options from the configure help, but
`AC_ARG_WITH` still defines these flags automatically. As
https://www.gnu.org/software/autoconf/manual/autoconf-2.60/html_node/External-Software.html
describes, the `action-if-given` is called when the user specifies
`--with-*` or `--without-*` options.

To prevent this confusion, we make the `--without` flag do the right
thing by ignoring the value if it set to "no".

Closes #7994
2021-11-12 10:04:07 +01:00
Rikard Falkeborn
4d58a94cd8
docs/checksrc: Add documentation for STRERROR
Closes #7991
2021-11-11 15:40:14 +01:00
Daniel Stenberg
76d9e07c6b
vtls/rustls: adapt to the updated rustls_version proto
Closes #7956
2021-11-11 13:47:41 +01:00
Kevin Burke
1fef5922da
vtls/rustls: handle RUSTLS_RESULT_PLAINTEXT_EMPTY
Previously we'd return CURLE_READ_ERROR if we received this, instead
of triggering the error handling logic that's present in the next if
block down.

After this change, curl requests to https://go.googlesource.com using
HTTP/2 complete successfully.

Fixes #7949
Closes #7948
2021-11-11 13:47:34 +01:00
Kevin Burke
d5d1d59a50
zuul: update build environment for rustls-ffi 0.8.0 2021-11-11 13:47:34 +01:00
Kevin Burke
b7757c2b81
vtls/rustls: update to compile with rustls-ffi v0.8.0
Some method names, as well as the generated library name, were changed
in a recent refactoring.

Further, change the default configuration instructions to check for
Hyper in either "target/debug" or "target/release" - the latter
contains an optimized build configuration.

Fixes #7947
Closes #7948
2021-11-11 13:47:25 +01:00
Daniel Stenberg
eed7473eeb
RELEASE-NOTES: synced
and bump the version to 7.80.1
2021-11-11 09:20:11 +01:00
Daniel Stenberg
f0b7099a10
multi: shut down CONNECT in Curl_detach_connnection
... to prevent a lingering pointer that would lead to a double-free.

Added test 1939 to verify.

Reported-by: Stephen M. Coakley
Fixes #7982
Closes #7986
2021-11-11 08:42:31 +01:00
Daniel Stenberg
11a46d6d66
curl_easy_cleanup.3: remove from multi handle first
Easy handles that are used by the multi interface should be removed from
the multi handle before they are cleaned up.

Reported-by: Stephen M. Coakley
Ref: #7982
Closes #7983
2021-11-10 15:01:36 +01:00
Daniel Stenberg
0942017162
url.c: fix the SIGPIPE comment for Curl_close
Closes #7984
2021-11-10 14:50:28 +01:00
Daniel Stenberg
9e560d11aa
RELEASE-NOTES: synced
for curl 7.80.0
2021-11-10 07:32:46 +01:00
Daniel Stenberg
3c6fd76b07
THANKS: add contributors from the 7.80.0 cycle 2021-11-10 07:32:46 +01:00
Tatsuhiro Tsujikawa
9db25d213b
ngtcp2: advertise h3 as well as h3-29
Advertise h3 as well as h3-29 since some servers out there require h3
for QUIC v1.

Closes #7979
2021-11-09 11:46:12 +01:00
Tatsuhiro Tsujikawa
10bc426dd2
ngtcp2: use QUIC v1 consistently
Since we switched to v1 quic_transport_parameters codepoint in #7960
with quictls, lets use QUIC v1 consistently.

Closes #7979
2021-11-09 11:45:41 +01:00
Tatsuhiro Tsujikawa
d9d842989c
ngtcp2: compile with the latest nghttp3
Closes #7978
2021-11-09 11:40:00 +01:00
Marc Hoersken
b3e1ed3160
tests: add Schannel-specific tests and disable unsupported ones
Adds Schannel variants of SSLpinning tests that include the option
--ssl-revoke-best-effort to ignore certificate revocation check
failures which is required due to our custom test CA certificate.

Disable the original variants if the Schannel backend is enabled.

Also skip all IDN tests which are broken while using an msys shell.

This is a step to simplify test exclusions for Windows and MinGW.

Reviewed-by: Jay Satiro
Reviewed-by: Marcel Raad
Reviewed-by: Daniel Stenberg
Closes #7968
2021-11-09 06:34:33 +01:00
Daniel Stenberg
f2665f4e75
docs: NAME fixes in easy option man pages
Closes #7975
2021-11-08 23:10:49 +01:00
Roger Young
ef99e24886
ftp: make the MKD retry to retry once per directory
Reported-by: Roger Young
Fixes #7967
Closes #7976
2021-11-08 23:05:12 +01:00
Daniel Stenberg
351b181740
tool_operate: reorder code to avoid compiler warning
tool_operate.c(889) : warning C4701: potentially uninitialized local
variable 'per' use

Follow-up to cc71d35265
Reported-by: Marc Hörsken
Bug: https://github.com/curl/curl/pull/7922#issuecomment-963042676
Closes #7971
2021-11-08 16:51:01 +01:00
Daniel Stenberg
5c1e1d9aa4
curl_easy_perform.3: add a para about recv and send data
Reported-by: Godwin Stewart
Fixes #7973
Closes #7974
2021-11-08 16:13:42 +01:00
Daniel Stenberg
9e9fef9e24
tool_operate: fclose stream only if fopened
Fixes torture test failures
Follow-up to cc71d35265

Closes #7972
2021-11-08 14:54:03 +01:00
Daniel Stenberg
ef7c76ad82
libcurl-easy.3: language polish 2021-11-08 14:43:13 +01:00
Daniel Stenberg
f03778ffae
limit-rate.d: this is average over several seconds
Closes #7970
2021-11-08 09:44:13 +01:00
Daniel Stenberg
a28464ae77
docs: reduce/avoid English contractions
You're => You are
Hasn't => Has not
Doesn't => Does not
Don't => Do not
You'll => You will
etc

Closes #7930
2021-11-07 23:16:27 +01:00
Daniel Stenberg
d3d079c138
tool_operate: fix torture leaks with etags
Spotted by torture testing 343 344 345 347.

Follow-up from cc71d35265
Pointed-out-by: Dan Fandrich

Closes #7969
2021-11-06 22:54:08 +01:00
Amaury Denoyelle
d1624b94f0
ngtcp2: support latest QUIC TLS RFC9001
QUIC Transport Parameters Extension has been changed between draft-29
and latest RFC9001. Most notably, its identifier has been updated from
0xffa5 to 0x0039. The version is selected through the QUIC TLS library
via the legacy codepoint.

Disable the usage of legacy codepoint in curl to switch to latest
RFC9001. This is required to be able to keep up with latest QUIC
implementations.

Acked-by: Tatsuhiro Tsujikawa
Closes #7960
2021-11-05 10:42:46 +01:00
Daniel Stenberg
eccaa83cee
test1173: make manpage-syntax.pl spot \n errors in examples 2021-11-05 08:28:30 +01:00
Daniel Stenberg
38ecb56df5
man pages: fix backslash-n in examples
... to be proper backslash-backslash-n sequences to render nicely in man
and on website.

Follow-up to 24155569d8
Reported-by: Sergey Markelov

Fixes https://github.com/curl/curl-www/issues/163
Closes #7962
2021-11-05 08:28:29 +01:00
Daniel Stenberg
16b135cae9
scripts/release-notes.pl: use out of repo links verbatim in refs 2021-11-05 00:09:51 +01:00
Daniel Stenberg
cc71d35265
tool_operate: a failed etag save now only fails that transfer
When failing to create the output file for saving an etag, only fail
that particular single transfer and allow others to follow.

In a serial transfer setup, if no transfer at all is done due to them
all being skipped because of this error, curl will output an error
message and return exit code 26.

Added test 369 and 370 to verify.

Reported-by: Earnestly on github
Ref: #7942
Closes #7945
2021-11-04 13:56:15 +01:00
Kevin Burke
c844358299
.github: retry macos "brew install" command on failure
Previously we saw errors attempting to run "brew install", see
https://github.com/curl/curl/runs/4095721123?check_suite_focus=true for
an example, since this command is idempotent, it is safe to run again.

Closes #7955
2021-11-04 13:55:03 +01:00
Daniel Stenberg
c6a66ccb5f
CURLOPT_ALTSVC_CTRL.3: mention conn reuse is preferred
Ref: https://github.com/curl/curl/discussions/7954

Closes #7957
2021-11-04 13:53:13 +01:00
Daniel Stenberg
57370855d0
RELEASE-NOTES: synced 2021-11-03 23:27:53 +01:00
Daniel Stenberg
2f5049ae02
zuul: pin the quiche build to use an older cmake-rs
The latest cmake-rs assumes cmake's --parallel works. That was added in
cmake 3.12, but a lot of our CI builds run on Ubuntu Bionic which only
has cmake 3.10.

Fixes #7927
Closes #7952
2021-11-03 23:22:39 +01:00
Marc Hoersken
45a7821eef
Revert "src/tool_filetime: disable -Wformat on mingw for this file"
This reverts commit 7c88fe375b.

Follow up to #6535 as the pragma is obsolete with warnf

Closes #7941
2021-11-03 08:44:41 +01:00
Jay Satiro
90e74206b9 schannel: fix memory leak due to failed SSL connection
- Call schannel_shutdown if the SSL connection fails.

Prior to this change schannel_shutdown (which shuts down the SSL
connection as well as memory cleanup) was not called when the SSL
connection failed (eg due to failed handshake).

Co-authored-by: Gisle Vanem

Fixes https://github.com/curl/curl/issues/7877
Closes https://github.com/curl/curl/pull/7878
2021-11-02 15:34:04 -04:00
Daniel Stenberg
f5ee9cf5ba
Curl_updateconninfo: store addresses for QUIC connections too
So that CURLINFO_PRIMARY_IP etc work for HTTP/3 like for other HTTP
versions.

Reported-by: Jerome Mao
Fixes #7939
Closes #7944
2021-11-02 17:57:04 +01:00
Sergio Durigan Junior
a06ce29482
curl.1: fix typos in the manpage
s/transfering/transferring/
s/transfered/transferred/

Signed-off-by: Sergio Durigan Junior <sergiodj@sergiodj.net>
Closes #7937
2021-11-01 22:58:37 +01:00
Marc Hoersken
d52316e460
tests/smbserver.py: fix compatibility with impacket 0.9.23+
impacket now performs sanity checks if the requested and to
be served file path actually is inside the real share path.

Ref: https://github.com/SecureAuthCorp/impacket/pull/1066

Fixes #7924
Closes #7935
2021-11-01 20:50:35 +01:00