diff options
author | Hugo Landau <hlandau@openssl.org> | 2023-04-18 19:30:53 +0100 |
---|---|---|
committer | Hugo Landau <hlandau@openssl.org> | 2023-05-12 14:46:03 +0100 |
commit | 072328dddb8371b865bd18caca9a77698e883c80 (patch) | |
tree | d8f0eb1420523d84f4563e35a8bf638863739664 /include | |
parent | f8636c7e85229bf780da7cf61c234695952f8cad (diff) | |
download | openssl-new-072328dddb8371b865bd18caca9a77698e883c80.tar.gz |
QUIC Dispatch: Refactor APL interface to use SSL pointers not QC pointers
We now refactor the interface between ssl_lib.c frontend functions and
the QUIC API Personality Layer so that the respective functions
comprising the interface use SSL object pointers rather than raw
QUIC_CONNECTION pointers. This is in preparation for stream support
since once streams are supported, calls to e.g. ossl_quic_write() may be
made on a QUIC_CONNECTION or a QUIC_XSO (that is, a stream object). Thus
we take a uniform approach across all functions comprising the interface
between the ssl_lib.c frontend and the QUIC API Personality Layer of
using SSL pointers always. This provides a uniform approach and
ensures that any function of the API personality layer can be easily
adapted to support being called on a stream object in the future.
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20765)
Diffstat (limited to 'include')
-rw-r--r-- | include/internal/quic_ssl.h | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/include/internal/quic_ssl.h b/include/internal/quic_ssl.h index 22e7eb5789..b0b1b7fb19 100644 --- a/include/internal/quic_ssl.h +++ b/include/internal/quic_ssl.h @@ -40,30 +40,30 @@ int ossl_quic_renegotiate_check(SSL *ssl, int initok); typedef struct quic_conn_st QUIC_CONNECTION; typedef struct quic_xso_st QUIC_XSO; -int ossl_quic_do_handshake(QUIC_CONNECTION *qc); -void ossl_quic_set_connect_state(QUIC_CONNECTION *qc); -void ossl_quic_set_accept_state(QUIC_CONNECTION *qc); +int ossl_quic_do_handshake(SSL *s); +void ossl_quic_set_connect_state(SSL *s); +void ossl_quic_set_accept_state(SSL *s); -__owur int ossl_quic_has_pending(const QUIC_CONNECTION *qc); -__owur int ossl_quic_tick(QUIC_CONNECTION *qc); -__owur int ossl_quic_get_tick_timeout(QUIC_CONNECTION *qc, struct timeval *tv); -OSSL_TIME ossl_quic_get_tick_deadline(QUIC_CONNECTION *qc); -__owur int ossl_quic_get_rpoll_descriptor(QUIC_CONNECTION *qc, BIO_POLL_DESCRIPTOR *d); -__owur int ossl_quic_get_wpoll_descriptor(QUIC_CONNECTION *qc, BIO_POLL_DESCRIPTOR *d); -__owur int ossl_quic_get_net_read_desired(QUIC_CONNECTION *qc); -__owur int ossl_quic_get_net_write_desired(QUIC_CONNECTION *qc); -__owur int ossl_quic_get_error(const QUIC_CONNECTION *qc, int i); -__owur int ossl_quic_conn_get_blocking_mode(const QUIC_CONNECTION *qc); -__owur int ossl_quic_conn_set_blocking_mode(QUIC_CONNECTION *qc, int blocking); -__owur int ossl_quic_conn_shutdown(QUIC_CONNECTION *qc, uint64_t flags, +__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_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); +__owur int ossl_quic_get_net_write_desired(SSL *s); +__owur int ossl_quic_get_error(const SSL *s, int i); +__owur int ossl_quic_conn_get_blocking_mode(const SSL *s); +__owur int ossl_quic_conn_set_blocking_mode(SSL *s, int blocking); +__owur int ossl_quic_conn_shutdown(SSL *s, uint64_t flags, const SSL_SHUTDOWN_EX_ARGS *args, size_t args_len); -__owur int ossl_quic_conn_stream_conclude(QUIC_CONNECTION *qc); -void ossl_quic_conn_set0_net_rbio(QUIC_CONNECTION *qc, BIO *net_wbio); -void ossl_quic_conn_set0_net_wbio(QUIC_CONNECTION *qc, BIO *net_wbio); -BIO *ossl_quic_conn_get_net_rbio(const QUIC_CONNECTION *qc); -BIO *ossl_quic_conn_get_net_wbio(const QUIC_CONNECTION *qc); -__owur int ossl_quic_conn_set_initial_peer_addr(QUIC_CONNECTION *qc, +__owur int ossl_quic_conn_stream_conclude(SSL *s); +void ossl_quic_conn_set0_net_rbio(SSL *s, BIO *net_wbio); +void ossl_quic_conn_set0_net_wbio(SSL *s, BIO *net_wbio); +BIO *ossl_quic_conn_get_net_rbio(const SSL *s); +BIO *ossl_quic_conn_get_net_wbio(const SSL *s); +__owur int ossl_quic_conn_set_initial_peer_addr(SSL *s, const BIO_ADDR *peer_addr); /* |