Viktor Szakats [Mon, 15 Aug 2022 02:49:59 +0000 (02:49 +0000)]
Makefile.m32: allow -nghttp3/-ngtcp2 without -ssl [ci skip]
Before this patch `-nghttp3`/`-ngtcp2` had an effect only when `-ssl`
was also enabled. `-ssl` meaning OpenSSL (and its forks). After 8a13be227eede2601c2b3b1c63e08b3dc9b35dd5 nghttp3/ngtcp2 can also be
used together with wolfSSL. This patch adds the ability to enable
`-nghttp3`/`-ngtcp2` independently from `-ssl` (OpenSSL), allowing to
use it with wolfSSL or other, future TLS backends.
Before this patch, it was fine to enable `-nghttp3`/`-ngtcp2`
unconditionally. After this patch, this is no longer the case, and now
it's the user's responsibility to enable `-nghttp3`/`-ngtcp2` only
together with a compatible TLS backend.
When using a TLS backend other than OpenSSL, the TLS-specific ngtcp2
library must be configured manually, e.g.:
`export CURL_LDFLAG_EXTRAS=-lngtcp2_crypto_wolfssl`
Stefan Eissing [Wed, 10 Aug 2022 08:06:52 +0000 (10:06 +0200)]
quic: add support via wolfSSL
- based on ngtcp2 PR https://github.com/ngtcp2/ngtcp2/pull/505
- configure adapted to build against ngtcp2 wolfssl crypto lib
- quic code added for creation of WOLFSSL* instances
David Carlier [Sat, 13 Aug 2022 14:17:12 +0000 (15:17 +0100)]
memdebug: add annotation attributes
memory debug tracking annotates whether the returned pointer does not
`alias`, hints where the size required is, for Windows to be better
debugged via Visual Studio.
Emanuele Torre [Fri, 12 Aug 2022 03:18:10 +0000 (05:18 +0200)]
docs/cmdline-opts: fix example and categories for --form-escape
The example was missing a "--form" argument
I also replaced "--form" with "-F" to shorten the line a bit since it
was already very long.
And I also moved --form-escape from the "post" category to the "upload"
category (this is what I originally wanted to fix, before also noticing
the mistake in the example).
Daniel Stenberg [Thu, 11 Aug 2022 07:07:02 +0000 (09:07 +0200)]
configure: introduce CURL_SIZEOF
This is a rewrite of the previously used GPLv3+exception licensed
file. With this change, there is no more reference to GPL so we can
remove that from LICENSES/.
Emil Engler [Wed, 10 Aug 2022 07:35:38 +0000 (09:35 +0200)]
imap: use ISALNUM() for alphanumeric checks
This commit replaces a self-made character check for alphanumeric
characters within imap_is_bchar() with the ISALNUM() macro, as it is
reduces the size of the code and makes the performance better, due to
ASCII arithmetic.
Daniel Stenberg [Mon, 8 Aug 2022 12:41:01 +0000 (14:41 +0200)]
urldata: move smaller fields down in connectdata struct
By (almost) sorting the struct fields in connectdata in a decending size
order, having the single char ones last, we reduce the number of holes
in the struct and thus the amount of storage needed.
Daniel Stenberg [Mon, 8 Aug 2022 14:00:17 +0000 (16:00 +0200)]
KNOWN_BUGS: cmake build is not thread-safe
The cmake build does not check for and verify presence of a working
Atomic type, which then makes curl_global_init() to not build
thread-safe on non-Windows platforms.
Futaura [Sun, 7 Aug 2022 16:15:16 +0000 (17:15 +0100)]
configure: fixup bsdsocket detection code for AmigaOS 4.x
The code that detects bsdsocket.library for AmigaOS did not work
for AmigaOS 4.x. This has been fixed and also cleaned up a little
to reduce duplication. Wasn't technically necessary before, but is
required when building with AmiSSL instead of OpenSSL.
Daniel Stenberg [Mon, 8 Aug 2022 10:36:41 +0000 (12:36 +0200)]
connect: set socktype/protocol correctly
So that an address used from the DNS cache that was previously used for
QUIC can be reused for TCP and vice versa.
To make this possible, set conn->transport to "unix" for unix domain
connections ... and store the transport struct field in an unsigned char
to use less space.
Futaura [Sun, 7 Aug 2022 14:03:32 +0000 (15:03 +0100)]
amissl: make AmiSSL v5 a minimum requirement
AmiSSL v5 is the latest version, featuring a port of OpenSSL 3.0.
Support for previous OpenSSL 1.1.x versions has been dropped, so
makes sense to enforce v5 as the minimum requirement. This also
allows all the AmiSSL stub workarounds to be removed as they are
now provided in a link library in the AmiSSL SDK.
Daniel Stenberg [Sun, 7 Aug 2022 22:30:58 +0000 (00:30 +0200)]
digest: pass over leading spaces in qop values
When parsing the "qop=" parameter of the digest authentication, and the
value is provided within quotes, the list of values can have leading
white space which the parser previously did not handle correctly.
Add test case 388 to verify.
Reported-by: vlubart on github
Fixes #9264
Closes #9270
Emil Engler [Sat, 30 Jul 2022 19:55:04 +0000 (21:55 +0200)]
docs: add dns category to --resolve
This commit adds the dns category to the --resolve command line option,
because it can be interpreted as both: a low-level connection option and
an option related to the resolving of a hostname.
It is also not common for dns options to belong to the connection
category and vice versa. --ipv4 and --ipv6 are both good examples.
Emil Engler [Sat, 30 Jul 2022 20:36:55 +0000 (22:36 +0200)]
cmdline-opts/gen.pl: improve performance
On some systems, the gen.pl script takes nearly two minutes for the
generation of the main-page, which is a completely unacceptable time.
The slow performance has two causes:
1. Use of a regex locale operator
2. Useless invokations of loops
The commit addresses the first issue by replacing the "\W" wiht
[^a-zA-Z0-9_], which is, according to regex101.com, functionally
equivalent to the previous operation, except that it is obviously
limited to ASCII only, which is fine, as the curl project is
English-only anyway.
The second issue is being addressed by only running the loop if the line
contains a "--" in it. The loop may be completeley removed in the
future.
Co-authored-by: Emanuele Torre <torreemanuele6@gmail.com>
See #8299
Fixes #9230
Closes #9232