Commit Graph

32497 Commits

Author SHA1 Message Date
Daniel Stenberg
fa0b1d9209
TODO: -h option
Support "curl -h --insecure" etc to output the manpage section for the
--insecure command line option in the terminal. Should be possible to
work with either long or short versions of command line options.

Closes #13990
2024-06-23 23:07:13 +02:00
Daniel Stenberg
15e8cebd64
trace-ascii.md: mention "%" for stderr
Closes #13991
2024-06-23 23:06:21 +02:00
Daniel Stenberg
857e334a45
connect-to.md: expand with examples
- add referer from the resolve section to connect-to if user wants
  wildcard for the port number

Closes #13989
2024-06-23 15:52:06 +02:00
Daniel Stenberg
d5777afac6
TODO: connect to multiple IPs in parallel
Closes #13986
2024-06-23 14:31:46 +02:00
Daniel Stenberg
674cbfd613
dump-header.md: mention minus for stdout
Closes #13985
2024-06-23 12:08:58 +02:00
Daniel Stenberg
b84699bf4f
CURLOPT_RESOLVE.md: mention hostname can be wildcard ('*')
Closes #13983
2024-06-23 10:29:22 +02:00
Andy Pan
bd8e45c6c5
cf-socket: optimize curlx_nonblock() and check its return error
Reviewed-by: Stefan Eissing
Closes #13942
2024-06-22 11:56:37 +02:00
z2_
36e9222c42
x509asn1: prevent NULL dereference
Closes #13978
2024-06-22 11:51:27 +02:00
Daniel Stenberg
df2fbc2777
unit2604: use 'unitfail' instead of 'error' variable
Since the framework is already returning that variable by default.
Avoids a warning for unreachable code.

Reported-by: Tal Regev
Fixes #13967
Closes #13973
2024-06-19 13:37:36 +02:00
Daniel Stenberg
01159b36c2
KNOWN_BUGS: TFTP tests fail on OpenBSD
Closes #13623
Closes #13975
2024-06-19 12:54:19 +02:00
Daniel Stenberg
b715bb371c
VULN-DISCLOSURE-POLICY: NULL dereferences and crashes
If a malicious server can trigger a NULL dereference in curl or
otherwise cause curl to crash (and nothing worse), chances are big that
we do not consider that a security problem.

