QUIC Front-End I/O API: Fix WANT_READ signalling for SSL_read

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19734)
This commit is contained in:
Hugo Landau 2022-11-22 13:29:45 +00:00
parent e30c502ae9
commit af8b52cffe
1 changed files with 5 additions and 2 deletions

View File

@ -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)