__owur size_t ossl_quic_get_accept_connection_queue_len(SSL *ssl);
__owur int ossl_quic_listen(SSL *ssl);
__owur int ossl_quic_get_peer_addr(SSL *ssl, BIO_ADDR *peer_addr);
+__owur int ossl_quic_peeloff_conn(SSL *listener, SSL *new_conn);
__owur int ossl_quic_stream_reset(SSL *ssl,
const SSL_STREAM_RESET_ARGS *args,
int DTLSv1_listen(SSL *s, BIO_ADDR *client);
# endif
+
+__owur int SSL_listen_ex(SSL *listener, SSL *new_conn);
+
# ifndef OPENSSL_NO_CT
/*
return ret;
}
+QUIC_TAKES_LOCK
+int ossl_quic_peeloff_conn(SSL *listener, SSL *new_conn)
+{
+ QCTX lctx;
+ QCTX cctx;
+ QUIC_CHANNEL *new_ch;
+ int ret = 0;
+
+ if (!expect_quic_listener(listener, &lctx))
+ return 0;
+
+ if (!expect_quic_cs(new_conn, &cctx))
+ return 0;
+
+ qctx_lock_for_io(&lctx);
+ new_ch = ossl_quic_port_pop_incoming(lctx.ql->port);
+ if (new_ch != NULL) {
+ /*
+ * Do our cloning work here
+ */
+ }
+ qctx_unlock(&lctx);
+ return ret;
+}
+
/*
* SSL_accept_connection
* ---------------------
return ossl_quic_get_peer_addr(ssl, peer_addr);
#else
return 0;
+}
+
+int SSL_listen_ex(SSL *listener, SSL *new_conn)
+{
+#ifndef OPENSSL_NO_QUIC
+ if (!IS_QUIC(listener) || !IS_QUIC(new_conn))
+ return ossl_quic_peeloff_conn(listener, new_conn);
+#else
+ return 0;
#endif
}