Commit Graph

182 Commits

Author SHA1 Message Date
Tatsuhiro Tsujikawa
990bfdd7bc
ngtcp2: fix HTTP/3 upload stall and avoid busy loop
This commit fixes HTTP/3 upload stall if upload data is larger than
H3_SEND_SIZE.  Only check writability of socket if a stream is
writable to avoid busy loop when QUIC flow control window is filled
up, or upload buffer is full.

Closes #8688
2022-04-10 23:07:42 +02:00
Nick Banks
37492ebbfa
msh3: add support for QUIC and HTTP/3 using msh3
Considered experimental, as the other HTTP/3 backends.

Closes #8517
2022-04-10 18:23:04 +02:00
Tatsuhiro Tsujikawa
92c0123585
ngtcp2: use token when detecting :status header field
Closes #8679
2022-04-05 16:48:44 +02:00
Tatsuhiro Tsujikawa
913b80d5fd
ngtcp2: make curl 1ms faster
Pass 0 for an already expired timer.

Closes #8678
2022-04-05 16:47:18 +02:00
Tatsuhiro Tsujikawa
1b1443a8ed
ngtcp2: fix QUIC_IDLE_TIMEOUT
QUIC_IDLE_TIMEOUT should be of type ngtcp2_duration which is
nanoseconds resolution.

Closes #8678
2022-04-05 16:47:07 +02:00
Daniel Stenberg
235535cf23
ngtcp2: update to work after recent ngtcp2 updates
Assisted-by: Tatsuhiro Tsujikawa
Reported-by: jurisuk on github
Fixes #8638
Closes #8639
2022-03-26 18:35:23 +01:00
Tatsuhiro Tsujikawa
c82b281e17
ngtcp2: add client certificate authentication for OpenSSL
Closes #8522
2022-03-10 08:41:37 +01:00
Daniel Stenberg
96edc7954f
ngtcp2: disconnect the QUIC connection proper
Reported-by: mehatzri on github
Reviewed-by: Tatsuhiro Tsujikawa
Fixes #8534
closes #8569
2022-03-10 08:26:18 +01:00
Daniel Stenberg
1fa09990ab
misc: update copyright year ranges 2022-03-05 09:41:24 +01:00
Daniel Stenberg
cdf37a53b3
quiche: remove two leftover debug infof() outputs 2022-02-25 11:13:49 +01:00
Tatsuhiro Tsujikawa
6e9373b5f4
ngtcp2: Reset dynbuf when it is fully drained
Reported-by: vl409 on github
Fixes #7351
Closes #8504
2022-02-24 16:56:33 +01:00
Jean-Philippe Menil
145d0803bb
quiche: fix upload for bigger content-length
Signed-off-by: Jean-Philippe Menil <jpmenil@gmail.com>
Closes #8421
2022-02-24 09:34:37 +01:00
Daniel Stenberg
f670665419
quiche: handle stream reset
A stream reset now causes a CURLE_PARTIAL_FILE error. I'm not convinced
this is the right action nor the right error code.

Reported-by: Lucas Pardue
Fixes #8437
Closes #8440
2022-02-13 11:48:32 +01:00
Daniel Stenberg
96f85a0fef
quiche: after leaving h3_recving state, poll again
This could otherwise easily leave libcurl "hanging" after the entire
transfer is done but without noticing the end-of-transfer signal.

Assisted-by: Lucas Pardue
Closes #8436
2022-02-11 10:07:24 +01:00
Daniel Stenberg
6883180fa5
quiche: when *recv_body() returns data, drain it before polling again
Assisted-by: Lucas Pardue

