Commit Graph

28366 Commits

Author SHA1 Message Date
Philip H
c652621928
winbuild/README.md: fixup dead link
Closes #8597
2022-03-18 09:10:56 +01:00
Jay Satiro
acf46b1bba rtsp: don't let CSeq error override earlier errors
- When done, if an error has already occurred then don't check the
  sequence numbers for mismatch.

A sequence number may not have been received if an error occurred.

Prior to this change a sequence mismatch error would override earlier
errors. For example, a server that returns nothing would cause error
CURLE_GOT_NOTHING in Curl_http_done which was then overridden by
CURLE_RTSP_CSEQ_ERROR in rtsp_done.

Closes https://github.com/curl/curl/pull/8525
2022-03-18 03:24:37 -04:00
Jay Satiro
d3cb3be520 lib: fix some misuse of curlx_convert_wchar_to_UTF8
curlx_convert_wchar_to_UTF8 must be freed by curlx_unicodefree, but
prior to this change some uses mistakenly called free.

I've reviewed all other uses of curlx_convert_wchar_to_UTF8 and
curlx_convert_UTF8_to_wchar.

Ref: https://github.com/curl/curl/commit/1d5d0ae

Closes https://github.com/curl/curl/pull/8521
2022-03-18 03:20:03 -04:00
Jay Satiro
45cb662b87 mk-ca-bundle.pl: Use stricter logic to process the certificates
.. and bump version to 1.29.

This change makes the script properly ignore unknown blocks and
otherwise fail when Mozilla changes the certdata format in ways we
don't expect. Though this is less flexible behavior it makes it far less
likely that an invalid certificate can slip through.

Prior to this change the state machine did not always properly reset,
and it was possible that a certificate marked as invalid could then
later be marked as valid when there was conflicting trust info or
an unknown block was erroneously processed as part of the certificate.

Ref: https://github.com/curl/curl/pull/7801#pullrequestreview-768384569

Closes https://github.com/curl/curl/pull/8411
2022-03-18 03:15:44 -04:00
Marcel Raad
265c50b2f8
test375: fix line endings on Windows
Closes https://github.com/curl/curl/pull/8599
2022-03-17 14:24:14 +01:00
Daniel Stenberg
526e0ef4cb
http: reject header contents with nul bytes
They are not allowed by the protocol and allowing them risk that curl
misbehaves somewhere where C functions are used but won't work on the
full contents. Further, they are not supported by hyper and they cause
problems for the new coming headers API work.

Updated test 262 to verify and enabled it for hyper as well

Closes #8601
2022-03-17 10:17:31 +01:00
Philip H
22d33956ec
CI: Do not use buildconf. Instead, just use: autoreconf -fi
Closes #8596
2022-03-15 14:15:35 +01:00
Daniel Stenberg
94fb2417b1
RELEASE-NOTES: synced 2022-03-15 10:48:47 +01:00
Jay Satiro
9d55fb4675 libssh: Improve fix for missing SSH_S_ stat macros
- If building libcurl against an old libssh version missing SSH_S_IFMT
  and SSH_S_IFLNK then use the values from a supported version.

Prior to this change if libssh did not define SSH_S_IFMT and SSH_S_IFLNK
then S_IFMT and S_IFLNK, respectively, were used instead. The problem
with that is the user's S_ stat macros don't have the same values across
platforms. For example Windows has values different from Linux.

Follow-up to 7b0fd39.

Ref: https://github.com/curl/curl/pull/8511#discussion_r815292391
Ref: https://github.com/curl/curl/pull/8574

Closes https://github.com/curl/curl/pull/8588
2022-03-14 03:31:20 -04:00
Marc Hoersken
8b42d7b9d4
tool and tests: force flush of all buffers at end of program
On Windows data can be lost in buffers in case of abnormal program
termination, especially in process chains as seen due to flaky tests.
Therefore flushing all buffers manually should avoid this data loss.

In the curl tool we play the safe game by only flushing write buffers,
but in the testsuite where we manage all buffers, we flush everything.

This should drastically reduce Windows CI and testsuite flakiness.

Reviewed-by: Daniel Stenberg

Supersedes #7833 and #6064
Closes #8516
2022-03-13 13:29:28 +01:00
Jan Venekamp
3b4a353025
BearSSL: add CURLOPT_SSL_CTX_FUNCTION support
Closes #8478
2022-03-12 23:03:37 +01:00
Jan Venekamp
f5d79619b1
BearSSL: add CURLOPT_SSL_CIPHER_LIST support
Closes #8477
2022-03-12 22:59:45 +01:00
Dan Fandrich
3055c4c814 tool_cb_hdr: Turn the Location: into a terminal hyperlink
This turns even relative URLs into clickable hyperlinks in a supported
terminal when --styled-output is enabled. Many terminals already turn
URLs into clickable links but there is not enough information in a
relative URL to do this automatically otherwise.
2022-03-11 17:25:35 -08:00
Dan Fandrich
68b356a1b4 keepalive-time.d: It takes many probes to detect brokenness 2022-03-11 17:13:25 -08:00
HexTheDragon
1831a6e7f1
curl: add --no-clobber
Does not overwrite output files if they already exist

