Commit Graph

30931 Commits

Author SHA1 Message Date
Daniel Stenberg
fe599ff090
THANKS-filter: pszlazak on github 2023-09-09 23:48:12 +02:00
pszlazak
ba30c5e0da
include.d: explain headers not printed with --fail before 7.75.0
Prior to 7.75.0 response headers were not printed if -f/--fail was used
and an error was reported by server.  This was fixed in ab525c0
(precedes 7.75.0).

Closes #11822
2023-09-09 23:20:09 +02:00
Daniel Stenberg
16bdc09ee0
http_aws_sigv4: skip the op if the query pair is zero bytes
Follow-up to fc76a24c53

Spotted by OSS-Fuzz

Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62175
Closes #11823
2023-09-08 22:15:20 +02:00
Daniel Stenberg
4600bd3993
cmdline-docs: use present tense, not future
+ some smaller cleanups

Closes #11821
2023-09-08 16:57:33 +02:00
Daniel Stenberg
bfb48e33fb
cmdline-docs: make sure to phrase it as "added in ...."
References to things that were added or changed in a specific version
should be specified as "(added in [version]) for two reasons:

1 - consistency

2 - to allow gen.pl to strip them out if deemed referring to too old
    versions

Closes #11821
2023-09-08 16:57:25 +02:00
Jay Satiro
fa7df3070a docs: mark --ssl-revoke-best-effort as Schannel specific
Closes https://github.com/curl/curl/pull/11760
2023-09-08 03:49:06 -04:00
Nathan Moinvaziri
f6700c744b schannel: fix ordering of cert chain info
- Use CERT_CONTEXT's pbCertEncoded to determine chain order.

CERT_CONTEXT from SECPKG_ATTR_REMOTE_CERT_CONTEXT contains
end-entity/server certificate in pbCertEncoded. We can use this pointer
to determine the order of certificates when enumerating hCertStore using
CertEnumCertificatesInStore.

This change is to help ensure that the ordering of the certificate chain
requested by the user via CURLINFO_CERTINFO has the same ordering on all
versions of Windows.

Prior to this change Schannel certificate order was reversed in 8986df80
but that was later reverted in f540a39b when it was discovered that
Windows 11 22H2 does the reversal on its own.

Ref: https://github.com/curl/curl/issues/9706

Closes https://github.com/curl/curl/pull/11632
2023-09-08 03:47:13 -04:00
Chris Talbot
7703ca7f86 digest: Use hostname to generate spn instead of realm
In https://www.rfc-editor.org/rfc/rfc2831#section-2.1.2

digest-uri-value should be serv-type "/" host , where host is:

      The DNS host name or IP address for the service requested.  The
      DNS host name must be the fully-qualified canonical name of the
      host. The DNS host name is the preferred form; see notes on server
      processing of the digest-uri.

Realm may not be the host, so we must specify the host explicitly.

Note this change only affects the non-SSPI digest code. The digest code
used by SSPI builds already uses the hostname to generate the spn.

Ref: https://github.com/curl/curl/issues/11369

Closes https://github.com/curl/curl/pull/11395
2023-09-08 03:23:44 -04:00
Daniel Stenberg
945db0d958
docs: remove use of the word 'very'
It is mostly superfluous. proselint would complain.

Closes #11818
2023-09-07 22:52:07 +02:00
Daniel Stenberg
28f8440c0b
curl_multi_remove_handle.3: clarify what happens with connection
Closes #11817
2023-09-07 19:47:02 +02:00
Daniel Stenberg
63b9073c6a
RELEASE-NOTES: synced 2023-09-07 18:24:49 +02:00
Daniel Stenberg
656610160f
test439: verify query canonization for aws-sigv4 2023-09-07 17:50:43 +02:00
Daniel Stenberg
c5a9630739
tool_operate: make aws-sigv4 not require TLS to be used
Maybe not used too often, but we want it for testing and it should work.
2023-09-07 17:50:27 +02:00
Daniel Stenberg
fc76a24c53
http_aws_sigv4: canonicalize the query
Percent encoding needs to be done using uppercase, and most
non-alphanumerical must be percent-encoded.

