#
0fbbc80b |
| 04-Dec-2023 |
Stefan Eissing |
ngtcp2: ignore errors on unknown streams - expecially in is_alive checks on connections, we might see incoming packets on streams already forgotten and closed, leading to errors
ngtcp2: ignore errors on unknown streams - expecially in is_alive checks on connections, we might see incoming packets on streams already forgotten and closed, leading to errors reported by nghttp3. Ignore those. Closes #12449
show more ...
|
#
781cd3e8 |
| 01-Dec-2023 |
Stefan Eissing |
ngtcp2: fix races in stream handling - fix cases where ngtcp2 invokes callbacks on streams that nghttp3 has already forgotten. Ignore the NGHTTP3_ERR_STREAM_NOT_FOUND in these ca
ngtcp2: fix races in stream handling - fix cases where ngtcp2 invokes callbacks on streams that nghttp3 has already forgotten. Ignore the NGHTTP3_ERR_STREAM_NOT_FOUND in these cases as it is normal behaviour. Closes #12435
show more ...
|
#
247defa7 |
| 24-Nov-2023 |
Stefan Eissing |
quic: make eyeballers connect retries stop at weird replies - when a connect immediately goes into DRAINING state, do not attempt retries in the QUIC connection filter. Instead,
quic: make eyeballers connect retries stop at weird replies - when a connect immediately goes into DRAINING state, do not attempt retries in the QUIC connection filter. Instead, return CURLE_WEIRD_SERVER_REPLY - When eyeballing, interpret CURLE_WEIRD_SERVER_REPLY as an inconclusive answer. When all addresses have been attempted, rewind the address list once on an inconclusive answer. - refs #11832 where connects were retried indefinitely until the overall timeout fired Closes #12400
show more ...
|
#
00697785 |
| 22-Nov-2023 |
Viktor Szakats |
openssl: fix building with v3 `no-deprecated` + add CI test - build quictls with `no-deprecated` in CI to have test coverage for this OpenSSL 3 configuration. - don't call `Op
openssl: fix building with v3 `no-deprecated` + add CI test - build quictls with `no-deprecated` in CI to have test coverage for this OpenSSL 3 configuration. - don't call `OpenSSL_add_all_algorithms()`, `OpenSSL_add_all_digests()`. The caller code is meant for OpenSSL 3, while these two functions were only necessary before OpenSSL 1.1.0. They are missing from OpenSSL 3 if built with option `no-deprecated`, causing build errors: ``` vtls/openssl.c:4097:3: error: call to undeclared function 'OpenSSL_add_all_algorithms'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] vtls/openssl.c:4098:3: error: call to undeclared function 'OpenSSL_add_all_digests'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] ``` Ref: https://ci.appveyor.com/project/curlorg/curl-for-win/builds/48587418?fullLog=true#L7667 Regression from b6e6d4ff8f253c8b8055bab9d4d6a10f9be109f3 #12030 Bug: https://github.com/curl/curl/issues/12380#issuecomment-1822944669 Reviewed-by: Alex Bozarth - vquic/curl_ngtcp2: fix using `SSL_get_peer_certificate` with `no-deprecated` quictls 3 builds. Do it by moving an existing solution for this from `vtls/openssl.c` to `vtls/openssl.h` and adjusting caller code. ``` vquic/curl_ngtcp2.c:1950:19: error: implicit declaration of function 'SSL_get_peer_certificate'; did you mean 'SSL_get1_peer_certificate'? [-Wimplicit-function-declaration] ``` Ref: https://github.com/curl/curl/actions/runs/6960723097/job/18940818625#step:24:1178 - curl_ntlm_core: fix `-Wunused-parameter`, `-Wunused-variable` and `-Wunused-function` when trying to build curl with NTLM enabled but without the necessary TLS backend (with DES) support. Closes #12384
show more ...
|
#
b06b6216 |
| 20-Nov-2023 |
Stefan Eissing |
HTTP/2, HTTP/3: handle detach of onoing transfers - refs #12356 where a UAF is reported when closing a connection with a stream whose easy handle was cleaned up already - handle DE
HTTP/2, HTTP/3: handle detach of onoing transfers - refs #12356 where a UAF is reported when closing a connection with a stream whose easy handle was cleaned up already - handle DETACH events same as DONE events in h2/h3 filters Fixes #12356 Reported-by: Paweł Wegner Closes #12364
show more ...
|
#
fa714830 |
| 17-Nov-2023 |
Stefan Eissing |
vtls/vquic, keep peer name information together - add `struct ssl_peer` to keep hostname, dispname and sni for a filter - allocate `sni` for use in VTLS backend - eliminate `Cu
vtls/vquic, keep peer name information together - add `struct ssl_peer` to keep hostname, dispname and sni for a filter - allocate `sni` for use in VTLS backend - eliminate `Curl_ssl_snihost()` and its use of the download buffer - use ssl_peer in SSL and QUIC filters Closes #12349
show more ...
|
#
bc8509a7 |
| 07-Nov-2023 |
Sam James |
misc: fix -Walloc-size warnings GCC 14 introduces a new -Walloc-size included in -Wextra which gives: ``` src/tool_operate.c: In function ‘add_per_transfer’: src/tool_operat
misc: fix -Walloc-size warnings GCC 14 introduces a new -Walloc-size included in -Wextra which gives: ``` src/tool_operate.c: In function ‘add_per_transfer’: src/tool_operate.c:213:5: warning: allocation of insufficient size ‘1’ for type ‘struct per_transfer’ with size ‘480’ [-Walloc-size] 213 | p = calloc(sizeof(struct per_transfer), 1); | ^ src/var.c: In function ‘addvariable’: src/var.c:361:5: warning: allocation of insufficient size ‘1’ for type ‘struct var’ with size ‘32’ [-Walloc-size] 361 | p = calloc(sizeof(struct var), 1); | ^ ``` The calloc prototype is: ``` void *calloc(size_t nmemb, size_t size); ``` So, just swap the number of members and size arguments to match the prototype, as we're initialising 1 struct of size `sizeof(struct ...)`. GCC then sees we're not doing anything wrong. Closes #12292
show more ...
|
#
bf0e278a |
| 26-Oct-2023 |
Stefan Eissing |
vtls: cleanup SSL config management - remove `Curl_ssl_get_config()`, no longer needed Closes #12204
|
#
47f5b1a3 |
| 04-Sep-2023 |
Stefan Eissing |
lib: introduce struct easy_poll_set for poll information Connection filter had a `get_select_socks()` method, inspired by the various `getsocks` functions involved during the lifetime of
lib: introduce struct easy_poll_set for poll information Connection filter had a `get_select_socks()` method, inspired by the various `getsocks` functions involved during the lifetime of a transfer. These, depending on transfer state (CONNECT/DO/DONE/ etc.), return sockets to monitor and flag if this shall be done for POLLIN and/or POLLOUT. Due to this design, sockets and flags could only be added, not removed. This led to problems in filters like HTTP/2 where flow control prohibits the sending of data until the peer increases the flow window. The general transfer loop wants to write, adds POLLOUT, the socket is writeable but no data can be written. This leads to cpu busy loops. To prevent that, HTTP/2 did set the `SEND_HOLD` flag of such a blocked transfer, so the transfer loop cedes further attempts. This works if only one such filter is involved. If a HTTP/2 transfer goes through a HTTP/2 proxy, two filters are setting/clearing this flag and may step on each other's toes. Connection filters `get_select_socks()` is replaced by `adjust_pollset()`. They get passed a `struct easy_pollset` that keeps up to `MAX_SOCKSPEREASYHANDLE` sockets and their `POLLIN|POLLOUT` flags. This struct is initialized in `multi_getsock()` by calling the various `getsocks()` implementations based on transfer state, as before. After protocol handlers/transfer loop have set the sockets and flags they want, the `easy_pollset` is *always* passed to the filters. Filters "higher" in the chain are called first, starting at the first not-yet-connection one. Each filter may add sockets and/or change flags. When all flags are removed, the socket itself is removed from the pollset. Example: * transfer wants to send, adds POLLOUT * http/2 filter has a flow control block, removes POLLOUT and adds POLLIN (it is waiting on a WINDOW_UPDATE from the server) * TLS filter is connected and changes nothing * h2-proxy filter also has a flow control block on its tunnel stream, removes POLLOUT and adds POLLIN also. * socket filter is connected and changes nothing * The resulting pollset is then mixed together with all other transfers and their pollsets, just as before. Use of `SEND_HOLD` is no longer necessary in the filters. All filters are adapted for the changed method. The handling in `multi.c` has been adjusted, but its state handling the the protocol handlers' `getsocks` method are untouched. The most affected filters are http/2, ngtcp2, quiche and h2-proxy. TLS filters needed to be adjusted for the connecting handshake read/write handling. No noticeable difference in performance was detected in local scorecard runs. Closes #11833
show more ...
|
#
9cc57875 |
| 10-Oct-2023 |
Stefan Eissing |
quic: manage connection idle timeouts - configure a 120s idle timeout on our side of the connection - track the timestamp when actual socket IO happens - check IO timestamp to our *a
quic: manage connection idle timeouts - configure a 120s idle timeout on our side of the connection - track the timestamp when actual socket IO happens - check IO timestamp to our *and* the peer's idle timeouts in "is this connection alive" checks Reported-by: calvin2021y on github Fixes #12064 Closes #12077
show more ...
|
#
5032f04e |
| 08-Oct-2023 |
Viktor Szakats |
quic: fix BoringSSL build Add guard around `SSL_CTX_set_ciphersuites()` use. Bug: https://github.com/curl/curl/pull/12065#issuecomment-1752171885 Follow-up to aa9a6a177017e
quic: fix BoringSSL build Add guard around `SSL_CTX_set_ciphersuites()` use. Bug: https://github.com/curl/curl/pull/12065#issuecomment-1752171885 Follow-up to aa9a6a177017e4b74d33cdf85a3594900f4a7f81 Co-authored-by: Jay Satiro Reviewed-by: Daniel Stenberg Closes #12067
show more ...
|
#
0e4bef08 |
| 08-Oct-2023 |
Viktor Szakats |
h3: add support for ngtcp2 with AWS-LC builds ``` curl 8.4.0-DEV (x86_64-apple-darwin) libcurl/8.4.0-DEV (SecureTransport) AWS-LC/1.15.0 nghttp2/1.56.0 ngtcp2/0.19.1 nghttp3/0.15.0 R
h3: add support for ngtcp2 with AWS-LC builds ``` curl 8.4.0-DEV (x86_64-apple-darwin) libcurl/8.4.0-DEV (SecureTransport) AWS-LC/1.15.0 nghttp2/1.56.0 ngtcp2/0.19.1 nghttp3/0.15.0 Release-Date: [unreleased] Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet tftp ws wss Features: alt-svc AsynchDNS HSTS HTTP2 HTTP3 HTTPS-proxy IPv6 Largefile MultiSSL NTLM SSL threadsafe UnixSockets ``` Also delete an obsolete GnuTLS TODO and update the header comment in `FindNGTCP2.cmake`. Reviewed-by: Daniel Stenberg Closes #12066
show more ...
|
#
463528b0 |
| 29-Sep-2023 |
Daniel Stenberg |
wolfssl: ignore errors in CA path The default wolfSSL_CTX_load_verify_locations() function is quite picky with the certificates it loads and will for example return error if just one
wolfssl: ignore errors in CA path The default wolfSSL_CTX_load_verify_locations() function is quite picky with the certificates it loads and will for example return error if just one of the certs has expired. With the *_ex() function and its WOLFSSL_LOAD_FLAG_IGNORE_ERR flag, it behaves more similar to what OpenSSL does by default. Even the set of default certs on my Debian unstable has several expired ones. Assisted-by: Juliusz Sosinowicz Assisted-by: Michael Osipov Closes #11987
show more ...
|
#
aa9a6a17 |
| 12-Sep-2023 |
Daniel Stenberg |
quic: set ciphers/curves the same way regular TLS does for OpenSSL/BoringSSL Fixes #11796 Reported-by: Karthikdasari0423 on github Assisted-by: Jay Satiro Closes #11836
|
#
ae5d433e |
| 12-Sep-2023 |
Jay Satiro |
curl_ngtcp2: fix error message
|
#
d5c562cd |
| 10-Sep-2023 |
vvb2060 |
quic: don't set SNI if hostname is an IP address We already do this for TLS connections. RFC 6066 says: Literal IPv4 and IPv6 addresses are not permitted in "HostName".
quic: don't set SNI if hostname is an IP address We already do this for TLS connections. RFC 6066 says: Literal IPv4 and IPv6 addresses are not permitted in "HostName". Ref: https://www.rfc-editor.org/rfc/rfc6066#section-3 Fixes https://github.com/curl/curl/issues/11827 Closes https://github.com/curl/curl/pull/11828
show more ...
|
#
33dac9df |
| 07-Sep-2023 |
Stefan Eissing |
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 st
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
show more ...
|
#
c8490626 |
| 06-Sep-2023 |
Stefan Eissing |
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
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
show more ...
|
#
c63a4b65 |
| 04-Sep-2023 |
Viktor Szakats |
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:
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: https://github.com/ngtcp2/ngtcp2/commit/80447281bbc94af53f8aa7a4cfc19175782894a3 Ref: https://github.com/ngtcp2/ngtcp2/pull/877 Closes #11798
show more ...
|
#
2485547d |
| 05-Sep-2023 |
Stefan Eissing |
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 resu
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
show more ...
|
#
331b89a3 |
| 29-Aug-2023 |
Stefan Eissing |
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 DEBUGAS
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
show more ...
|
#
d50fe6be |
| 25-Aug-2023 |
Viktor Szakats |
lib: fix null ptr derefs and uninitialized vars (h2/h3) Fixing compiler warnings with gcc 13.2.0 in unity builds. Assisted-by: Jay Satiro Assisted-by: Stefan Eissing Closes
lib: fix null ptr derefs and uninitialized vars (h2/h3) Fixing compiler warnings with gcc 13.2.0 in unity builds. Assisted-by: Jay Satiro Assisted-by: Stefan Eissing Closes #11739
show more ...
|
#
bc7c4996 |
| 25-Aug-2023 |
John Bampton |
misc: fix spelling Closes #11733
|
#
9bca45db |
| 08-Aug-2023 |
Daniel Stenberg |
ngtcp2: remove dead code 'result' is always zero (CURLE_OK) at this point Detected by Coverity Closes #11622
|
#
199fb4b9 |
| 07-Aug-2023 |
Stefan Eissing |
http3/ngtcp2: shorten handshake, trace cleanup - shorten handshake timing by delayed x509 store load (OpenSSL) as we do for HTTP/2 - cleanup of trace output, align with HTTP/2 outp
http3/ngtcp2: shorten handshake, trace cleanup - shorten handshake timing by delayed x509 store load (OpenSSL) as we do for HTTP/2 - cleanup of trace output, align with HTTP/2 output Closes #11609
show more ...
|