]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
3 years agohostcheck: pass in pattern length too, to avoid a strlen call
Daniel Stenberg [Wed, 9 Feb 2022 16:27:09 +0000 (17:27 +0100)] 
hostcheck: pass in pattern length too, to avoid a strlen call

Removes one strlen() call per SAN name in a cert-check.

Closes #8418

3 years agomisc: remove strlen for Curl_checkheaders + Curl_checkProxyheaders
HenrikHolst [Tue, 8 Feb 2022 23:57:00 +0000 (00:57 +0100)] 
misc: remove strlen for Curl_checkheaders + Curl_checkProxyheaders

Closes #8409

3 years agoconfigure: requires --with-nss-deprecated to build with NSS
Daniel Stenberg [Mon, 7 Feb 2022 13:20:03 +0000 (14:20 +0100)] 
configure: requires --with-nss-deprecated to build with NSS

Add deprecation plans to docs/DEPRECATE.md

Closes #8395

3 years agomqtt: free 'sendleftovers' in disconnect
Daniel Stenberg [Wed, 9 Feb 2022 11:29:31 +0000 (12:29 +0100)] 
mqtt: free 'sendleftovers' in disconnect

Fix a memory-leak

Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=43646
Closes #8415

3 years agoopenldap: pass string length arguments to client_write()
Patrick Monnerat [Tue, 8 Feb 2022 10:52:03 +0000 (11:52 +0100)] 
openldap: pass string length arguments to client_write()

This uses the new STRCONST() macro and saves 2 strlen() calls on short
string constants per LDIF output line.

Closes #8404

3 years agomisc: reduce strlen() calls with Curl_dyn_add()
HenrikHolst [Mon, 7 Feb 2022 18:25:09 +0000 (19:25 +0100)] 
misc: reduce strlen() calls with Curl_dyn_add()

Use STRCONST() to switch from Curl_dyn_add() to Curl_dyn_addn() for
string literals.

Closes #8398

3 years agohttp2: fix the array copy to nghttp2_nv
Daniel Stenberg [Wed, 9 Feb 2022 10:58:58 +0000 (11:58 +0100)] 
http2: fix the array copy to nghttp2_nv

Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=44517
Follow-up to 9f985a11e794
Closes #8414

3 years agoRELEASE-NOTES: synced
Daniel Stenberg [Wed, 9 Feb 2022 09:09:10 +0000 (10:09 +0100)] 
RELEASE-NOTES: synced

3 years agoscripts/cijobs.pl: output data about all currect CI jobs
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.

Closes #8408

3 years agomaketgz: return error if 'make dist' fails
Daniel Stenberg [Tue, 8 Feb 2022 08:33:38 +0000 (09:33 +0100)] 
maketgz: return error if 'make dist' fails

To better detect this problem in CI jobs

Reported-by: Marcel Raad
Bug: https://curl.se/mail/lib-2022-02/0070.html
Closes #8402

3 years agoh2h3: pass correct argument types to infof()
Daniel Stenberg [Tue, 8 Feb 2022 07:25:38 +0000 (08:25 +0100)] 
h2h3: pass correct argument types to infof()

Detected by Coverity. CID 1497993

Closes #8401

3 years agolib/Makefile: remove config-tpf.h from the dist
Daniel Stenberg [Tue, 8 Feb 2022 08:36:41 +0000 (09:36 +0100)] 
lib/Makefile: remove config-tpf.h from the dist

Follow-up from da15443dddea2bfb. Missed before because the 'distcheck'
CI job was not working as intended.

Reported-by: Marcel Raad
Bug: https://curl.se/mail/lib-2022-02/0070.html
Closes #8403

3 years agoconfigure: remove support for "embedded ares"
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.

Closes #8397

3 years agogithub/workflows/mbedtls: fix indent & remove unnecessary line breaks
Sebastian Sterk [Mon, 7 Feb 2022 20:39:58 +0000 (21:39 +0100)] 
github/workflows/mbedtls: fix indent & remove unnecessary line breaks

