QUIC APL: Connection acceptance is an I/O operation

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/24037)
This commit is contained in:
Hugo Landau 2024-04-09 08:44:11 +01:00 committed by Neil Horman
parent 87d474660c
commit a55d8b8b71
2 changed files with 5 additions and 2 deletions

View File

@ -139,6 +139,9 @@ L</CLIENT-ONLY USAGE>). It is expected that the listener interface, which
provides an abstracted API for connection acceptance, will be expanded to
support other protocols, such as TLS over TCP, plain TCP or DTLS in future.
SSL_listen() and SSL_accept_connection() are "I/O" functions, meaning that they
update the value returned by L<SSL_get_error(3)> if they fail.
=head1 CLIENT-ONLY USAGE
It is also possible to use the listener interface without accepting any

View File

@ -4210,7 +4210,7 @@ int ossl_quic_listen(SSL *ssl)
if (!expect_quic_listener(ssl, &ctx))
return 0;
qctx_lock(&ctx);
qctx_lock_for_io(&ctx);
ret = ql_listen(ctx.ql);
@ -4247,7 +4247,7 @@ SSL *ossl_quic_accept_connection(SSL *ssl, uint64_t flags)
if (!expect_quic_listener(ssl, &ctx))
return NULL;
qctx_lock(&ctx);
qctx_lock_for_io(&ctx);
if (!ql_listen(ctx.ql))
goto out;