Closes #8429
2022-02-11 08:48:30 +01:00
Daniel Stenberg
a42677f0d8
vquic/vquic.h: removed the unused H3 psuedo defines 2022-02-07 13:56:06 +01:00
Daniel Stenberg
4ab3ed0729
ngtcp2: use Curl_pseudo_headers 2022-02-07 13:56:06 +01:00
Daniel Stenberg
3fa405bb58
quiche: use Curl_pseudo_headers 2022-02-07 13:56:06 +01:00
Daniel Stenberg
79731d1a6c
ngtcp2/quiche: make :scheme possible to set 2022-02-07 13:56:06 +01:00
Daniel Stenberg
136f3e9d68
h2/h3: provide and refer to pseudo headers as defines
... and do sizeof() on the defines to use constants better.

Closes #8389
2022-02-05 11:08:43 +01:00
Daniel Stenberg
f6dd94f640
ngtcp2: adapt to changed end of headers callback proto
Closes #8322
2022-01-24 13:22:54 +01:00
Lucas Pardue
8a3e67e732
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
9baf06fc3f

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

Closes #8316
2022-01-21 22:34:57 +01:00
Alessandro Ghedini
3aee3612b4
quiche: verify the server cert on connect
Similarly to c148f0f551, make quiche correctly acknowledge
`CURLOPT_SSL_VERIFYPEER` and `CURLOPT_SSL_VERIFYHOST`.

Fixes #8173
Closes #8275
2022-01-15 17:47:00 +01:00
Daniel Stenberg
4936e60bb9
ngtcp2: fix declaration of ‘result’ shadows a previous local
Follow-up to 8fbd6feddf

Closes #8245
2022-01-08 14:41:33 +01:00
Daniel Stenberg
8fbd6feddf
ngtcp2: verify the server certificate for the gnutls case
Closes #8178
2021-12-28 23:34:30 +01:00
Daniel Stenberg
c148f0f551
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.

Ref: #8173
Closes #8178
2021-12-28 23:34:23 +01:00
Tatsuhiro Tsujikawa
9db25d213b
ngtcp2: advertise h3 as well as h3-29
Advertise h3 as well as h3-29 since some servers out there require h3
for QUIC v1.

Closes #7979
2021-11-09 11:46:12 +01:00
Tatsuhiro Tsujikawa
10bc426dd2
ngtcp2: use QUIC v1 consistently
Since we switched to v1 quic_transport_parameters codepoint in #7960
with quictls, lets use QUIC v1 consistently.

Closes #7979
2021-11-09 11:45:41 +01:00
Tatsuhiro Tsujikawa
d9d842989c
ngtcp2: compile with the latest nghttp3
Closes #7978
2021-11-09 11:40:00 +01:00
Amaury Denoyelle
d1624b94f0
ngtcp2: support latest QUIC TLS RFC9001
QUIC Transport Parameters Extension has been changed between draft-29
and latest RFC9001. Most notably, its identifier has been updated from
0xffa5 to 0x0039. The version is selected through the QUIC TLS library
via the legacy codepoint.

Disable the usage of legacy codepoint in curl to switch to latest
RFC9001. This is required to be able to keep up with latest QUIC
implementations.

Acked-by: Tatsuhiro Tsujikawa
Closes #7960
2021-11-05 10:42:46 +01:00
Tatsuhiro Tsujikawa
e05c08687f
ngtcp2: specify the missing required callback functions
Closes #7929
2021-11-01 15:54:24 +01:00
Jun-ya Kato
4a10a99ef0
ngtcp2: fix QUIC transport parameter version
fix inappropriate version setting for QUIC transport parameters.
this patch keeps curl with ngtcp2 uses QUIC draft version (h3-29).

Closes #7771
2021-09-25 16:06:13 +02:00
Tatsuhiro Tsujikawa
24a7cbe9d2
ngtcp2: fix build with ngtcp2 and nghttp3
ngtcp2_conn_client_new and nghttp3_conn_client_new are now macros.
Check the wrapped functions instead.

ngtcp2_stream_close callback now takes flags parameter.

Closes #7709
2021-09-12 12:34:32 +02:00
Daniel Stenberg
4fb5a643c8
ngtcp2: adapt to new size defintions upstream
Reviewed-by: Tatsuhiro Tsujikawa
Closes #7699
2021-09-10 16:52:29 +02:00
Tatsuhiro Tsujikawa
14da6eb4e5
ngtcp2: stop buffering crypto data
Stop buffering crypto data because libngtcp2 now buffers submitted
crypto data.

