curl/lib
Neil Horman 957eb240ed
osslq: use SSL_poll to determine writeability of QUIC streams
This discussion:
https://github.com/openssl/openssl/discussions/23339#discussion-6094341

Specifically item number 2 (Send Blocking) was raised by the curl team,
noting that SSL_want_write returning false was not a good indicator of
when a stream is writeable. The suggestion in that discussion was to use
SSL_poll with an SSL_POLL_EVENT_W flag instead, as that is a proper
indication of when an SSL_object will allow writing without blocking.

While ssl_want_write updates its state based on the last error
encountered (implying a need to retry an operation to update the
last_error state again), SSL_poll checks stream buffer status during the
call, giving it more up to date information on request. This is the
method used by our guide demos (quic-hq-interop specifically), and it
works well.

This change has been run through the curl test suite, and shown to pass
all tests. However, given the initial problem description I'm not sure
if there is a test case that explicitly checks for blocking and
unblocking of streams. As such some additional testing may be warranted.

Closes #15909
2025-01-08 23:52:49 +01:00
..
vauth lib: supress deprecation warnings in apple builds 2024-12-17 14:54:34 +01:00
vquic osslq: use SSL_poll to determine writeability of QUIC streams 2025-01-08 23:52:49 +01:00
vssh libssh: use libssh sftp_aio to upload file 2024-12-02 21:33:24 +01:00
vtls vtls: feature ssls-export for SSL session im-/export 2025-01-08 23:32:07 +01:00
.checksrc checksrc: introduce 'banfunc' to ban specific functions 2024-12-30 08:25:56 +01:00
.gitattributes
.gitignore
altsvc.c altsvc: avoid integer overflow in expire calculation 2024-12-15 00:11:24 +01:00
altsvc.h
amigaos.c Makefile.mk: drop in favour of autotools and cmake (MS-DOS, AmigaOS3) 2024-12-16 23:20:55 +01:00
amigaos.h
arpa_telnet.h
asyn-ares.c
asyn-thread.c async-thread: avoid closing eventfd twice 2024-12-12 15:58:47 +01:00
asyn.h
base64.c
bufq.c
bufq.h
bufref.c
bufref.h
cf-h1-proxy.c hyper: drop support 2024-12-21 11:33:05 +01:00
cf-h1-proxy.h
cf-h2-proxy.c clang-tidy: add to CI, add cmake support, fix fallouts 2024-12-27 13:42:32 +01:00
cf-h2-proxy.h
cf-haproxy.c
cf-haproxy.h
cf-https-connect.c hyper: drop support 2024-12-21 11:33:05 +01:00
cf-https-connect.h hyper: drop support 2024-12-21 11:33:05 +01:00
cf-socket.c clang-tidy: add to CI, add cmake support, fix fallouts 2024-12-27 13:42:32 +01:00
cf-socket.h cf-socket: error if address can't be copied 2024-12-22 03:12:35 -05:00
cfilters.c
cfilters.h
CMakeLists.txt cmake: allow CURL_LTO regardless of CURL_BUILD_TYPE, enable in CI 2024-12-25 21:46:55 +01:00
config-mac.h config-mac: drop MACOS_SSL_SUPPORT macro 2024-12-20 11:38:59 +01:00
config-os400.h build: drop unused feature macros, update exception list 2024-12-16 18:05:24 +01:00
config-plan9.h config: rename the OS define to CURL_OS to reduce collision risk 2024-10-30 14:59:54 +01:00
config-riscos.h build: drop unused feature macros, update exception list 2024-12-16 18:05:24 +01:00
config-win32.h src: add CURL_STRICMP() macro, use _stricmp() on Windows 2024-12-23 22:06:07 +01:00
config-win32ce.h src: add CURL_STRICMP() macro, use _stricmp() on Windows 2024-12-23 22:06:07 +01:00
conncache.c conncache: count shutdowns against host and max limits 2025-01-06 23:10:23 +01:00
conncache.h multi: fix curl_multi_waitfds reporting of fd_count 2024-12-29 01:05:09 -05:00
connect.c hyper: drop support 2024-12-21 11:33:05 +01:00
connect.h
content_encoding.c content_encoding: namespace GZIP flag constants 2025-01-07 17:54:19 +01:00
content_encoding.h
cookie.c cookie: small variable type cleanups 2025-01-07 16:47:18 +01:00
cookie.h cookie: small variable type cleanups 2025-01-07 16:47:18 +01:00
curl_addrinfo.c Makefile.mk: drop in favour of autotools and cmake (MS-DOS, AmigaOS3) 2024-12-16 23:20:55 +01:00
curl_addrinfo.h curl_addrinfo: support operating systems with only getaddrinfo(3) 2024-11-02 22:28:59 +01:00
curl_base64.h
curl_config.h.cmake build: fix unsigned time_t detection for cmake, MS-DOS, AmigaOS 2024-12-31 11:36:56 +01:00
curl_ctype.h strparse: string parsing helper functions 2024-12-12 16:00:52 +01:00
curl_des.c
curl_des.h
curl_endian.c
curl_endian.h
curl_fnmatch.c
curl_fnmatch.h
curl_get_line.c vtls: feature ssls-export for SSL session im-/export 2025-01-08 23:32:07 +01:00
curl_get_line.h vtls: feature ssls-export for SSL session im-/export 2025-01-08 23:32:07 +01:00
curl_gethostname.c Makefile.mk: drop in favour of autotools and cmake (MS-DOS, AmigaOS3) 2024-12-16 23:20:55 +01:00
curl_gethostname.h
curl_gssapi.c lib: supress deprecation warnings in apple builds 2024-12-17 14:54:34 +01:00
curl_gssapi.h
curl_hmac.h lib: remove function pointer typecasts for hmac/sha256/md5 2024-10-15 14:32:39 +02:00
curl_krb5.h
curl_ldap.h
curl_md4.h
curl_md5.h lib: remove function pointer typecasts for hmac/sha256/md5 2024-10-15 14:32:39 +02:00
curl_memory.h
curl_memrchr.c
curl_memrchr.h
curl_multibyte.c curl_multibyte: support Windows paths longer than MAX_PATH 2024-12-21 23:47:39 -05:00
curl_multibyte.h
curl_ntlm_core.c liub: fixes for wolfSSL OPENSSL_COEXIST 2024-12-04 08:25:14 +01:00
curl_ntlm_core.h
curl_printf.h
curl_range.c
curl_range.h
curl_rtmp.c
curl_rtmp.h
curl_sasl.c
curl_sasl.h
curl_setup_once.h binmode: convert to macro and use it from tests 2024-12-21 13:29:24 +01:00
curl_setup.h multissl: auto-enable OPENSSL_COEXIST for wolfSSL + OpenSSL 2025-01-01 06:20:30 +01:00
curl_sha256.h lib: remove function pointer typecasts for hmac/sha256/md5 2024-10-15 14:32:39 +02:00
curl_sha512_256.c curl_sha512_256: rename symbols to the curl namespace 2025-01-02 12:55:50 +01:00
curl_sha512_256.h
curl_sspi.c
curl_sspi.h
curl_threads.c
curl_threads.h
curl_trc.c vtls: feature ssls-export for SSL session im-/export 2025-01-08 23:32:07 +01:00
curl_trc.h vtls: feature ssls-export for SSL session im-/export 2025-01-08 23:32:07 +01:00
curlx.h
cw-out.c
cw-out.h
dict.c
dict.h
dllmain.c
doh.c Makefile.mk: drop in favour of autotools and cmake (MS-DOS, AmigaOS3) 2024-12-16 23:20:55 +01:00
doh.h
dynbuf.c lib: TLS session ticket caching reworked 2024-12-20 14:59:23 +01:00
dynbuf.h lib: TLS session ticket caching reworked 2024-12-20 14:59:23 +01:00
dynhds.c
dynhds.h
easy_lock.h lib: replace inline redefine with CURL_INLINE macro 2024-12-16 19:26:22 +01:00
easy.c vtls: feature ssls-export for SSL session im-/export 2025-01-08 23:32:07 +01:00
easygetopt.c
easyif.h
easyoptions.c
easyoptions.h
escape.c curl.h: remove the struct pointer for CURL/CURLSH/CURLM typedefs 2024-10-15 14:33:40 +02:00
escape.h
file.c lib: remove __EMX__ guards 2025-01-01 12:44:20 +01:00
file.h
fileinfo.c
fileinfo.h
fopen.c lib: remove __EMX__ guards 2025-01-01 12:44:20 +01:00
fopen.h
formdata.c build: use _fseeki64() on Windows, drop detections 2024-11-11 14:25:04 +01:00
formdata.h curl.h: remove the struct pointer for CURL/CURLSH/CURLM typedefs 2024-10-15 14:33:40 +02:00
ftp.c clang-tidy: add to CI, add cmake support, fix fallouts 2024-12-27 13:42:32 +01:00
ftp.h
ftplistparser.c
ftplistparser.h
functypes.h Makefile.mk: drop in favour of autotools and cmake (MS-DOS, AmigaOS3) 2024-12-16 23:20:55 +01:00
getenv.c
getinfo.c getinfo: provide info which auth was used for HTTP and proxy 2024-12-23 23:03:54 +01:00
getinfo.h
gopher.c
gopher.h
hash.c hash: add asserts in hash_element_dtor() 2025-01-01 21:13:38 +01:00
hash.h
headers.c
headers.h
hmac.c lib: remove function pointer typecasts for hmac/sha256/md5 2024-10-15 14:32:39 +02:00
hostasyn.c
hostip4.c curl_addrinfo: support operating systems with only getaddrinfo(3) 2024-11-02 22:28:59 +01:00
hostip6.c
hostip.c Makefile.mk: drop in favour of autotools and cmake (MS-DOS, AmigaOS3) 2024-12-16 23:20:55 +01:00
hostip.h
hostsyn.c
hsts.c strparse: string parsing helper functions 2024-12-12 16:00:52 +01:00
hsts.h strparse: string parsing helper functions 2024-12-12 16:00:52 +01:00
http1.c
http1.h
http2.c clang-tidy: add to CI, add cmake support, fix fallouts 2024-12-27 13:42:32 +01:00
http2.h nghttp2: use custom memory functions 2024-11-08 23:20:32 +01:00
http_aws_sigv4.c http_aws_sigv4: Fix invalid compare function handling zero-length pairs 2024-12-18 23:30:39 +01:00
http_aws_sigv4.h
http_chunks.c
http_chunks.h
http_digest.c src/lib: remove redundant ternary operators 2024-10-29 08:18:30 +01:00
http_digest.h
http_negotiate.c http_negotiate: allow for a one byte larger channel binding buffer 2024-12-05 23:09:28 +01:00
http_negotiate.h
http_ntlm.c getinfo: provide info which auth was used for HTTP and proxy 2024-12-23 23:03:54 +01:00
http_ntlm.h
http_proxy.c hyper: drop support 2024-12-21 11:33:05 +01:00
http_proxy.h http_proxy: move dynhds_add_custom here from http.c 2024-12-03 15:02:58 +01:00
http.c HTTP/2: strip TE request header 2025-01-08 23:44:51 +01:00
http.h http: fix build with CURL_DISABLE_COOKIES 2024-12-23 23:13:11 +01:00
idn.c
idn.h
if2ip.c
if2ip.h
imap.c src/lib: remove redundant ternary operators 2024-10-29 08:18:30 +01:00
imap.h
inet_ntop.c
inet_ntop.h msvc: fix building with HAVE_INET_NTOP and MSVC <=1900 2025-01-07 14:07:19 +01:00
inet_pton.c
inet_pton.h Makefile.mk: drop in favour of autotools and cmake (MS-DOS, AmigaOS3) 2024-12-16 23:20:55 +01:00
krb5.c lib: supress deprecation warnings in apple builds 2024-12-17 14:54:34 +01:00
ldap.c msvc: add VS2012 CI job, fix compiler warnings in LDAP and tests 2025-01-07 14:51:48 +01:00
libcurl.def vtls: feature ssls-export for SSL session im-/export 2025-01-08 23:32:07 +01:00
libcurl.rc
libcurl.vers.in
llist.c llist: survive cleared list better 2024-12-21 14:18:22 +01:00
llist.h lib: TLS session ticket caching reworked 2024-12-20 14:59:23 +01:00
macos.c docs: use lowercase curl and libcurl 2025-01-02 17:15:54 +01:00
macos.h
Makefile.am clang-tidy: add to CI, add cmake support, fix fallouts 2024-12-27 13:42:32 +01:00
Makefile.inc vtls: feature ssls-export for SSL session im-/export 2025-01-08 23:32:07 +01:00
Makefile.soname
md4.c liub: fixes for wolfSSL OPENSSL_COEXIST 2024-12-04 08:25:14 +01:00
md5.c liub: fixes for wolfSSL OPENSSL_COEXIST 2024-12-04 08:25:14 +01:00
memdebug.c source: avoid use of 'very' in comments 2024-10-17 13:36:33 +02:00
memdebug.h
mime.c mime: explicitly rewind subparts at attachment time. 2025-01-06 14:03:42 +01:00
mime.h
mprintf.c clang-tidy: add to CI, add cmake support, fix fallouts 2024-12-27 13:42:32 +01:00
mqtt.c
mqtt.h
multi.c conncache: count shutdowns against host and max limits 2025-01-06 23:10:23 +01:00
multihandle.h conncache: count shutdowns against host and max limits 2025-01-06 23:10:23 +01:00
multiif.h vquic: recv_mmsg, use fewer, but larger buffers 2024-10-31 23:40:51 +01:00
netrc.c netrc: 'default' with no credentials is not a match 2025-01-03 18:21:10 +01:00
netrc.h netrc: cache the netrc file in memory 2024-10-11 14:40:12 +02:00
nonblock.c Makefile.mk: drop in favour of autotools and cmake (MS-DOS, AmigaOS3) 2024-12-16 23:20:55 +01:00
nonblock.h
noproxy.c
noproxy.h
openldap.c
optiontable.pl
parsedate.c Makefile.mk: drop in favour of autotools and cmake (MS-DOS, AmigaOS3) 2024-12-16 23:20:55 +01:00
parsedate.h
pingpong.c
pingpong.h
pop3.c src/lib: remove redundant ternary operators 2024-10-29 08:18:30 +01:00
pop3.h
progress.c getinfo: fix CURLINFO_QUEUE_TIME_T and add 'time_queue' var 2024-12-21 12:04:48 +01:00
progress.h
psl.c
psl.h curl.h: remove the struct pointer for CURL/CURLSH/CURLM typedefs 2024-10-15 14:33:40 +02:00
rand.c
rand.h
rename.c
rename.h
request.c hyper: drop support 2024-12-21 11:33:05 +01:00
request.h hyper: drop support 2024-12-21 11:33:05 +01:00
rtsp.c hyper: drop support 2024-12-21 11:33:05 +01:00
rtsp.h hyper: drop support 2024-12-21 11:33:05 +01:00
select.c select: avoid a NULL deref in cwfds_add_sock 2025-01-01 20:56:27 +01:00
select.h multi: fix curl_multi_waitfds reporting of fd_count 2024-12-29 01:05:09 -05:00
sendf.c hyper: drop support 2024-12-21 11:33:05 +01:00
sendf.h hyper: drop support 2024-12-21 11:33:05 +01:00
setopt.c hyper: drop support 2024-12-21 11:33:05 +01:00
setopt.h
setup-os400.h
setup-vms.h docs: use lowercase curl and libcurl 2025-01-02 17:15:54 +01:00
setup-win32.h
sha256.c wolfssl: no more use of the OpenSSL API 2024-11-04 10:23:05 +01:00
share.c lib: TLS session ticket caching reworked 2024-12-20 14:59:23 +01:00
share.h lib: TLS session ticket caching reworked 2024-12-20 14:59:23 +01:00
sigpipe.h
slist.c
slist.h
smb.c smb: fix compiler warning 2025-01-02 18:01:17 +01:00
smb.h
smtp.c src/lib: remove redundant ternary operators 2024-10-29 08:18:30 +01:00
smtp.h
sockaddr.h
socketpair.c tidy-up: misc 2024-12-24 01:27:26 +01:00
socketpair.h socketpair: fix enabling USE_EVENTFD 2024-11-14 09:55:45 +01:00
socks_gssapi.c lib: supress deprecation warnings in apple builds 2024-12-17 14:54:34 +01:00
socks_sspi.c
socks.c src/lib: remove redundant ternary operators 2024-10-29 08:18:30 +01:00
socks.h
speedcheck.c
speedcheck.h tests: fix callback signatures to please UndefinedBehaviorSanitizer 2024-10-15 14:33:47 +02:00
splay.c source: avoid use of 'very' in comments 2024-10-17 13:36:33 +02:00
splay.h
strcase.c
strcase.h
strdup.c
strdup.h
strerror.c checksrc: introduce 'banfunc' to ban specific functions 2024-12-30 08:25:56 +01:00
strerror.h
strparse.c strparse: string parsing helper functions 2024-12-12 16:00:52 +01:00
strparse.h strparse: string parsing helper functions 2024-12-12 16:00:52 +01:00
strtok.c
strtok.h strtok: use namespaced strtok_r macro instead of redefining it 2024-11-14 09:55:45 +01:00
strtoofft.c
strtoofft.h
system_win32.c
system_win32.h
telnet.c
telnet.h
tftp.c Makefile.mk: drop in favour of autotools and cmake (MS-DOS, AmigaOS3) 2024-12-16 23:20:55 +01:00
tftp.h
timediff.c
timediff.h
timeval.c
timeval.h
transfer.c hyper: drop support 2024-12-21 11:33:05 +01:00
transfer.h
url.c strparse: string parsing helper functions 2024-12-12 16:00:52 +01:00
url.h
urlapi-int.h
urlapi.c urlapi: cleanup the redirect logic somewhat 2025-01-01 14:11:15 +01:00
urldata.h openssl: add support to use keys and certificates from PKCS#11 provider 2025-01-01 14:47:31 +01:00
version_win32.c
version_win32.h
version.c vtls: feature ssls-export for SSL session im-/export 2025-01-08 23:32:07 +01:00
warnless.c tool_formparse.c: make curlx_uztoso a static in here 2024-12-21 13:59:05 +01:00
warnless.h tool_formparse.c: make curlx_uztoso a static in here 2024-12-21 13:59:05 +01:00
ws.c hyper: drop support 2024-12-21 11:33:05 +01:00
ws.h hyper: drop support 2024-12-21 11:33:05 +01:00