summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Landau <hlandau@openssl.org>2024-04-09 08:44:11 +0100
committerHugo Landau <hlandau@openssl.org>2024-04-19 09:33:54 +0100
commit67c03a47b23cc9a5fa961199ddbd2693735f1620 (patch)
treebbf605d552ea87fe27300c54f9198ee1358be25a
parent9fe62289b7e18a23ea916d469889f64292836662 (diff)
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)
-rw-r--r--doc/man3/SSL_new_listener.pod3
-rw-r--r--ssl/quic/quic_impl.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/doc/man3/SSL_new_listener.pod b/doc/man3/SSL_new_listener.pod
index df869e0753..967b169cb0 100644
--- a/doc/man3/SSL_new_listener.pod
+++ b/doc/man3/SSL_new_listener.pod
@@ -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
diff --git a/ssl/quic/quic_impl.c b/ssl/quic/quic_impl.c
index ed1df9e686..087a61c66a 100644
--- a/ssl/quic/quic_impl.c
+++ b/ssl/quic/quic_impl.c
@@ -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);
@@ -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;