Jan Venekamp [Mon, 6 Dec 2021 17:35:55 +0000 (18:35 +0100)]
bearssl: fix EXC_BAD_ACCESS on incomplete CA cert
- Do not create trust anchor object for a CA certificate until after it
is processed.
Prior to this change the object was created at state BR_PEM_BEGIN_OBJ
(certificate processing begin state). An incomplete certificate (for
example missing a newline at the end) never reaches BR_PEM_END_OBJ
(certificate processing end state) and therefore the trust anchor data
was not set in those objects, which caused EXC_BAD_ACCESS.
Jan Venekamp [Mon, 6 Dec 2021 17:36:01 +0000 (18:36 +0100)]
bearssl: fix connect error on expired cert and no verify
- When peer verification is disabled use the x509_decode engine instead
of the x509_minimal engine to parse and extract the public key from
the first cert of the chain.
Prior to this change in such a case no key was extracted and that caused
CURLE_SSL_CONNECT_ERROR. The x509_minimal engine will stop parsing if
any validity check fails but the x509_decode won't.
Joel Depooter [Thu, 17 Feb 2022 19:33:17 +0000 (11:33 -0800)]
schannel: move the algIds array out of schannel.h
This array is only used by the SCHANNEL_CRED struct in the
schannel_acquire_credential_handle function. It can therefore be kept as
a local variable. This is a minor update to bbb71507b7bab52002f9b1e0880bed6a32834511.
This change also updates the NUM_CIPHERS value to accurately count the
number of ciphers options listed in schannel.c, which is 47 instead of
45. It is unlikely that anyone tries to set all 47 values, but if they
had tried, the last two would not have been set.
Kevin Adler [Mon, 24 Jan 2022 22:44:26 +0000 (16:44 -0600)]
os400: Default build to target current release
V6R1M0 is not available as a target release since IBM i 7.2. To keep
from having to keep this up to date in git, default to the current
release. Users can configure this to whatever release they want to
actually build for.
Daniel Stenberg [Thu, 17 Feb 2022 09:49:05 +0000 (10:49 +0100)]
docs/INTERNALS.md: clean up, refer to the book
The explanatory parts are now in the everything curl book (which can
also use images etc). This document now refers to that resource and only
leaves listings of supported versions of libs, tools and operating
systems. See https://everything.curl.dev/internals
Marcel Raad [Wed, 16 Feb 2022 08:19:58 +0000 (09:19 +0100)]
des: fix compile break for OpenSSL without DES
When `USE_OPENSSL` was defined but OpenSSL had no DES support and a
different crypto library was used for that, `Curl_des_set_odd_parity`
was called but not defined. This could for example happen on Windows
and macOS when using OpenSSL v3 with deprecated features disabled.
Use the same condition for the function definition as used at the
caller side, but leaving out the OpenSSL part to avoid including
OpenSSL headers.
- Change the minimum OpenSSL version for using their SHA256
implementation from 0.9.7 to 0.9.8.
EVP_sha256() does not appear in the OpenSSL source before 0.9.7h, and
does not get built by default until 0.9.8, so trying to use it for all
0.9.7 is wrong, and before 0.9.8 is unreliable.
Kevin Adler [Mon, 24 Jan 2022 22:56:38 +0000 (16:56 -0600)]
gskit: Fix initialization of Curl_ssl_gskit struct
In c30bf22, Curl_ssl_getsock was factored out in to a member of
struct Curl_ssl but the gskit initialization was not updated to reflect
this new member.
Kevin Adler [Mon, 24 Jan 2022 22:50:36 +0000 (16:50 -0600)]
gskit: Fix errors from Curl_strerror refactor
2f0bb864c1 replaced sterror with Curl_strerror, but the strerror buffer
shadows the set_buffer "buffer" parameter. To keep consistency with the
other functions that use Curl_strerror, rename the parameter.
In addition, strerror.h is needed for the definition of STRERROR_LEN.
Henrik Holst [Thu, 10 Feb 2022 17:47:08 +0000 (18:47 +0100)]
mprintf: remove strlen calls on empty strings in dprintf_formatf
Turns out that in dprintf_formatf we did a strlen on empty strings, a
bit strange is how common this actually is, 24 alone when doing a simple
GET from https://curl.se
Daniel Stenberg [Tue, 8 Feb 2022 13:47:17 +0000 (14:47 +0100)]
scripts/cijobs.pl: output data about all currect CI jobs
This script parses the config files for all the CI services currently in
use and output the information in a uniform way. The idea is that the
output from this script should be possible to massage into informational
tables or graphs to help us visualize what they are all testing and NOT
testing.
Daniel Stenberg [Mon, 7 Feb 2022 16:17:31 +0000 (17:17 +0100)]
configure: remove support for "embedded ares"
In March 2010 (commit 4259d2df7dd) we removed the embedded 'ares'
directory from the curl source tree but we have since supported
especially detecting and using that build directory. The time has come
to remove that kludge and ask users to specify the c-ares dir correctly
with --enable-ares.
Marcel Raad [Sun, 6 Feb 2022 11:26:29 +0000 (12:26 +0100)]
curl-openssl: fix SRP check for OpenSSL 3.0
When OpenSSL 3.0 is built with `--api=3.0` and `no-deprecated`, the SRP
functions exist in the library, but are disabled for user code. Check
if they are actually usable instead of only if they exist. Also, check
for the functions actually required for TLS-SRP.
TLS-SRP support is still enabled if OpenSSL is configured with just
`--api=3.0` or with `--api=1.1.1 no-deprecated`.
Daniel Stenberg [Sat, 5 Feb 2022 22:51:05 +0000 (23:51 +0100)]
http2: allow CURLOPT_HTTPHEADER change ":scheme"
The only h2 psuedo header that wasn't previously possible to change by a
user. This change also makes it impossible to send a HTTP/1 header that
starts with a colon, which I don't think anyone does anyway.
The other pseudo headers are possible to change indirectly by doing the
rightly crafted request.
Reported-by: siddharthchhabrap on github
Fixes #8381
Closes #8393
Daniel Stenberg [Fri, 4 Feb 2022 13:46:29 +0000 (14:46 +0100)]
tests/disable-scan.pl: properly detect multiple symbols per line
Test 1165 would fail on some systems because it didn't detect
CURL_DISABLE_* symbols that were used to the right of another one on the
same line! The script would only detect and extract the first one.
Jay Satiro [Thu, 3 Feb 2022 22:07:53 +0000 (17:07 -0500)]
config.d: Clarify _curlrc filename is still valid on Windows
Recent changes added support for filename .curlrc on Windows, and
when it's not found curl falls back on the original Windows filename
_curlrc. _curlrc was removed from the doc, however it is still valid.
Daniel Stenberg [Thu, 3 Feb 2022 09:42:02 +0000 (10:42 +0100)]
TPF: drop support
There has been no TPF related changes done since September 2010 (commit 7e1a45e224e57) and since this is a platform that is relatively different
than many others (== needs attention), I draw the conclusion that this
build is broken since a long time.
Leah Neukirchen [Mon, 31 Jan 2022 17:28:01 +0000 (18:28 +0100)]
scripts/completion.pl: improve zsh completion
- Detect all spellings of <file>, <file name> etc as well as <path>.
- Only complete directories for <dir>.
- Complete URLs for <URL>.
- Complete --request and --ftp-method.