Fixes #11794
Reported-by: John Walker
Closes #11806
2023-09-07 17:50:13 +02:00
Wyatt O'Day
e92edfbef6
lib: add ability to disable auths individually
Both with configure and cmake

Closes #11490
2023-09-07 17:45:06 +02:00
Stefan Eissing
33dac9dfac
ngtcp2: fix handling of large requests
- requests >64K are send in parts to the filter
- fix parsing of the request to assemble it correctly
  from several sends
- open a QUIC stream only when the complete request has
  been collected

Closes #11815
2023-09-07 17:32:47 +02:00
Stefan Eissing
c849062677
openssl: when CURLOPT_SSL_CTX_FUNCTION is registered, init x509 store before
- we delay loading the x509 store to shorten the handshake time.
  However an application callback installed via CURLOPT_SSL_CTX_FUNCTION
  may need to have the store loaded and try to manipulate it.
- load the x509 store before invoking the app callback

Fixes #11800
Reported-by: guoxinvmware on github
Cloes #11805
2023-09-07 16:18:48 +02:00
Daniel Stenberg
25907fd5ba
krb5: fix "implicit conversion loses integer precision" warnings
conversions to/from enum and unsigned chars

Closes #11814
2023-09-07 16:17:13 +02:00
Stefan Eissing
3b30cc1a0d
pytest: improvements
- set CURL_CI for pytest runs in CI environments
- exclude timing sensitive tests from CI runs
- for failed results, list only the log and stat of
  the failed transfer

- fix type in http.c comment

Closes #11812
2023-09-07 10:30:14 +02:00
Stefan Eissing
108e51835e
CI: move on to ngtcp2 v0.19.1
Closes #11809
2023-09-06 23:11:30 +02:00
Dan Fandrich
2683de3078 CI: run Circle macOS builds on x86 for now
The ARM machines aren't ready for us and requesting them now causes
warnings e-mails to be sent to some PR pushers.

Ref: #11771
2023-09-05 22:53:40 -07:00
Viktor Szakats
c63a4b6544
http3: adjust cast for ngtcp2 v0.19.0
ngtcp2 v0.19.0 made size of `ecn` member of `ngtcp2_pkt_info`
an `uint8_t` (was: `uint32_t`). Adjust our local cast accordingly.

Fixes:
```
./curl/lib/vquic/curl_ngtcp2.c:1912:12: warning: implicit conversion loses integer precision: 'uint32_t' (aka 'unsigned int') to 'uint8_t' (aka 'unsigned char') [-Wimplicit-int-conversion]
  pi.ecn = (uint32_t)ecn;
         ~ ^~~~~~~~~~~~~
```

Also bump ngtcp2, nghttp3 and nghttp2 to their latest versions in our
docs and CI.

Ref: 80447281bb
Ref: https://github.com/ngtcp2/ngtcp2/pull/877
Closes #11798
2023-09-05 15:25:37 +00:00
Stefan Eissing
2485547da0
http: fix sending of large requests
- refs #11342 where errors with git https interactions
  were observed
- problem was caused by 1st sends of size larger than 64KB
  which resulted in later retries of 64KB only
- limit sending of 1st block to 64KB
- adjust h2/h3 filters to cope with parsing the HTTP/1.1
  formatted request in chunks

- introducing Curl_nwrite() as companion to Curl_write()
  for the many cases where the sockindex is already known

Fixes #11342 (again)
Closes #11803
2023-09-05 16:36:03 +02:00
Stefan Eissing
a8a82140aa
pytest: fix check for slow_network skips to only apply when intended
Closes #11801
2023-09-05 14:10:01 +02:00
Daniel Stenberg
dd5999b686
curl_url_get/set.3: add missing semicolon in SYNOPSIS 2023-09-05 11:30:53 +02:00
Daniel Stenberg
a8f21bb40b
CURLOPT_URL.3: explain curl_url_set() uses the same parser 2023-09-05 11:16:39 +02:00
Daniel Stenberg
cb1197cbfb
CURLOPT_URL.3: add two URL API calls in the see-also section 2023-09-05 10:34:42 +02:00
Dan Fandrich
22b1f7d032 CI: add a 32-bit i686 Linux build
This is done by cross-compiling under regular x86_64 Linux.  Since the
kernel offers backwards compatibility, the binaries can be tested as
normal.

