Daniel Stenberg [Sun, 16 Jan 2022 22:00:09 +0000 (23:00 +0100)]
multi: set in_callback for multi interface callbacks
This makes most libcurl functions return error if called from within a
callback using the same multi handle. For example timer or socket
callbacks calling curl_multi_socket_action.
Reported-by: updatede on github
Fixes #8282
Closes #8286
Daniel Stenberg [Fri, 14 Jan 2022 07:30:26 +0000 (08:30 +0100)]
curl: remove "separators" (when using globbed URLs)
Unless muted (with -s) When doing globbing, curl would output mime-like
separators between the separate transfers. This is not documented
anywhere, surprises users and clobbers the output. Gone now.
Updated test 18 and 1235
Reported-by: jonny112 on github
Bug: https://github.com/curl/curl/discussions/8257
Closes #8278
Niels Martignène [Tue, 11 Jan 2022 08:25:00 +0000 (03:25 -0500)]
mbedtls: fix CURLOPT_SSLCERT_BLOB (again)
- Increase the buffer length passed to mbedtls_x509_crt_parse to account
for the null byte appended to the temporary blob.
Follow-up to 867ad1c which uses a null terminated copy of the
certificate blob, because mbedtls_x509_crt_parse requires PEM data
to be null terminated.
Daniel Stenberg [Tue, 11 Jan 2022 10:28:16 +0000 (11:28 +0100)]
curl_multi_socket.3: remove callback and typical usage descriptions
1. The callback is better described in the option for setting it. Having
it in a single place reduces the risk that one of them is wrong.
2. The "typical usage" is wrong since the functions described in this
man page are both deprecated so they cannot be used in any "typical" way
anymore.
Daniel Stenberg [Sat, 8 Jan 2022 14:40:04 +0000 (15:40 +0100)]
curl-functions.m4: revert DYLD_LIBRARY_PATH tricks in CURL_RUN_IFELSE
Mostly reverts ba0657c343f, but now instead just run the plain macro on
darwin. The approach as used on other platforms is simply not necessary
on macOS.
Fixes #8229 Reported-by: Ryan Schmidt
Closes #8247
Patrick Monnerat [Mon, 10 Jan 2022 10:57:02 +0000 (11:57 +0100)]
openldap: implement SASL authentication
As credentials can be quite different depending on the mechanism used,
there are no default mechanisms for LDAP and simple bind with a DN is
then used.
The caller has to provide mechanism(s) using CURLOPT_LOGIN_OPTIONS to
enable SASL authentication and disable simple bind.
Cameron Will [Tue, 11 Jan 2022 02:39:42 +0000 (21:39 -0500)]
CURLOPT_RESOLVE.3: change example port to 443
83cc966 changed documentation from using http to https. However,
CURLOPT_RESOLVE being set to port 80 in the documentation means that it
isn't valid for the new URL. Update to 443.
Patrick Monnerat [Mon, 10 Jan 2022 10:51:16 +0000 (11:51 +0100)]
curl tool: erase some more sensitive command line arguments
As the ps command may reveal sensitive command line info, obfuscate
options --tlsuser, --tlspasswd, --proxy-tlsuser, --proxy-tlspassword and
--oauth2-bearer arguments.
Reported-by: Stephen Boost <s.booth@epcc.ed.ac.uk>
Closes #7964
Daniel Stenberg [Sun, 9 Jan 2022 21:28:48 +0000 (22:28 +0100)]
mesalink: remove support
Mesalink has ceased development. We can no longer encourage use of it.
It seems to be continued under the name TabbySSL, but no attempts have
(yet) been to make curl support it.
Daniel Stenberg [Sun, 9 Jan 2022 21:38:22 +0000 (22:38 +0100)]
ldap: return CURLE_URL_MALFORMAT for bad URL
For consistency, use the same return code for URL malformats,
independently of what scheme that is used. Previously this would return
CURLE_LDAP_INVALID_URL, but starting now that error cannot be returned.
Add support for `CURLOPT_CAINFO_BLOB` `CURLOPT_PROXY_CAINFO_BLOB` to the
rustls TLS backend. Multiple certificates in a single PEM string are
supported just like OpenSSL does with this option.
This is compatible at least with rustls-ffi 0.8+ which is our new
minimum version anyway.
I was able to build and run this on Windows, pulling trusted certs from
the system and then add them to rustls by setting
`CURLOPT_CAINFO_BLOB`. Handy!
mbedtls: fix private member designations for v3.1.0
"As a last resort, you can access the field foo of a structure bar by
writing bar.MBEDTLS_PRIVATE(foo). Note that you do so at your own risk,
since such code is likely to break in a future minor version of Mbed
TLS." -
https://github.com/ARMmbed/mbedtls/blob/f2d1199edc5834df4297f247f213e614f7782d1d/docs/3.0-migration-guide.md
That future minor version is v3.1.0. I set the >= to == for the version
checks because v3.1.0 is a release, and I am not sure when the private
designation was reverted after v3.0.0.
-- curl version=[7.81.0-DEV]
CMake Warning (dev) at /usr/share/cmake-3.22.1/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
The package name passed to `find_package_handle_standard_args` (MBEDTLS)
does not match the name of the calling package (MbedTLS). This can lead to
problems in calling code that expects `find_package` result variables
(e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
deps/curl/CMake/FindMbedTLS.cmake:31 (find_package_handle_standard_args)
deps/curl/CMakeLists.txt:473 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
Daniel Stenberg [Thu, 23 Dec 2021 09:24:31 +0000 (10:24 +0100)]
ngtcp2: verify the server cert on connect (quictls)
Make ngtcp2+quictls correctly acknowledge `CURLOPT_SSL_VERIFYPEER` and
`CURLOPT_SSL_VERIFYHOST`.
The name check now uses a function from lib/vtls/openssl.c which will
need attention for when TLS is not done by OpenSSL or is disabled while
QUIC is enabled.
Possibly the servercert() function in openssl.c should be adjusted to be
able to use for both regular TLS and QUIC.