/* Sets if incoming connections should currently be allowed. */
void ossl_quic_port_set_allow_incoming(QUIC_PORT *port, int allow_incoming);
+/* Sets flag to indicate we are using SSL_listen_ex to get connections */
+void ossl_quic_port_set_using_peeloff(QUIC_PORT *port, int using_peeloff);
+
+int ossl_quic_port_get_using_peeloff(QUIC_PORT *port);
+
/* Returns 1 if we are using addressed mode on the read side. */
int ossl_quic_port_is_addressed_r(const QUIC_PORT *port);
return 0;
qctx_lock_for_io(&lctx);
+ if (ossl_quic_port_get_using_peeloff(lctx.ql->port) == -1) {
+ QUIC_RAISE_NON_NORMAL_ERROR(NULL, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED,
+ "This listener is using SSL_accept_connection");
+ ret = -1;
+ goto out;
+ }
+
+ ossl_quic_port_set_using_peeloff(lctx.ql->port, 1);
new_ch = ossl_quic_port_pop_incoming(lctx.ql->port);
if (new_ch != NULL) {
/*
* Do our cloning work here
*/
}
+out:
qctx_unlock(&lctx);
return ret;
}
if (!ql_listen(ctx.ql))
goto out;
+ if (ossl_quic_get_using_peeloff(ctx.ql->port) == 1) {
+ QUIC_RAISE_NON_NORMAL_ERROR(NULL, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED,
+ "This listener is using SSL_accept_ex");
+ goto out;
+ }
+
+ ossl_quic_set_using_peeloff(ctx.ql->port, -1);
+
/* Wait for an incoming connection if needed. */
new_ch = ossl_quic_port_pop_incoming(ctx.ql->port);
if (new_ch == NULL && ossl_quic_port_is_running(ctx.ql->port)) {
port->allow_incoming = allow_incoming;
}
+void ossl_quic_port_set_using_peeloff(QUIC_PORT *port, int using_peeloff)
+{
+ port->using_peeloff = using_peeloff;
+}
+
+int ossl_quic_port_get_using_peeloff(QUIC_PORT *port)
+{
+ return port->using_peeloff;
+}
+
/*
* QUIC Port: Ticker-Mutator
* =========================
/* Has the BIO been changed since we last updated reactor pollability? */
unsigned int bio_changed : 1;
+ /* Are we using SSL_listen_ex to peeloff connections */
+ unsigned int using_peeloff;
+
/* AES-256 GCM context for token encryption */
EVP_CIPHER_CTX *token_ctx;
};