Closes #8399

3 years agoCI: move the NSS job from zuul to GHA
Daniel Stenberg [Mon, 7 Feb 2022 15:27:01 +0000 (16:27 +0100)] 
CI: move the NSS job from zuul to GHA

Closes #8396

3 years agotests/unit/Makefile.am: add NSS_LIBS to build with NSS fine
Daniel Stenberg [Mon, 7 Feb 2022 15:59:54 +0000 (16:59 +0100)] 
tests/unit/Makefile.am: add NSS_LIBS to build with NSS fine

Closes #8396

3 years agocurl-openssl: fix SRP check for OpenSSL 3.0
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`.

Closes https://github.com/curl/curl/pull/8394

3 years agohttp: make Curl_compareheader() take string length arguments too
HenrikHolst [Fri, 4 Feb 2022 19:41:35 +0000 (20:41 +0100)] 
http: make Curl_compareheader() take string length arguments too

Also add STRCONST, a macro that returns a string literal and it's length
for functions that take "string,len"

Removes unnecesary calls to strlen().

Closes #8391

3 years agovquic/vquic.h: removed the unused H3 psuedo defines
Daniel Stenberg [Sun, 6 Feb 2022 17:18:55 +0000 (18:18 +0100)] 
vquic/vquic.h: removed the unused H3 psuedo defines

3 years agongtcp2: use Curl_pseudo_headers
Daniel Stenberg [Sun, 6 Feb 2022 17:16:30 +0000 (18:16 +0100)] 
ngtcp2: use Curl_pseudo_headers

3 years agoquiche: use Curl_pseudo_headers
Daniel Stenberg [Sun, 6 Feb 2022 17:10:59 +0000 (18:10 +0100)] 
quiche: use Curl_pseudo_headers

3 years agohttp2: use Curl_pseudo_headers
Daniel Stenberg [Sun, 6 Feb 2022 17:04:19 +0000 (18:04 +0100)] 
http2: use Curl_pseudo_headers

3 years agoh2h3: added Curl_pseudo_headers()
Daniel Stenberg [Sun, 6 Feb 2022 16:52:16 +0000 (17:52 +0100)] 
h2h3: added Curl_pseudo_headers()

For use with both http2 and http3 requests.

3 years agongtcp2/quiche: make :scheme possible to set
Daniel Stenberg [Sun, 6 Feb 2022 15:02:04 +0000 (16:02 +0100)] 
ngtcp2/quiche: make :scheme possible to set

3 years agohttp2: allow CURLOPT_HTTPHEADER change ":scheme"
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

3 years agoh2/h3: provide and refer to pseudo headers as defines
Daniel Stenberg [Fri, 4 Feb 2022 15:57:38 +0000 (16:57 +0100)] 
h2/h3: provide and refer to pseudo headers as defines

... and do sizeof() on the defines to use constants better.

Closes #8389

3 years agosmb: passing a socket for writing and reading data instead of FIRSTSOCKET
MAntoniak [Thu, 3 Feb 2022 21:54:00 +0000 (22:54 +0100)] 
smb: passing a socket for writing and reading data instead of FIRSTSOCKET

Closes #8383

3 years agox509asn1: toggle off functions not needed for diff tls backends
Daniel Stenberg [Fri, 4 Feb 2022 10:06:39 +0000 (11:06 +0100)] 
x509asn1: toggle off functions not needed for diff tls backends

... and clean the header file from private defines/structs (move to C
file) and unused function prototypes.

Closes #8386

3 years agolib: move hostcheck and x509sn1 sources to vtls/
Daniel Stenberg [Fri, 4 Feb 2022 09:44:02 +0000 (10:44 +0100)] 
lib: move hostcheck and x509sn1 sources to vtls/

... since they are used strictly by TLS code.

Closes #8386

3 years agoversion_win32: fix warning for `CURL_WINDOWS_APP`
Marcel Raad [Fri, 4 Feb 2022 09:06:47 +0000 (10:06 +0100)] 
version_win32: fix warning for `CURL_WINDOWS_APP`

The build version is not supported by the UWP code.

Closes https://github.com/curl/curl/pull/8385

3 years agotests/disable-scan.pl: properly detect multiple symbols per line
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.

Reported-by: Marcel Raad
Fixes #8384
Closes #8388

3 years agoconfig.d: Clarify _curlrc filename is still valid on Windows
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.

Closes https://github.com/curl/curl/pull/8382

3 years agolib: remove support for CURL_DOES_CONVERSIONS
Daniel Stenberg [Thu, 3 Feb 2022 12:04:30 +0000 (13:04 +0100)] 
lib: remove support for CURL_DOES_CONVERSIONS

TPF was the only user and support for that was dropped.

Closes #8378

3 years agoTPF: drop support
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.

Closes #8378

3 years agoscripts/delta: check the file delta for current branch
Daniel Stenberg [Thu, 3 Feb 2022 22:42:02 +0000 (23:42 +0100)] 
scripts/delta: check the file delta for current branch

... also polish the output style a little bit

3 years agoruntests.pl: tolerate test directories without Makefile.inc
Fabian Keil [Tue, 1 Feb 2022 10:46:53 +0000 (11:46 +0100)] 
runtests.pl: tolerate test directories without Makefile.inc

Silences the following warnings when using a Makefile.inc-free
TESTDIR using the "-o" argument:

   readline() on closed filehandle D at ./runtests.pl line 592.
   Use of uninitialized value $disttests in pattern match (m//) at
   ./runtests.pl line 3602.

Closes https://github.com/curl/curl/pull/8379

3 years agosetopt: do bounds-check before strdup
HenrikHolst [Thu, 3 Feb 2022 00:03:42 +0000 (01:03 +0100)] 
setopt: do bounds-check before strdup

Curl_setstropt() allocated memory for the string before checking if the
string was within bounds. The bounds check should be done first.

Closes #8377

3 years agombedtls: enable use of mbedtls without filesystem functions support
MAntoniak [Fri, 28 Jan 2022 13:58:04 +0000 (14:58 +0100)] 
mbedtls: enable use of mbedtls without filesystem functions support

Closes #8376

3 years agoconfigure: support specification of a nghttp2 library path
Bernhard Walle [Fri, 28 Jan 2022 15:31:18 +0000 (16:31 +0100)] 
configure: support specification of a nghttp2 library path

This enables using --with-nghttp2=<dir> on systems without pkg-config.

Closes #8375

3 years agoscripts/release-notes.pl: remove leftover debug output
Daniel Stenberg [Wed, 2 Feb 2022 13:20:23 +0000 (14:20 +0100)] 
scripts/release-notes.pl: remove leftover debug output

3 years agoRELEASE-NOTES: synced
Daniel Stenberg [Wed, 2 Feb 2022 13:18:29 +0000 (14:18 +0100)] 
RELEASE-NOTES: synced

3 years agoscripts/release-notes.pl: fix number extraction for full URLs
Daniel Stenberg [Wed, 2 Feb 2022 13:14:44 +0000 (14:14 +0100)] 
scripts/release-notes.pl: fix number extraction for full URLs

3 years agoscripts/completion.pl: improve zsh completion
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.

Closes #8363

3 years agoconfigure: use correct CFLAGS for threaded resolver with xlC on AIX
Davide Cassioli [Mon, 24 Jan 2022 13:24:45 +0000 (14:24 +0100)] 
configure: use correct CFLAGS for threaded resolver with xlC on AIX

Fixes #8276
Closes #8374

3 years agomailmap: Henrik Holst
Daniel Stenberg [Wed, 2 Feb 2022 12:03:38 +0000 (13:03 +0100)] 
mailmap: Henrik Holst

3 years agobuild: fix ngtcp2 crypto library detection
Jay Satiro [Tue, 1 Feb 2022 22:44:26 +0000 (17:44 -0500)] 
build: fix ngtcp2 crypto library detection

- Change library link check for ngtcp2_crypto_{gnutls,openssl} to
  to use function ngtcp2_crypto_recv_client_initial_cb instead of
  ngtcp2_crypto_ctx_initial.

The latter function is no longer external since two days ago in
ngtcp2/ngtcp2@533451f. curl HTTP/3 CI builds have been failing since
then because they would not link to the ngtcp2 crypto library.

Ref: https://github.com/ngtcp2/ngtcp2/pull/356

Closes https://github.com/curl/curl/pull/8372

3 years agourlapi: remove an unnecessary call to strlen
HenrikHolst [Tue, 1 Feb 2022 12:50:21 +0000 (13:50 +0100)] 
urlapi: remove an unnecessary call to strlen

- Use strcpy instead of strlen+memcpy to copy the url path.

Ref: https://curl.se/mail/lib-2022-02/0006.html

Closes https://github.com/curl/curl/pull/8370

3 years agoscripts/copyright.pl: fix for handling removed files better
Daniel Stenberg [Tue, 1 Feb 2022 15:21:58 +0000 (16:21 +0100)] 
scripts/copyright.pl: fix for handling removed files better

3 years agovxworks: drop support
Daniel Stenberg [Mon, 31 Jan 2022 16:41:38 +0000 (17:41 +0100)] 
vxworks: drop support

No changes or fixes in vxworks related code since 2009 leads me to
believe that this doesn't work anymore.

Closes #8362

3 years agobase64: remove an unnecessary call to strlen
Henrik Holst [Tue, 1 Feb 2022 12:39:06 +0000 (13:39 +0100)] 
base64: remove an unnecessary call to strlen

Closes #8369

3 years agotool_getparam: initial --json support
Daniel Stenberg [Fri, 21 Jan 2022 08:38:44 +0000 (09:38 +0100)] 
tool_getparam: initial --json support

Adds these test cases:

 383 - simple single command line option
 384 - reading it from stdin
 385 - getting two --json options on command line
 386 - --next works after --json

Closes #8314

3 years agocurl_getdate.3: remove pointless .PP line
Bjarni Ingi Gislason [Tue, 1 Feb 2022 08:43:21 +0000 (09:43 +0100)] 
curl_getdate.3: remove pointless .PP line

mandoc: WARNING: skipping paragraph macro: PP empty

Reported-by: Samuel Henrique
Closes #8365

3 years agomulti: grammar fix in comment
Sebastian Sterk [Mon, 31 Jan 2022 23:05:00 +0000 (00:05 +0100)] 
multi: grammar fix in comment

After 'must', the verb is used without 'to'. Correct: "must" or "have
to"

Closes #8368

3 years agoopenldap: fix compiler warning when built without SSL support
Daniel Stenberg [Mon, 31 Jan 2022 21:47:48 +0000 (22:47 +0100)] 
openldap: fix compiler warning when built without SSL support

openldap.c:841:52: error: unused parameter â€˜data’ [-Werror=unused-parameter]

Closes #8367

3 years agoCURLSHOPT_LOCKFUNC.3: fix typo "relased" -> "released"
Samuel Henrique [Mon, 31 Jan 2022 19:44:58 +0000 (19:44 +0000)] 
CURLSHOPT_LOCKFUNC.3: fix typo "relased" -> "released"

Found when packaging 7.81.0 for Debian.

Closes #8364

3 years agonetware: remove support
Daniel Stenberg [Mon, 31 Jan 2022 09:12:28 +0000 (10:12 +0100)] 
netware: remove support

There are no current users and no Netware related changes done in the
code for over 13 years is a clear sign this is abandoned.

Closes #8358

3 years agoCI: move two jobs from Zuul to Circle CI
Daniel Stenberg [Mon, 31 Jan 2022 11:52:29 +0000 (12:52 +0100)] 
CI: move two jobs from Zuul to Circle CI

 - openssl-no-verbose
 - openssl-no-proxy

Closes #8359

3 years agocirlceci: also run a c-ares job on arm with debug enabled
Daniel Stenberg [Mon, 31 Jan 2022 09:03:15 +0000 (10:03 +0100)] 
cirlceci: also run a c-ares job on arm with debug enabled

Closes #8357

3 years agoci: move the OpenSSL + c-ares job from Zuul to Circle CI
Daniel Stenberg [Mon, 31 Jan 2022 08:41:31 +0000 (09:41 +0100)] 
ci: move the OpenSSL + c-ares job from Zuul to Circle CI

Closes #8357

3 years agomailmap: Jan-Piet Mens
Daniel Stenberg [Mon, 31 Jan 2022 08:39:36 +0000 (09:39 +0100)] 
mailmap: Jan-Piet Mens

3 years agomulti: remember connection_id before returning connection to pool
luminixinc on github [Thu, 27 Jan 2022 21:52:26 +0000 (11:52 -1000)] 
multi: remember connection_id before returning connection to pool

Fix a bug that does not require a new CVE as discussed on hackerone.com.
Previously `connection_id` was accessed after returning connection to
the shared pool.

Bug: https://hackerone.com/reports/1463013
Closes #8355

3 years agowrite-out.d: Fix num_headers formatting
Jay Satiro [Mon, 31 Jan 2022 06:04:19 +0000 (01:04 -0500)] 
write-out.d: Fix num_headers formatting

3 years agodocs: capitalize the name 'Netscape'
Jan-Piet Mens [Sun, 30 Jan 2022 11:57:24 +0000 (12:57 +0100)] 
docs: capitalize the name 'Netscape'

Closes https://github.com/curl/curl/pull/8354

3 years agoRELEASE-NOTES: synced
Daniel Stenberg [Sun, 30 Jan 2022 11:48:27 +0000 (12:48 +0100)] 
RELEASE-NOTES: synced

3 years agodocs: grammar proofread, typo fixes
Antoine Pietri [Thu, 27 Jan 2022 01:12:50 +0000 (02:12 +0100)] 
docs: grammar proofread, typo fixes

(Partially automated) proofread of most of the documentation, leading to
various typo fixes.

Closes #8353

3 years agourldata: CONN_IS_PROXIED replaces bits.close when proxy can be disabled
Daniel Stenberg [Fri, 28 Jan 2022 15:52:24 +0000 (16:52 +0100)] 
urldata: CONN_IS_PROXIED replaces bits.close when proxy can be disabled

To remove run-time checks for such builds.

Closes #8350

3 years agosetopt: fix the TLSAUTH #ifdefs for proxy-disabled builds
Daniel Stenberg [Fri, 28 Jan 2022 15:48:38 +0000 (16:48 +0100)] 
setopt: fix the TLSAUTH #ifdefs for proxy-disabled builds

Closes #8350

3 years agoconncache: make conncache_add_bundle return the pointer
Daniel Stenberg [Sat, 29 Jan 2022 22:06:13 +0000 (23:06 +0100)] 
conncache: make conncache_add_bundle return the pointer

Simplifies the logic a little and avoids a ternary operator.

Ref: #8346
Closes #8349

3 years agomailmap: neutric on github
Daniel Stenberg [Sun, 30 Jan 2022 10:55:49 +0000 (11:55 +0100)] 
mailmap: neutric on github

3 years agodocs/TheArtOfHttpScripting: fix example POST URL
neutric [Sun, 30 Jan 2022 01:46:38 +0000 (02:46 +0100)] 
docs/TheArtOfHttpScripting: fix example POST URL

Closes https://github.com/curl/curl/pull/8352

3 years agonss: handshake callback during shutdown has no conn->bundle
Daniel Stenberg [Fri, 28 Jan 2022 07:17:15 +0000 (08:17 +0100)] 
nss: handshake callback during shutdown has no conn->bundle

The callback gets called because of the call to PR_Recv() done to
attempt to avoid RST on the TCP connection. The conn->bundle pointer is
already cleared at this point so avoid dereferencing it.

Reported-by: Eric Musser
Fixes #8341
Closes #8342

3 years agombedtls: remove #include <mbedtls/certs.h>
MAntoniak [Fri, 28 Jan 2022 12:45:30 +0000 (13:45 +0100)] 
mbedtls: remove #include <mbedtls/certs.h>

mbedtls/certs.h file contains only certificates example (all definitions
is beginning by mbedtls_test_*). None of them is used so we can avoid
include the file.

Closes #8343

3 years agombedtls: enable use of mbedtls without CRL support
MAntoniak [Fri, 28 Jan 2022 12:23:26 +0000 (13:23 +0100)] 
mbedtls: enable use of mbedtls without CRL support

Closes #8344

3 years agoconfigure: set CURL_LIBRARY_PATH for nghttp2
Bernhard Walle [Thu, 27 Jan 2022 17:40:28 +0000 (18:40 +0100)] 
configure: set CURL_LIBRARY_PATH for nghttp2

To execute the test program, we might need the library path so that the
lib is found at runtime.

Closes #8340

3 years agoschannel: restore debug message in schannel_connect_step2
Jay Satiro [Thu, 27 Jan 2022 08:32:37 +0000 (03:32 -0500)] 
schannel: restore debug message in schannel_connect_step2

This is a follow-up to recent commit 2218c3a which removed the debug
message to avoid an unused variable warning. The message has been
reworked to avoid the warning.

Ref: https://github.com/curl/curl/pull/8320#issuecomment-1022957904

Closes https://github.com/curl/curl/pull/8336

3 years agotest3021: disable all msys2 path transformation
Jay Satiro [Tue, 25 Jan 2022 03:53:29 +0000 (22:53 -0500)] 
test3021: disable all msys2 path transformation

- Disable all MSYS2 path transformation in test3021 and test3022.

Prior to this change path transformation in those tests was disabled
only for arguments that start with forward slashes. However arguments
that are in base64 contain forward slashes at any position and caused
unwanted translations.

== Info: Denied establishing ssh session: mismatch sha256 fingerprint.
Remote +/EYG2YDzDGm6yiwepEMSuExgRRMoTi8Di1UN3kixZw= is not equal to
+C:/msys64/EYG2YDzDGm6yiwepEMSuExgRRMoTi8Di1UN3kixZw

In the above example an argument containing a base64 sha256 fingerprint
was passed to curl after MSYS2 translated +/ into +C:/msys64/, and then
the fingerprint didn't match what was expected.

Ref: https://www.msys2.org/wiki/Porting/

Fixes https://github.com/curl/curl/issues/8084
Closes https://github.com/curl/curl/pull/8325

3 years agoCI: move scan-build job from Zuul to Azure Pipelines
Daniel Stenberg [Thu, 27 Jan 2022 13:38:27 +0000 (14:38 +0100)] 
CI: move scan-build job from Zuul to Azure Pipelines

Closes #8338

3 years agoopenssl: fix `ctx_option_t` for OpenSSL v3+
Marcel Raad [Wed, 26 Jan 2022 13:32:57 +0000 (14:32 +0100)] 
openssl: fix `ctx_option_t` for OpenSSL v3+

The options have been changed to `uint64_t` in
https://github.com/openssl/openssl/commit/56bd17830f2d5855b533d923d4e0649d3ed61d11.

Closes https://github.com/curl/curl/pull/8331

3 years agoCI: move 'distcheck' job from zuul to azure pipelines
Daniel Stenberg [Wed, 26 Jan 2022 21:57:54 +0000 (22:57 +0100)] 
CI: move 'distcheck' job from zuul to azure pipelines

Assisted-by: Kushal Das
Closes #8334

3 years agovtls: pass on the right SNI name
Daniel Stenberg [Sat, 22 Jan 2022 22:44:00 +0000 (23:44 +0100)] 
vtls: pass on the right SNI name

The TLS backends convert the host name to SNI name and need to use that.
This involves cutting off any trailing dot and lowercasing.

Co-authored-by: Jay Satiro
Closes #8320

3 years agourl: revert the removal of trailing dot from host name
Daniel Stenberg [Sat, 22 Jan 2022 15:56:00 +0000 (16:56 +0100)] 
url: revert the removal of trailing dot from host name

Reverts 5de8d84098db1bd24e (May 2014, shipped in 7.37.0) and the
follow-up changes done afterward.

Keep the dot in names for everything except the SNI to make curl behave
more similar to current browsers. This means 'name' and 'name.' send the
same SNI for different 'Host:' headers.

Updated test 1322 accordingly

Fixes #8290
Reported-by: Charles Cazabon
Closes #8320

3 years agodocs/TheArtOfHttpScripting: fix capitalization
neutric on github [Wed, 26 Jan 2022 14:11:48 +0000 (15:11 +0100)] 
docs/TheArtOfHttpScripting: fix capitalization

Closes #8333

3 years agotests/memanalyze.pl: also count and show "total allocations"
Daniel Stenberg [Wed, 26 Jan 2022 10:05:45 +0000 (11:05 +0100)] 
tests/memanalyze.pl: also count and show "total allocations"

This is the total number of bytes allocated, increasing for new
allocations and never reduced when freed. The existing "Maximum
allocated" is the high water mark.

Closes #8330

3 years agomailmap: spellfix githuh => github
Daniel Stenberg [Tue, 25 Jan 2022 11:05:06 +0000 (12:05 +0100)] 
mailmap: spellfix githuh => github

3 years agoRELEASE-NOTES: synced
Daniel Stenberg [Tue, 25 Jan 2022 08:27:24 +0000 (09:27 +0100)] 
RELEASE-NOTES: synced

3 years agohostcheck: fixed to not touch used input strings
Daniel Stenberg [Mon, 24 Jan 2022 10:02:55 +0000 (11:02 +0100)] 
hostcheck: fixed to not touch used input strings

Avoids the need to clone the strings before check, thus avoiding
mallocs, which for cases where there are many SAN names in a cert could
end up numerous.

Closes #8321

3 years agongtcp2: adapt to changed end of headers callback proto
Daniel Stenberg [Mon, 24 Jan 2022 10:23:08 +0000 (11:23 +0100)] 
ngtcp2: adapt to changed end of headers callback proto

Closes #8322

3 years agoopenssl: check SSL_get_ex_data to prevent potential NULL dereference
xkernel [Wed, 12 Jan 2022 13:06:00 +0000 (21:06 +0800)] 
openssl: check SSL_get_ex_data to prevent potential NULL dereference

Closes #8268

3 years agomd5: check md5_init_func return value
Jay Satiro [Sat, 22 Jan 2022 00:16:09 +0000 (19:16 -0500)] 
md5: check md5_init_func return value

Prior to this change the md5_init_func (my_md5_init) return value was
ignored.

Closes https://github.com/curl/curl/pull/8319

3 years agomd5: refactor for standard compliance
Jay Satiro [Fri, 21 Jan 2022 22:09:29 +0000 (17:09 -0500)] 
md5: refactor for standard compliance

- Wrap OpenSSL / wolfSSL MD5 functions instead of taking their function
  addresses during static initialization.

Depending on how curl was built the old way may have used a dllimport
function address during static initialization, which is not standard
compliant, resulting in Visual Studio warning C4232 (nonstandard
extension). Instead the function pointers now point to the wrappers
which call the MD5 functions.

This change only affects OpenSSL and wolfSSL because calls to other SSL
libraries' md5 functions were already wrapped. Also sha256.c already
does this for all SSL libraries.

Ref: https://github.com/curl/curl/pull/8298

Closes https://github.com/curl/curl/pull/8318

3 years agodocs: update IETF links to use datatracker
lucas [Fri, 21 Jan 2022 18:52:33 +0000 (18:52 +0000)] 
docs: update IETF links to use datatracker

The tools.ietf.org domain has been deprecated a while now, with the
links being redirected to datatracker.ietf.org.

Rather than make people eat that redirect time, this change switches the
URL to a more canonical source.

Closes #8317

3 years agoCI: test building wolfssl with --enable-opensslextra
Harry Sarson [Fri, 21 Jan 2022 13:31:48 +0000 (13:31 +0000)] 
CI: test building wolfssl with --enable-opensslextra

Closes #8315

3 years agomisc: allow curl to build with wolfssl --enable-opensslextra
Harry Sarson [Fri, 21 Jan 2022 13:32:16 +0000 (13:32 +0000)] 
misc: allow curl to build with wolfssl --enable-opensslextra

put all #include of openssl files behind wolfssl ifdefs so that we can
use the wolfssl/ prefixed include paths. Without these curl only builds
when wolfssl is built with enable-all.

Fixes #8292
Closes #8315

3 years agoquiche: change qlog file extension to `.sqlog`
Lucas Pardue [Fri, 21 Jan 2022 18:38:57 +0000 (18:38 +0000)] 
quiche: change qlog file extension to `.sqlog`

quiche has just switched it's qlog serialization format to JSON-SEQ by
default . The spec says this SHOULD use `.sqlog` extension.

I believe ngtcp2 also supports JSON-SEQ by default as of
https://github.com/ngtcp2/ngtcp2/commit/9baf06fc3f352a1d062b6953ae1de22cae30639d

Let's update curl so that tools know what format we are using!

Closes #8316

3 years agoprojects: Fix Visual Studio wolfSSL configurations
Jay Satiro [Wed, 19 Jan 2022 08:40:46 +0000 (03:40 -0500)] 
projects: Fix Visual Studio wolfSSL configurations

- Change build-wolfssl.bat to disable SSLv3, enable TLSv1.3, enable
  wolfSSL_DES_ecb_encrypt (needed by NTLM) and enable alt cert chains.

- Disable warning C4214 'bit field types other than int'.

- Add include directory wolfssl\wolfssl.

wolfSSL offers OpenSSL API compatibility that libcurl uses, and some
recent change in libcurl included an include file for wolfSSL like
openssl/foo.h, which has a path like wolfssl\wolfssl\openssl\foo.h.

The include directory issue was reported in #8292 but it's currently
unclear whether this type of change is needed for other build systems.

Bug: https://github.com/curl/curl/issues/8292
Reported-by: Harry Sarson
Closes https://github.com/curl/curl/pull/8298

3 years agoopenssl: return error if TLS 1.3 is requested when not supported
Daniel Stenberg [Thu, 20 Jan 2022 16:21:38 +0000 (17:21 +0100)] 
openssl: return error if TLS 1.3 is requested when not supported

Previously curl would just silently ignore it if the necessary defines
are not present at build-time.

Reported-by: Stefan Eissing
Fixes #8309
Closes #8310

3 years agoTODO: Passing NOTIFY option to CURLOPT_MAIL_RCPT
Daniel Stenberg [Thu, 20 Jan 2022 10:29:43 +0000 (11:29 +0100)] 
TODO: Passing NOTIFY option to CURLOPT_MAIL_RCPT

Closes #8232

3 years agoworkflows/wolfssl: install impacket
pheiduck on githuh [Thu, 20 Jan 2022 08:29:12 +0000 (09:29 +0100)] 
workflows/wolfssl: install impacket

needed Python Package for SMB tests

Closes #8307

3 years agourl: make Curl_disconnect return void
Daniel Stenberg [Wed, 19 Jan 2022 12:57:30 +0000 (13:57 +0100)] 
url: make Curl_disconnect return void

 1. The function would only ever return CURLE_OK anyway
 2. Only one caller actually used the return code
 3. Most callers did (void)Curl_disconnect()

Closes #8303

3 years agodocs: document HTTP/2 not insisting on TLS 1.2
Daniel Stenberg [Wed, 19 Jan 2022 10:42:27 +0000 (11:42 +0100)] 
docs: document HTTP/2 not insisting on TLS 1.2

Both for --http2 and CURLOPT_HTTP_VERSION.

Reported-by: jhoyla on github
Fixes #8235
Closes #8300