Skip to content

Commit

Permalink
QUIC APL: Connection acceptance is an I/O operation
Browse files Browse the repository at this point in the history
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #24037)
  • Loading branch information
hlandau committed Apr 19, 2024
1 parent 9fe6228 commit 67c03a4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions doc/man3/SSL_new_listener.pod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions ssl/quic/quic_impl.c
Original file line number Diff line number Diff line change
Expand Up @@ -4192,7 +4192,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);

Expand Down Expand Up @@ -4229,7 +4229,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;
Expand Down

0 comments on commit 67c03a4

Please sign in to comment.