]> git.ipfire.org Git - thirdparty/curl.git/commit
osslq: use SSL_poll to determine writeability of QUIC streams
authorNeil Horman <nhorman@openssl.org>
Fri, 3 Jan 2025 15:17:56 +0000 (10:17 -0500)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 8 Jan 2025 22:52:49 +0000 (23:52 +0100)
commit957eb240ed7115f89a60c55f441a52ec7886327c
tree857b378b588c55d65274177c24746fe12cffba04
parent616b66e68f8e29db22896da8974a42496affaf4b
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
lib/vquic/curl_osslq.c