curl/lib/vtls
Stefan Eissing 5651a36d1a
cf-socket: improvements in socket I/O handling
- Curl_write_plain/Curl_read_plain have been eliminated. Last code use
  now uses Curl_conn_send/recv so that requests use conn->send/revc
  callbacks which defaults to cfilters use.
- Curl_recv_plain/Curl_send_plain have been internalized in cf-socket.c.
- USE_RECV_BEFORE_SEND_WORKAROUND (active on Windows) has been moved
  into cf-socket.c. The pre_recv buffer is held at the socket filter
  context.  `postponed_data` structures have been removed from
  `connectdata`.
- the hanger in HTTP/2 request handling was a result of read buffering
  on all sends and the multi handling is not prepared for this. The
  following happens:

   - multi preforms on a HTTP/2 easy handle
   - h2 reads and processes data
   - this leads to a send of h2 data
   - which receives and buffers before the send
   - h2 returns
   - multi selects on the socket, but no data arrives (its in the buffer already)
   the workaround now receives data in a loop as long as there is something in
   the buffer. The real fix would be for multi to change, so that `data_pending`
   is evaluated before deciding to wait on the socket.

io_buffer, optional, in cf-socket.c, http/2 sets state.drain if lower
filter have pending data.

This io_buffer is only available/used when the
-DUSE_RECV_BEFORE_SEND_WORKAROUND is active, e.g. on Windows
configurations. It also maintains the original checks on protocol
handler being HTTP and conn->send/recv not being replaced.

The HTTP/2 (nghttp2) cfilter now sets data->state.drain when it finds
out that the "lower" filter chain has still pending data at the end of
its IO operation. This prevents the processing from becoming stalled.

Closes #10280
2023-01-31 11:23:59 +01:00
..
bearssl.c copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
bearssl.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
gskit.c copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
gskit.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
gtls.c vtls: Manage current easy handle in nested cfilter calls 2023-01-26 03:05:01 -05:00
gtls.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
hostcheck.c copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
hostcheck.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
keylog.c copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
keylog.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
mbedtls_threadlock.c copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
mbedtls_threadlock.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
mbedtls.c vtls: Manage current easy handle in nested cfilter calls 2023-01-26 03:05:01 -05:00
mbedtls.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
nss.c nss: implement data_pending method 2023-01-07 14:19:31 +01:00
nssg.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
openssl.c openssl: only use CA_BLOB if verifying peer 2023-01-31 11:10:42 +01:00
openssl.h ngtcp2: add CURLOPT_SSL_CTX_FUNCTION support for openssl+wolfssl 2023-01-10 13:41:21 +01:00
rustls.c curl_log: for failf/infof and debug logging implementations 2023-01-12 10:14:17 +01:00
rustls.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
schannel_verify.c copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
schannel.c copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
schannel.h cf-socket: improvements in socket I/O handling 2023-01-31 11:23:59 +01:00
sectransp.c vtls: Manage current easy handle in nested cfilter calls 2023-01-26 03:05:01 -05:00
sectransp.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
vtls_int.h vtls: Manage current easy handle in nested cfilter calls 2023-01-26 03:05:01 -05:00
vtls.c vtls: do not null-check when we already assume cf-ctx exists 2023-01-29 15:39:09 +01:00
vtls.h curl_log: for failf/infof and debug logging implementations 2023-01-12 10:14:17 +01:00
wolfssl.c vtls: Manage current easy handle in nested cfilter calls 2023-01-26 03:05:01 -05:00
wolfssl.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
x509asn1.c x509asn1: fix compile errors and warnings 2023-01-05 23:51:27 +01:00
x509asn1.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00