]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
QUIC APL: Connection acceptance is an I/O operation
authorHugo Landau <hlandau@openssl.org>
Tue, 9 Apr 2024 07:44:11 +0000 (08:44 +0100)
committerNeil Horman <nhorman@openssl.org>
Mon, 17 Feb 2025 16:27:32 +0000 (11:27 -0500)
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/24037)

doc/man3/SSL_new_listener.pod
ssl/quic/quic_impl.c

index df869e0753433c7424edd11de843503632531c50..967b169cb0a8cd2719821cf75de7df4752999715 100644 (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
index 0765418d7d1e17e9d1cc1ce2bcefa42ef9b7a9ea..04c4b6fa4ba09b776ad4780240fbc623a8253a8d 100644 (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;