Closes #11799
2023-09-04 17:11:44 -07:00
Dan Fandrich
876278935f tests: fix a type warning on 32-bit x86 2023-09-04 17:10:07 -07:00
Viktor Szakats
205d686ce1
tests: delete stray .orig file
Follow-up to 331b89a319
Closes #11797
2023-09-04 22:20:16 +00:00
Daniel Stenberg
78e133e942
RELEASE-NOTES: synced 2023-09-04 22:29:18 +02:00
Viktor Szakats
3a6287d726
lib: silence compiler warning in inet_ntop6
```
./curl/lib/inet_ntop.c:121:21: warning: possible misuse of comma operator here [-Wcomma]
        cur.base = i, cur.len = 1;
                    ^
./curl/lib/inet_ntop.c:121:9: note: cast expression to void to silence warning
        cur.base = i, cur.len = 1;
        ^~~~~~~~~~~~
        (void)(     )
```

Closes #11790
2023-09-04 18:56:49 +00:00
Daniel Stenberg
95a865b462
transfer: also stop the sending on closed connection
Previously this cleared the receiving bit only but in some cases it is
also still sending (like a request-body) when disconnected and neither
direction can continue then.

Fixes #11769
Reported-by: Oleg Jukovec
Closes #11795
2023-09-04 19:51:59 +02:00
John Bampton
356567c649
docs: change sub-domain to subdomain
https://en.wikipedia.org/wiki/Subdomain

Closes #11793
2023-09-04 19:51:27 +02:00
Stefan Eissing
519b1cf97b
multi: more efficient pollfd count for poll
- do not use separate pollfds for sockets that have POLLIN+POLLOUT

Closes #11792
2023-09-04 19:50:22 +02:00
Stefan Eissing
331b89a319
http2: polish things around POST
- added test cases for various code paths
- fixed handling of blocked write when stream had
  been closed inbetween attempts
- re-enabled DEBUGASSERT on send with smaller data size

- in debug builds, environment variables can be set to simulate a slow
  network when sending data. cf-socket.c and vquic.c support
  * CURL_DBG_SOCK_WBLOCK: percentage of send() calls that should be
    answered with a EAGAIN. TCP/UNIX sockets.
    This is chosen randomly.
  * CURL_DBG_SOCK_WPARTIAL: percentage of data that shall be written
    to the network. TCP/UNIX sockets.
    Example: 80 means a send with 1000 bytes would only send 800
    This is applied to every send.
  * CURL_DBG_QUIC_WBLOCK: percentage of send() calls that should be
    answered with EAGAIN. QUIC only.
    This is chosen randomly.

Closes #11756
2023-09-04 19:48:49 +02:00
Daniel Stenberg
c9260cf9fe
docs: add curl_global_trace to some SEE ALSO sections
Closes #11791
2023-09-04 09:54:10 +02:00
Daniel Stenberg
8c040ca3d3
os400: fix checksrc nits
Closes #11789
2023-09-03 19:12:28 +02:00
Nicholas Nethercote
50aa325742
hyper: remove hyptransfer->endtask
`Curl_hyper_stream` needs to distinguish between two kinds of
`HYPER_TASK_EMPTY` tasks: (a) the `foreach` tasks it creates itself, and
(b) background tasks that hyper produces. It does this by recording the
address of any `foreach` task in `hyptransfer->endtask` before pushing
it into the executor, and then comparing that against the address of
tasks later polled out of the executor.

This works right now, but there is no guarantee from hyper that the
addresses are stable. `hyper_executor_push` says "The executor takes
ownership of the task, which should not be accessed again unless
returned back to the user with `hyper_executor_poll`". That wording is a
bit ambiguous but with my Rust programmer's hat on I read it as meaning
the task returned with `hyper_executor_poll` may be conceptually the
same as a task that was pushed, but that there are no other guarantees
and comparing addresses is a bad idea.

