From: Hugo Landau Date: Tue, 22 Nov 2022 13:29:45 +0000 (+0000) Subject: QUIC Front-End I/O API: Fix WANT_READ signalling for SSL_read X-Git-Tag: openssl-3.2.0-alpha1~1438 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af8b52cffe303c41510d1228605f9fcff9af0ee3;p=thirdparty%2Fopenssl.git QUIC Front-End I/O API: Fix WANT_READ signalling for SSL_read Reviewed-by: Matt Caswell Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/19734) --- diff --git a/ssl/quic/quic_impl.c b/ssl/quic/quic_impl.c index c5490cd0758..d6c91164978 100644 --- a/ssl/quic/quic_impl.c +++ b/ssl/quic/quic_impl.c @@ -1131,9 +1131,12 @@ static int quic_read(SSL *s, void *buf, size_t len, size_t *bytes_read, int peek else return QUIC_RAISE_NON_NORMAL_ERROR(qc, ERR_R_INTERNAL_ERROR, NULL); } - } - return 1; + return 1; + } else { + /* We did not get any bytes and are not in blocking mode. */ + return QUIC_RAISE_NORMAL_ERROR(qc, SSL_ERROR_WANT_READ); + } } int ossl_quic_read(SSL *s, void *buf, size_t len, size_t *bytes_read)