void ossl_quic_set_accept_state(SSL *s);
__owur int ossl_quic_has_pending(const SSL *s);
-__owur int ossl_quic_tick(SSL *s);
-__owur int ossl_quic_get_tick_timeout(SSL *s, struct timeval *tv);
-OSSL_TIME ossl_quic_get_tick_deadline(SSL *s);
+__owur int ossl_quic_handle_events(SSL *s);
+__owur int ossl_quic_get_event_timeout(SSL *s, struct timeval *tv);
+OSSL_TIME ossl_quic_get_event_deadline(SSL *s);
__owur int ossl_quic_get_rpoll_descriptor(SSL *s, BIO_POLL_DESCRIPTOR *d);
__owur int ossl_quic_get_wpoll_descriptor(SSL *s, BIO_POLL_DESCRIPTOR *d);
__owur int ossl_quic_get_net_read_desired(SSL *s);
size_t SSL_CTX_get_num_tickets(const SSL_CTX *ctx);
/* QUIC support */
-int SSL_tick(SSL *s);
-__owur int SSL_get_tick_timeout(SSL *s, struct timeval *tv);
+int SSL_handle_events(SSL *s);
+__owur int SSL_get_event_timeout(SSL *s, struct timeval *tv);
__owur int SSL_get_rpoll_descriptor(SSL *s, BIO_POLL_DESCRIPTOR *desc);
__owur int SSL_get_wpoll_descriptor(SSL *s, BIO_POLL_DESCRIPTOR *desc);
__owur int SSL_net_read_desired(SSL *s);
* QUIC Front-End I/O API: Asynchronous I/O Management
* ===================================================
*
- * (BIO/)SSL_tick => ossl_quic_tick
- * (BIO/)SSL_get_tick_timeout => ossl_quic_get_tick_timeout
+ * (BIO/)SSL_handle_events => ossl_quic_handle_events
+ * (BIO/)SSL_get_event_timeout => ossl_quic_get_event_timeout
* (BIO/)SSL_get_poll_fd => ossl_quic_get_poll_fd
*
*/
&& xso->conn->can_poll_net_wbio;
}
-/* SSL_tick; ticks the reactor. */
+/* SSL_handle_events; handles events by ticking the reactor. */
QUIC_TAKES_LOCK
-int ossl_quic_tick(SSL *s)
+int ossl_quic_handle_events(SSL *s)
{
QCTX ctx;
}
/*
- * SSL_get_tick_timeout. Get the time in milliseconds until the SSL object
- * should be ticked by the application by calling SSL_tick(). tv is set to 0 if
- * the object should be ticked immediately and tv->tv_sec is set to -1 if no
- * timeout is currently active.
+ * SSL_get_event_timeout. Get the time in milliseconds until the SSL object
+ * should be ticked by the application by calling SSL_handle_events(). tv is set
+ * to 0 if the object should be ticked immediately and tv->tv_sec is set to -1
+ * if no timeout is currently active.
*/
QUIC_TAKES_LOCK
-int ossl_quic_get_tick_timeout(SSL *s, struct timeval *tv)
+int ossl_quic_get_event_timeout(SSL *s, struct timeval *tv)
{
QCTX ctx;
OSSL_TIME deadline = ossl_time_infinite();
* the poll call. However this might be difficult because it
* requires we do the call to poll(2) or equivalent syscall
* ourselves, whereas in the general case the application does the
- * polling and just calls SSL_tick(). Implementing this optimisation
- * in the future will probably therefore require API changes.
+ * polling and just calls SSL_handle_events(). Implementing this
+ * optimisation in the future will probably therefore require API
+ * changes.
*/
return 0;
}
}
/* QUIC-specific methods which are supported on QUIC connections only. */
-int SSL_tick(SSL *s)
+int SSL_handle_events(SSL *s)
{
SSL_CONNECTION *sc;
#ifndef OPENSSL_NO_QUIC
if (IS_QUIC(s))
- return ossl_quic_tick(s);
+ return ossl_quic_handle_events(s);
#endif
sc = SSL_CONNECTION_FROM_SSL_ONLY(s);
return 1;
}
-int SSL_get_tick_timeout(SSL *s, struct timeval *tv)
+int SSL_get_event_timeout(SSL *s, struct timeval *tv)
{
SSL_CONNECTION *sc;
#ifndef OPENSSL_NO_QUIC
if (IS_QUIC(s))
- return ossl_quic_get_tick_timeout(s, tv);
+ return ossl_quic_get_event_timeout(s, tv);
#endif
sc = SSL_CONNECTION_FROM_SSL_ONLY(s);
* be done in a real application.
*/
if (!clienterr && retc <= 0)
- SSL_tick(clientssl);
+ SSL_handle_events(clientssl);
if (!servererr && rets <= 0) {
ossl_quic_tserver_tick(qtserv);
servererr = ossl_quic_tserver_is_term_any(qtserv);
* blocking but this is just a test.
*/
OSSL_sleep(0);
- SSL_tick(c_ssl);
+ SSL_handle_events(c_ssl);
}
testresult = 1;
ossl_quic_tserver_tick(h->s);
if (thread_idx >= 0 || connect_started)
- SSL_tick(h->c_conn);
+ SSL_handle_events(h->c_conn);
if (thread_idx >= 0) {
/* Only allow certain opcodes on child threads. */
*/
if (!c_start_idle_test || c_done_idle_test) {
/* Inhibit manual ticking during idle test to test TA mode. */
- SSL_tick(c_ssl);
+ SSL_handle_events(c_ssl);
}
ossl_quic_tserver_tick(tserver);
msglen, &numbytes)))
goto end;
ossl_quic_tserver_tick(qtserv);
- SSL_tick(clientquic);
+ SSL_handle_events(clientquic);
/*
* In blocking mode the SSL_read_ex call will block until the socket is
* readable and has our data. In non-blocking mode we're doing everything
goto err;
ossl_quic_tserver_tick(qtserv);
- if (!TEST_true(SSL_tick(cssl)))
+ if (!TEST_true(SSL_handle_events(cssl)))
goto err;
if (!TEST_int_le(ret = SSL_read(cssl, buf, sizeof(buf)), 0))
/*
* TODO(QUIC): We should expect an error on the queue after this - but we
* don't have it yet.
- * Note, just raising the error in the obvious place causes SSL_tick() to
- * succeed, but leave a suprious error on the stack. We need to either
- * allow SSL_tick() to fail, or somehow delay the raising of the error
- * until the SSL_read() call.
+ * Note, just raising the error in the obvious place causes
+ * SSL_handle_events() to succeed, but leave a suprious error on the stack.
+ * We need to either allow SSL_handle_events() to fail, or somehow delay the
+ * raising of the error until the SSL_read() call.
*/
if (!TEST_int_eq(ERR_GET_REASON(ERR_peek_error()),
SSL_R_UNKNOWN_FRAME_TYPE_RECEIVED))
* "lost". We also process the second packet which should be decrypted
* successfully. Therefore we ack the frames in it
*/
- if (!TEST_true(SSL_tick(cssl)))
+ if (!TEST_true(SSL_handle_events(cssl)))
goto err;
/*
ossl_quic_tserver_tick(qtserv);
/* Receive and process the newly arrived message data resend */
- if (!TEST_true(SSL_tick(cssl)))
+ if (!TEST_true(SSL_handle_events(cssl)))
goto err;
/* The whole message should now have arrived */
SSL_set1_compressed_cert ? 3_2_0 EXIST::FUNCTION:
SSL_CTX_get1_compressed_cert ? 3_2_0 EXIST::FUNCTION:
SSL_get1_compressed_cert ? 3_2_0 EXIST::FUNCTION:
-SSL_tick ? 3_2_0 EXIST::FUNCTION:
-SSL_get_tick_timeout ? 3_2_0 EXIST::FUNCTION:
SSL_get_rpoll_descriptor ? 3_2_0 EXIST::FUNCTION:
SSL_get_wpoll_descriptor ? 3_2_0 EXIST::FUNCTION:
SSL_set_blocking_mode ? 3_2_0 EXIST::FUNCTION:
SSL_get_stream_write_error_code ? 3_2_0 EXIST::FUNCTION:
SSL_get_conn_close_info ? 3_2_0 EXIST::FUNCTION:
SSL_set_incoming_stream_policy ? 3_2_0 EXIST::FUNCTION:
+SSL_handle_events ? 3_2_0 EXIST::FUNCTION:
+SSL_get_event_timeout ? 3_2_0 EXIST::FUNCTION: