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
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
Daniel Stenberg
4ab3ed0729
ngtcp2: 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
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
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
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
Daniel Stenberg
33ddef3617
ngtcp2+gnutls: clear credentials when freed
...
... to avoid double-free.
Reported-by: Kenneth Davidson
Fixes #6824
Closes #6856
2021-04-07 00:07:10 +02:00
Daniel Stenberg
c915662485
ngtcp2: sync with recent API updates
...
Closes #6770
2021-03-22 10:45:00 +01:00
Jun-ya Kato
6043dfa4f9
ngtcp2: Fix build error due to change in ngtcp2_addr_init
...
ngtcp2/ngtcp2@b8d90a9 changed the function prototype.
Closes https://github.com/curl/curl/pull/6716
2021-03-10 16:52:09 -05:00
Marcel Raad
89193ed518
ngtcp2: clarify calculation precedence
...
As suggested by Codacy/cppcheck.
Closes https://github.com/curl/curl/pull/6576
2021-02-10 16:47:49 +01:00
Marcel Raad
1cd823ed5a
lib: remove redundant code
...
Closes https://github.com/curl/curl/pull/6576
2021-02-10 16:47:27 +01:00
Marcel Raad
a774b3f304
lib: reduce variable scopes
...
Closes https://github.com/curl/curl/pull/6576
2021-02-10 16:47:03 +01:00
Daniel Stenberg
ec5d9b44a2
ngtcp2: adapt to the new recv_datagram callback
2021-02-09 23:25:20 +01:00
Jay Satiro
cb2dc1ba89
lib: use int type for more port variables
...
This is a follow-up to 764c6bd . Prior to that change port variables
were usually type long.
Closes https://github.com/curl/curl/pull/6553
2021-02-09 02:53:31 -05:00
Jay Satiro
fc9d3444d1
ngtcp2: Fix build error due to change in ngtcp2_settings
...
- Separate ngtcp2_transport_params.
ngtcp2/ngtcp2@05d7adc made ngtcp2_transport_params separate from
ngtcp2_settings.
ngtcp2 master is required to build curl with http3 support.
Closes #6554
2021-02-02 08:19:12 +01:00
Tatsuhiro Tsujikawa
d3ca0771d2
ngtcp2: Fix http3 upload stall
...
Closes #6521
2021-01-26 17:13:04 +01:00
Tatsuhiro Tsujikawa
a1338d4297
ngtcp2: Fix stack buffer overflow
...
Closes #6521
2021-01-26 17:12:47 +01:00
Daniel Stenberg
2bdec0b363
quic: remove conn->data use
...
Closes #6485
2021-01-19 16:56:35 +01:00
Daniel Stenberg
215db086e0
lib: pass in 'struct Curl_easy *' to most functions
...
... in most cases instead of 'struct connectdata *' but in some cases in
addition to.
- We mostly operate on transfers and not connections.
- We need the transfer handle to log, store data and more. Everything in
libcurl is driven by a transfer (the CURL * in the public API).
- This work clarifies and separates the transfers from the connections
better.
- We should avoid "conn->data". Since individual connections can be used
by many transfers when multiplexing, making sure that conn->data
points to the current and correct transfer at all times is difficult
and has been notoriously error-prone over the years. The goal is to
ultimately remove the conn->data pointer for this reason.
Closes #6425
2021-01-17 23:56:09 +01:00
Daniel Stenberg
aba01da639
failf: remove newline from formatting strings
...
... as failf adds one itself.
Also: add an assert() to failf() that triggers on a newline in the
format string!
Closes #6365
2020-12-25 23:42:16 +01:00
Daniel Stenberg
32793b2c4f
ngtcp2: make it build it current master again
...
Closes #6296
2020-12-10 08:57:07 +01:00
Jay Satiro
2d1df660bc
ngtcp2: Fix build error due to symbol name change
...
- NGTCP2_CRYPTO_LEVEL_APP -> NGTCP2_CRYPTO_LEVEL_APPLICATION
ngtcp2/ngtcp2@76232e9 changed the name.
ngtcp2 master is required to build curl with http3 support.
Closes https://github.com/curl/curl/pull/6271
2020-12-02 16:06:57 -05:00