This commit instead uses `hyper_task_set_userdata` to mark the `foreach`
task with a `USERDATA_RESP_BODY` value which can then be checked for,
removing the need for `hyptransfer->endtask`. This makes the code look
more like that hyper C API examples, which use userdata for every task
and never look at task addresses.

Closes #11779
2023-09-03 18:42:37 +02:00
Dave Cottlehuber
a86fcb284f
ws: fix spelling mistakes in examples and tests
Closes #11784
2023-09-03 18:01:58 +02:00
Daniel Stenberg
dffd996e3b
tool_filetime: make -z work with file dates before 1970
Fixes #11785
Reported-by: Harry Sintonen
Closes #11786
2023-09-03 17:45:19 +02:00
Dan Fandrich
5949369c9f build: fix portability of mancheck and checksrc targets
At least FreeBSD preserves cwd across makefile lines, so rules
consisting of more than one "cd X; do_something" must be explicitly run
in a subshell to avoid this. This problem caused the Cirrus FreeBSD
build to fail when parallel make jobs were enabled.
2023-09-01 15:08:39 -07:00
Dan Fandrich
78e0938fcc CI: adjust labeler match patterns for new & obsolete files 2023-09-01 15:08:39 -07:00
Dan Fandrich
a20fbb0348 configure: trust pkg-config when it's used for zlib
The library flags retrieved from pkg-config were later thrown out and
harded-coded, which negates the whole reason to use pkg-config.
Also, previously, the assumption was made that --libs-only-l and
--libs-only-L are the full decomposition of --libs, which is untrue and
would not allow linking against a static zlib. The new approach is
better in that it uses --libs, although only if --libs-only-l returns
nothing.

Bug: https://curl.se/mail/lib-2023-08/0081.html
Reported-by: Randall
Closes #11778
2023-09-01 15:08:39 -07:00
Stefan Eissing
280f90061a
CI/ngtcp2: clear wolfssl for when cache is ignored
Closes #11783
2023-09-01 23:48:47 +02:00
Daniel Stenberg
cb5e18100a
RELEASE-NOTES: synced 2023-09-01 14:59:50 +02:00
Nicholas Nethercote
73f4ef584f
hyper: fix a progress upload counter bug
`Curl_pgrsSetUploadCounter` should be a passed a total count, not an
increment.

This changes the failing diff for test 579 with hyper from this:
```
 Progress callback called with UL 0 out of 0[LF]
-Progress callback called with UL 8 out of 0[LF]
-Progress callback called with UL 16 out of 0[LF]
-Progress callback called with UL 26 out of 0[LF]
-Progress callback called with UL 61 out of 0[LF]
-Progress callback called with UL 66 out of 0[LF]
+Progress callback called with UL 29 out of 0[LF]
```
to this:
```
 Progress callback called with UL 0 out of 0[LF]
-Progress callback called with UL 8 out of 0[LF]
-Progress callback called with UL 16 out of 0[LF]
-Progress callback called with UL 26 out of 0[LF]
-Progress callback called with UL 61 out of 0[LF]
-Progress callback called with UL 66 out of 0[LF]
+Progress callback called with UL 40 out of 0[LF]
```
Presumably a step in the right direction.

Closes #11780
2023-09-01 14:44:12 +02:00
Daniel Stenberg
b8dabfb1e1
awssiv4: avoid freeing the date pointer on error
Since it was not allocated, don't free it even if it was wrong syntax

Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=61908

Follow-up to b137634ba3

Closes #11782
2023-09-01 13:36:10 +02:00
Stefan Eissing
289cd4073c
CI: ngtcp2-linux: use separate caches for tls libraries
allow ever changing master for wolfssl

Closes #11766
2023-09-01 13:35:00 +02:00
Stefan Eissing
1c9781475c replace master as wolfssl-version with recent commit 2023-09-01 11:43:55 +02:00