/* Artificially trigger a spontaneous TXKU if possible. */
int ossl_quic_channel_trigger_txku(QUIC_CHANNEL *ch);
+int ossl_quic_channel_has_pending(const QUIC_CHANNEL *ch);
# endif
const BIO_ADDR *peer,
const BIO_ADDR *local);
+/*
+ * Returns 1 if there are any pending URXEs.
+ */
+int ossl_quic_demux_has_pending(const QUIC_DEMUX *demux);
+
# endif
#endif
/* For use by tests only. */
QUIC_CHANNEL *ossl_quic_conn_get_channel(SSL *s);
+uint64_t ossl_quic_set_options(SSL *s, uint64_t opts);
+uint64_t ossl_quic_clear_options(SSL *s, uint64_t opts);
+uint64_t ossl_quic_get_options(SSL *s);
+int ossl_quic_has_pending(const SSL *s);
# endif
return ch->mutex;
}
+int ossl_quic_channel_has_pending(const QUIC_CHANNEL *ch)
+{
+ return ossl_quic_demux_has_pending(ch->demux)
+ || ossl_qrx_processed_read_pending(ch->qrx);
+}
+
/*
* QUIC Channel: Callbacks from Miscellaneous Subsidiary Components
* ================================================================
ossl_list_urxe_insert_head(&demux->urx_pending, e);
e->demux_state = URXE_DEMUX_STATE_PENDING;
}
+
+int ossl_quic_demux_has_pending(const QUIC_DEMUX *demux)
+{
+ return ossl_list_urxe_head(&demux->urx_pending) != NULL;
+}
* SSL_pending
* -----------
*/
+
QUIC_TAKES_LOCK
static size_t ossl_quic_pending_int(const SSL *s)
{
int ossl_quic_has_pending(const SSL *s)
{
- return ossl_quic_pending_int(s) > 0;
+ /* Do we have app-side pending data or pending URXEs or RXEs? */
+ return ossl_quic_pending_int(s) > 0 || ossl_quic_channel_has_pending(qc->ch);
}
/*
int SSL_has_pending(const SSL *s)
{
+#ifndef OPENSSL_NO_QUIC
+ const QUIC_CONNECTION *qc = QUIC_CONNECTION_FROM_SSL(s);
+#endif
+
/*
* Similar to SSL_pending() but returns a 1 to indicate that we have
* processed or unprocessed data available or 0 otherwise (as opposed to the
sc = SSL_CONNECTION_FROM_CONST_SSL(s);
+#ifndef OPENSSL_NO_QUIC
+ if (qc != NULL)
+ return ossl_quic_has_pending(qc);
+#endif
+
/* Check buffered app data if any first */
if (SSL_CONNECTION_IS_DTLS(sc)) {
TLS_RECORD *rdata;