Closes #13974
2024-06-19 12:53:35 +02:00
Daniel Stenberg
b4ccf3fcbe
RELEASE-NOTES: synced 2024-06-19 11:36:39 +02:00
Sergey Markelov
35c0117f47
mbedtls: support CURLOPT_CERTINFO
Closes #13113
2024-06-19 11:33:12 +02:00
Daniel Stenberg
cb96ca1b64
x509asn1: ASN1tostr() should fail when 'constructed' is set
This is a regression from my refactor in 623c3a8fa0 (#12808)

Follow-up to 623c3a8fa0

Closes #13972
2024-06-19 11:23:53 +02:00
Daniel Stenberg
dc497d7b8f
x509asn1: remove two static variables
cnOID and sanOID were not used outside of the OID table anyway

Closes #13971
2024-06-19 11:22:52 +02:00
brian m. carlson
04739054cd
TODO: TLS channel binding
Closes #13483
2024-06-18 10:30:24 +02:00
Tal Regev
66bf995d1c
cmake: add CURL_USE_GSASL option with detection + CI test
Reviewed-by: Viktor Szakats
Closes #13948
2024-06-17 23:10:02 +02:00
Daniel Stenberg
8dc4493d54
x509asn1: make Curl_extract_certinfo store error message
To help us all better understand where the error actually comes from.

Ref: #13958
Closes #13959
2024-06-16 23:48:11 +02:00
Viktor Szakats
92f42761d2
appveyor: dump build logs on failure in VS2008 jobs
This seems to be the only way to see what actual toolchain commands were
run, and with what arguments.

Without `dos2unix`, `cat` output comes out empty.

Closes #13957
2024-06-15 21:04:55 +02:00
Viktor Szakats
b37040dd60
cmake: fix quotes when appending multiple options (SecureTransport)
Copied from a vcpkg distro patch:
02745e0f47/ports/curl/dependencies.patch (L43C38-L44)

Ref: https://github.com/microsoft/vcpkg/pull/38847
Ref: 795f2f137e
Ref: 36f0c917de (diff-ab5c23e5dc5df412539cc93e24b37abbc588e1918236f8abc019d676b270c85fR39) (sub-commit)

Authored-by: Kai Pastor
Closes #13953
2024-06-15 17:45:37 +02:00
Daniel Stenberg
66c4a398d7
CURLOPT_NETRC.md: clarify what it does on Windows
Closes #13956
2024-06-15 17:03:05 +02:00
Daniel Stenberg
4adeb52019
KNOWN_BUGS: "HTTP/2 + TLS spends a lot of time in recv"
Closes #13416
Closes #13955
2024-06-15 10:03:28 +02:00
Daniel Stenberg
aab0c16990
RELEASE-NOTES: synced 2024-06-14 13:30:06 +02:00
Yedaya Katsman
6e2d3db99f
examples: add missing binaries to .gitignore
They were showing as changed when built. Add them sorted alphabetically,
while also moving a few more entries to sorted order.

Closes #13952
2024-06-14 13:25:55 +02:00
Yedaya Katsman
9d09f9ec7a
docs: reference non deprecated libcurl options
There are a places where man pages reference deprecated CURLOPT options,
where it doesn't make sense, replace them with the reccomended
replacement option.

also remove reference to the removed mesalink TLS backend

Closes #13951
2024-06-14 13:24:41 +02:00
Daniel Stenberg
6b93190fae
gnutls: pass in SNI name, not hostname when checking cert
The function we use is called 'gnutls_x509_crt_check_hostname()' but if
we pass in the hostname with a trailing dot, the check fails. If we pass
in the SNI name, which cannot have a trailing dot, it succeeds for
https://pyropus.ca./

I consider this as a flaw in GnuTLS and have submitted this issue
upstream:

  https://gitlab.com/gnutls/gnutls/-/issues/1548

In order to work with old and existing GnuTLS versions, we still need
this change no matter how they view the issue or might change it in the
future.

Fixes #13428
Reported-by: Ryan Carsten Schmidt
Closes #13949
2024-06-14 13:19:20 +02:00
Daniel Stenberg
b41a1624ce
BINDINGS: update java link to one that exists
The previous java binding seems to have vanished. Link to one that still
exists.

Bug: https://github.com/curl/everything-curl/issues/456
Reported-by: Jiang Wenjian
Closes #13950
2024-06-14 09:47:47 +02:00
renovate[bot]
8b368fa3c9
GHA: update pinned actions
- github/codeql-action digest to 23acc5c
- actions/checkout digest to 692973e
- rojopolis/spellcheck-github-actions digest to d354a4d

Closes #13935
Closes #13945
Closes #13946
2024-06-14 09:36:22 +02:00
Jay Satiro
85efbb92b8
tool_cb_hdr: allow etag and content-disposition for 3xx reply
- Parse etag and content-disposition headers for 3xx replies.

For example, a server may send a content-disposition filename header
with a redirect reply (3xx) but not with the final response (2xx).
Without this change curl would ignore the server's specified filename
and continue to use the filename extracted from the user-specified URL.

Prior to this change, 75d79a4 had limited etag and content-disposition
to 2xx replies only.

Tests-by: Daniel Stenberg

Reported-by: Morgan Willcock
Fixes https://github.com/curl/curl/issues/13302
Closes #13484
2024-06-14 09:28:42 +02:00
Daniel Stenberg
cb5c7039e8
transfer: set CSELECT_IN if there is data pending
When aborting the transfer loop early, like when there is rate limiting
in effect, there might be buffered data already read off the socket so
the socket might not signal reability. Therefore we must set the
CSELECT_IN manually if data_pending_() suggests there might be more data
to get. This is particularly noticeable with SSH when the underlying
library has drained the socket and holds pending data in its buffer.

Reported-by: alervd on github
Fixes #13695
Closes #13943
2024-06-13 19:57:29 +02:00
Viktor Szakats
e5a35b493d
cmake: enable SOVERSION for Cygwin and CMAKE_DLL_NAME_WITH_SOVERSION
- enable SOVERSION when `CMAKE_DLL_NAME_WITH_SOVERSION=ON` is set.
  Ref: https://cmake.org/cmake/help/v3.27/variable/CMAKE_DLL_NAME_WITH_SOVERSION.html
  Use: https://github.com/search?q=-DCMAKE_DLL_NAME_WITH_SOVERSION&type=code

- enable SOVERSION for Cygwin builds by default.

Ref: #13936
Ref: #13944
Closes #13898
2024-06-13 19:30:39 +02:00
Viktor Szakats
bd2d5db549
cmake: allow SOVERSION override with CURL_LIBCURL_SOVERSION
Allow overriding SOVERSION with the new CMake option:
`CURL_LIBCURL_SOVERSION=ON/OFF`

For certain target platforms the shared libcurl library filename
contains the SOVERSION. This new option allows to enable/disable
this behavior manually. If set, it takes precedence over the default
setting.

Ref: #13898
Closes #13944
2024-06-13 19:26:16 +02:00
renovate[bot]
e9507bd8a1
Dockerfile: update debian:bookworm-slim to 84d83b2
Closes #13934
2024-06-13 17:20:00 +02:00
Daniel Stenberg
7ddc355abf
configure: use AC_MSG_WARN for TLS/experimental warning texts
- no longer warns for mbedtls
- warns for each item on individual lines
- no longer shows irrelevant TLS libraries when multiple are selected
- removes ech repetition

Closes #13941
2024-06-13 17:17:15 +02:00
Daniel Stenberg
ea12afd5ea
GHA: detect and warn for more English contractions
As we try to avoid them in curl documentation

Closes #13940
2024-06-13 16:21:09 +02:00
Stefan Eissing
3841569ec8
transfer: do not use EXPIRE_NOW while blocked
- When a transfer sets `data->state.select_bits`, it is
  scheduled for rerun with EXPIRE_NOW. If such a transfer
  is blocked (due to PAUSE, for example), this will lead to
  a busy loop.
- multi.c: check for transfer block
- sendf.*: add Curl_xfer_is_blocked()
- sendf.*: add client reader `is_paused()` callback
- implement is_paused()` callback where needed

Closes #13908
2024-06-13 15:13:43 +02:00
renovate[bot]
1424d507aa
ci: update dependency ngtcp2/ngtcp2 to v1.6.0
Closes #13939
2024-06-13 15:10:08 +02:00
renovate[bot]
76fca949c4
ci: update ngtcp2/nghttp3 to v1.4.0
Closes #13938
2024-06-13 15:08:49 +02:00
Viktor Szakats
831047fd04
cmake: stop setting SOVERSION for the static lib target
Also move the logic closer to its use and related tidy-ups.

Cherry-picked from #13898
Closes #13936
2024-06-13 13:38:37 +02:00
Patrick Monnerat
38bf07bc99
os400: make it compilable again
A newly introduced use of getsockname() in the cli tool makes it require
the ascii wrapper module, which is not available outside of the library:
as the tool only uses the address family field (binary), disable
wrappers outside of libcurl.

Fix setsockopt() parameter type mismatch using a (void *) cast.

Sync ILE/RPG binding.

Closes #13930
2024-06-13 11:30:55 +02:00
Viktor Szakats
f057de5a1a
libcurl.pc: add Requires.private, Requires for static linking
- cmake: populate for dependencies.
- autotools: populate for dependencies.
  (including mbedtls, though the script does not detect
  mbedtls through pkgconfig. mbedtls 3.6.0 now supports it.)

Skip dealing with gssapi in this patch.

Fixes #864
Closes #13911
2024-06-13 11:17:33 +02:00
Viktor Szakats
1dec702c86
cmake: bring curl-config.cmake closer to FindCURL
Set `CURL_LIBRARIES` and `CURL_INCLUDE_DIRS` variables
for compatibility with CMake's `FindCURL.cmake`:
b411d0146c/Modules/FindCURL.cmake (L209)

For dependent projects, CMake's suggestion is to replace
`CURL_LIBRARIES` with `CURL::libcurl`, and drop `CURL_INCLUDE_DIRS`.

Reported-by: Aurélien Pierre
Ref: https://curl.se/mail/lib-2024-06/0014.html
Ref: https://gitlab.kitware.com/cmake/cmake/-/issues/24580
Closes #13897
2024-06-13 11:17:32 +02:00
Daniel Stenberg
410111b515
tool_getparam: fix the bsearch call for ip-tos names
Follow-up to 3c20ae08b9
Reported-by: Samuel Chiang
Fixes #13932
Closes #13933
2024-06-13 09:45:51 +02:00
Daniel Stenberg
267c3b31e9
request: change the struct field bodywrites to a bool, only for hyper
Only hyper needs to know this, and it can use it as a boolean.

Closes #13928
2024-06-12 16:08:52 +02:00
Andy Pan
479858e15e
test: fix CURLOPT_TCP_KEEPCNT typo
Follow up to b77d627d24

Closes #13931
2024-06-12 16:08:05 +02:00
Daniel Stenberg
7208ff6534
http: remove "struct HTTP"
It is not actually used anymore and only contained a dummy struct field.
Remove all traces and uses of it.

Closes #13927
2024-06-12 16:04:53 +02:00
Daniel Stenberg
69b6c10568
cd2nroff: convert two warnings to errors
Since the warnings tend to get missed too easily and these are problems
we rather want addressed than letting slide.

Closes #13929
2024-06-12 13:19:00 +02:00
Daniel Stenberg
02730befc1
urlapi: use a correct value for CURLU_NO_GUESS_SCHEME
It was mistakenly set to the same value as CURLU_GET_EMPTY uses.

Reported-by: Patrick Monnerat
Bug: https://github.com/curl/curl/commit/655d44d139489625e77cf6790d36
Closes #13926
2024-06-12 13:14:03 +02:00
Daniel Stenberg
9e900054b4
file: separate fake headers and body with a stand-alone CRLF
Instead of bolting on the extra CRLF to the final header - as that makes
the behavior inconsistent and not as documented. The final CRLF is now
also made unconditional, just like it is for HTTP.

Reported-by: dogma
Bug: https://curl.se/mail/lib-2024-06/0033.html
Closes #13925
2024-06-12 11:33:13 +02:00
Daniel Stenberg
47a64f7ee9
RELEASE-NOTES: synced 2024-06-12 09:37:36 +02:00