Closes #7637
2021-08-26 16:31:59 +02:00
Daniel Stenberg
44f88e662f
ngtcp2: remove the acked_crypto_offset struct field init
... as it is gone from the API upstream.

Closes #7578
2021-08-16 23:06:36 +02:00
Tatsuhiro Tsujikawa
2bfa57bff1
ngtcp2: utilize crypto API functions to simplify
Closes #7551
2021-08-10 23:17:28 +02:00
megatronking
09cea3fbef
ngtcp2: reset the oustanding send buffer again when drained
Closes #7538
2021-08-10 23:07:42 +02:00
Tatsuhiro Tsujikawa
dff44c2955
ngtcp2: replace deprecated functions with nghttp3_conn_shutdown_stream_read
Closes #7546
2021-08-09 16:53:32 +02:00
Tatsuhiro Tsujikawa
636006dd36
ngtcp2: rework the return value handling of ngtcp2_conn_writev_stream
Rework the return value handling of ngtcp2_conn_writev_stream and treat
NGTCP2_ERR_STREAM_SHUT_WR separately.

Closes #7546
2021-08-09 16:53:11 +02:00
Tatsuhiro Tsujikawa
e3dbdd5468
ngtcp2: compile with the latest ngtcp2 and nghttp3
Closes #7541
2021-08-08 18:02:27 +02:00
Daniel Stenberg
e7416cfd2b
infof: remove newline from format strings, always append it
- the data needs to be "line-based" anyway since it's also passed to the
  debug callback/application

- it makes infof() work like failf() and consistency is good

- there's an assert that triggers on newlines in the format string

- Also removes a few instances of "..."

- Removes the code that would append "..." to the end of the data *iff*
  it was truncated in infof()

Closes #7357
2021-07-07 22:54:01 +02:00
Daniel Stenberg
63c7668182
version: turn version number functions into returning void
... as we never use the return codes from them.

Reviewed-by: Daniel Gustafsson
Closes #7319
2021-06-30 23:23:34 +02:00
Bachue Zhou
a8472bb8ea
quiche: use send() instead of sendto() to avoid macOS issue
sendto() always returns "Socket is already connected" error on macos

Closes #7260
2021-06-21 14:54:51 +02:00
Jun-ya Kato
a3a298da5e
ngtcp2: disable TLSv1.3 compatible mode when using GnuTLS
The latest GnuTLS-3.7.2 implements disable switch for TLSv1.3 compatible
mode for middle box but it is enabled by default, which is unnecessary
for QUIC.

Fixes #6896
Closes #7202
2021-06-08 16:10:39 +02:00
Alessandro Ghedini
424aa64d54
quiche: update for network path aware API
Latest version of quiche requires the application to pass the peer
address of received packets, and it provides the address for outgoing
packets back.

Closes #7120
2021-05-24 17:26:46 +02:00
Daniel Stenberg
b1dded68e3
h3: add 'attach' callback to protocol handlers
Follow-up to 0c55fbab45

Reviewed-by: Emil Engler
Closes #7090
2021-05-19 00:29:09 +02:00
Daniel Stenberg
5c53bd980b
ngtcp2: fix the cb_acked_stream_data_offset proto
The 'datalen' value should be 64 bit, not size_t!

Reported-by: Dmitry Karpov
Bug: https://curl.se/mail/lib-2021-05/0019.html
Closes #7027
2021-05-07 08:39:36 +02:00
Daniel Stenberg
063d3f3b96
tidy-up: make conditional checks more consistent
... remove '== NULL' and '!= 0'

Closes #6912
2021-04-22 09:10:17 +02:00
Tatsuhiro Tsujikawa
f141b0bbf7
ngtcp2: Use ALPN h3-29 for now
Fixes #6864
Cloes #6886
2021-04-13 14:22:32 +02:00