Closes #7708
Co-authored-by: Daniel Stenberg
2022-03-11 08:38:01 +01:00
Daniel Stenberg
eed2e8e257
RELEASE-NOTES: synced
also bump next pending version to become 7.83.0
2022-03-11 08:00:56 +01:00
Jean-Philippe Menil
680245cd39
openssl: check SSL_get_peer_cert_chain return value
Signed-off-by: Jean-Philippe Menil <jpmenil@gmail.com>
Closes #8579
2022-03-11 07:45:35 +01:00
Jay Satiro
e87c53d7ea
mk-ca-bundle.vbs: delete this script in favor of mk-ca-bundle.pl
mk-ca-bundle.vbs is a Windows-specific script for Mozilla certificate
extraction, similar to mk-ca-bundle.pl which runs on any platform. The
vbs version has not been maintained while the perl version has been
maintained with improvements and security fixes. I don't think it's
worth the work to maintain both versions. Windows users should be able
to use mk-ca-bundle.pl without any problems, as long as they have perl.

Closes #8412
2022-03-10 23:18:40 +01:00
Daniel Stenberg
475e451766
CURLSHOPT_UNLOCKFUNC.3: fix the callback prototype
Copy and paste error

Reported-by: Francisco Olarte
Fixes #8573
Closes #8577
2022-03-10 23:01:37 +01:00
Daniel Stenberg
0a142663a1
remove-on-error.d: typo
Reported-by: Colin Leroy
Bug: https://github.com/curl/curl/pull/8503#pullrequestreview-906520081
2022-03-10 22:56:11 +01:00
Daniel Stenberg
08a96c6e4e
curl: add --remove-on-error
If a transfer returns an error, using this option makes curl remove the
leftover downloded (partial) local file before exiting.

Added test 376 to verify

Closes #8503
2022-03-10 19:57:55 +01:00
Daniel Stenberg
7b0fd39db2
libssh: fix build with old libssh versions
... that don't have the SSH_S_* defines. Spotted on a machine using
libssh 0.7.3

Closes #8574
2022-03-10 19:52:13 +01:00
Daniel Stenberg
7da29df6d3
hyper: fix status_line() return code
Detected while working on #7708 that happened to trigger an error here
with a new test case.

Closes #8572
2022-03-10 17:35:46 +01:00
Alejandro R. Sedeño
2f5006da2f
configure.ac: move -pthread CFLAGS setting back where it used to be
The fix for #8276 proposed in #8374 set `CFLAGS="$CFLAGS -pthead"`
earlier than it used to be set, applying it in cases where it should not
have been applied.

This moves the AIX XLC check to a new `case $host in` block inside of
the `if test "$USE_THREADS_POSIX" != "1"` block, where `CFLAGS="$CFLAGS
-pthead"` used to happen.

Fixes #8541
Closes #8542
2022-03-10 08:50:04 +01:00
Tatsuhiro Tsujikawa
c82b281e17
ngtcp2: add client certificate authentication for OpenSSL
Closes #8522
2022-03-10 08:41:37 +01:00
Daniel Stenberg
bec62e39d1
tool_operate: fix a scan-build warning
... and avoid the temp storing of the return code in a diff variable.

Closes #8565
2022-03-10 08:31:20 +01:00
Daniel Stenberg
3e842078f3
test375: verify that --proxy errors out if proxy is disabled in the build
Closes #8565
2022-03-10 08:31:07 +01:00
Daniel Stenberg
95e8515ca0
curl: error out when options need features not present in libcurl
Trying to use a proxy when libcurl was built with proxy support disabled
should make curl error out properly.

Remove knowledge of disabled features from the tool code and instead
make it properly respond to what libcurl returns. Update all tests to
properly require the necessary features to be present/absent so that the
test suite can still be run even with libcurl builds with disabled
features.

Ref: https://curl.se/mail/archive-2022-03/0013.html
Closes #8565
2022-03-10 08:30:45 +01:00
Daniel Stenberg
96edc7954f
ngtcp2: disconnect the QUIC connection proper
Reported-by: mehatzri on github
Reviewed-by: Tatsuhiro Tsujikawa
Fixes #8534
closes #8569
2022-03-10 08:26:18 +01:00
Dan Fandrich
2583c3d1ce test386: Fix an incorrect test markup tag 2022-03-09 09:49:20 -08:00
Don
7c44b51956
nonblock: restore setsockopt method to curlx_nonblock
The implementation using setsockopt was removed when BeOS support was
purged. However this functionality wasn't BeOS specific, it is still
used by for example Orbis OS (Playstation 4/5 OS).

Closes #8562
2022-03-09 09:13:42 +01:00
Daniel Stenberg
911714d617
openssl: fix CN check error code
Due to a missing 'else' this returns error too easily.

Regressed in: d15692ebb

Reported-by: Kristoffer Gleditsch
Fixes #8559
Closes #8560
2022-03-08 15:59:04 +01:00
Frank Meier
1b169d5ea1
connect: make Curl_getconnectinfo work with conn cache from share handle
Closes #8524
2022-03-08 09:22:09 +01:00
lwthiker
68dc5bcd46
openssl: enable CURLOPT_SSL_EC_CURVES with BoringSSL
The CURLOPT_SSL_EC_CURVES option (used by the '--curves' flag) in
libcurl was ignored when compiling with BoringSSL because
HAVE_SSL_CTX_SET_EC_CURVES was explicitly disabled if BoringSSL was
detected.  However, this feature is supported in BoringSSL since
5fd1807d. This commit enables it, and also reduces the required minimal
OpenSSL version to 1.0.2 as per OpenSSL's official documentation.

Fixes #8553
Closes #8556
2022-03-08 09:11:19 +01:00
Samuel Henrique
9bd1195150
json.d: fix typo (overriden -> overridden)
Closes #8557
2022-03-07 22:48:10 +01:00
Daniel Stenberg
471d5f44c5
wolfssl: fix compiler error without IPv6
Reported-by: Joseph Chen
Fixes #8550
Closes #8552
2022-03-07 09:47:26 +01:00
Daniel Stenberg
6df30a0ec8
RELEASE-NOTES: synced
and bump pending version to 7.82.1
2022-03-07 09:03:36 +01:00
Paul Howarth
4b01a57c95
runtests: make 'oldlibssh' be before 0.9.4
The 'oldlibssh' feature indicates that the error code returned by libssh
for a broken known_hosts file should be 67 rather than 60 (test1459).
This feature was added as part of #8444 with 'oldlibssh' mapping to
libssh versions prior to 0.9.6, and then refined as part of #8511 to map
to versions prior to 0.9.5.

In Red Hat Enterprise Linux 8.5 there is a patched version of libssh
version 0.9.4 (https://git.centos.org/rpms/libssh/blob/c8/f/SOURCES) in
which test1459 fails because it returns the "new" value rather than the
"old" one. It's plausible that one of the patches is responsible for
this rather than the underlying code but I don't think so.

This change therefore drops the 'oldlibssh' version check to map to
libssh versions older than 0.9.4, which fixes builds on RHEL-8.

Closes #8548
2022-03-07 08:59:03 +01:00
Daniel Stenberg
3beb82b850
ipv4/6.d: clarify that they are about using IP addresses
... they may still *resolve* other families, but not use those
addresses.

Ref: #8530
Closes #8543
2022-03-06 23:32:40 +01:00
r-a-sattarov
a9a8bad3ed
curl/system.h: update ifdef condition for MCST-LCC compiler
in mcst-lcc compiler => 1.25 added a new macro definition to determine
compiler

Closes #8546
2022-03-06 23:28:54 +01:00
Marc Hoersken
f9b212cc84
CI: install Python package impacket to run SMB test 1451
Install Python package impacket in relevant CI workflows.

Follow up to #7935
Supersedes #7940
Closes #8544
2022-03-06 21:22:58 +01:00
MAntoniak
2cd9837e02
connect: use TCP_KEEPALIVE only if TCP_KEEPIDLE is not defined
Closes #8539
2022-03-05 23:57:08 +01:00
Daniel Stenberg
f7d9a76ca7
docs/HYPER.md: updated to reflect current hyper build needs 2022-03-05 23:47:25 +01:00
Daniel Stenberg
2207066446
GHA: build hyper with nightly rustc
Closes #8545
2022-03-05 23:47:18 +01:00
Daniel Stenberg
64db5c575d
RELEASE-NOTES: synced
The 7.82.0 release
2022-03-05 09:43:19 +01:00
Daniel Stenberg
f7c9bfaac8
THANKS: updates from the 7.82.0 release notes 2022-03-05 09:41:24 +01:00
Daniel Stenberg
1fa09990ab
misc: update copyright year ranges 2022-03-05 09:41:24 +01:00
Jay Satiro
522e46c973 unit1610: init SSL library before calling SHA256 functions
The SSL library must be initialized (via global initialization) because
libcurl's SHA256 functions may call SHA256 functions in the SSL library.

Reported-by: Gisle Vanem

Fixes https://github.com/curl/curl/issues/8538
Closes https://github.com/curl/curl/pull/8540
2022-03-05 03:36:09 -05:00
Jay Satiro
c07b95e280 examples/curlx: support building with OpenSSL 1.1.0+
- Access members of X509_STORE_CTX in OpenSSL 1.1.0+ by using API
  functions.

The X509_STORE_CTX struct has been opaque since OpenSSL 1.1.0.

Ref: https://curl.se/mail/lib-2022-03/0004.html

Closes https://github.com/curl/curl/pull/8529
2022-03-02 03:26:57 -05:00
Jay Satiro
592f114c67 h2h3: fix typo
Bug: https://github.com/curl/curl/issues/8381#issuecomment-1055440241
Reported-by: Michael Kaufmann
2022-03-01 13:09:02 -05:00