diff options
author | Richard Levitte <levitte@openssl.org> | 2022-09-06 13:59:25 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2022-09-23 17:48:54 +0200 |
commit | d5ab48a192d45ec51355ef2a186125961331eb9b (patch) | |
tree | 8f6127717456a79aa1254b876d584662228f4149 /include/internal/quic_ssl.h | |
parent | 9ff519542387d32ab1c3a8b1f45a375e1712a383 (diff) |
Move the QUIC_CONNECTION typedef to internal headers
Also add internal functionality to get a QUIC_CONNECTION pointer from
an SSL pointer, and setters / getters for the GQX and ACKM fields.
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18838)
Diffstat (limited to 'include/internal/quic_ssl.h')
-rw-r--r-- | include/internal/quic_ssl.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/include/internal/quic_ssl.h b/include/internal/quic_ssl.h new file mode 100644 index 0000000000..d9a0ade6d4 --- /dev/null +++ b/include/internal/quic_ssl.h @@ -0,0 +1,47 @@ +/* + * Copyright 2022 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the Apache License 2.0 (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef OSSL_QUIC_SSL_H +# define OSSL_QUIC_SSL_H + +# include <openssl/ssl.h> +# include "internal/quic_record_rx.h" /* OSSL_QRX */ +# include "internal/quic_ackm.h" /* OSSL_ACKM */ + +__owur SSL *ossl_quic_new(SSL_CTX *ctx); +__owur int ossl_quic_init(SSL *s); +void ossl_quic_deinit(SSL *s); +void ossl_quic_free(SSL *s); +int ossl_quic_reset(SSL *s); +int ossl_quic_clear(SSL *s); +__owur int ossl_quic_accept(SSL *s); +__owur int ossl_quic_connect(SSL *s); +__owur int ossl_quic_read(SSL *s, void *buf, size_t len, size_t *readbytes); +__owur int ossl_quic_peek(SSL *s, void *buf, size_t len, size_t *readbytes); +__owur int ossl_quic_write(SSL *s, const void *buf, size_t len, size_t *written); +__owur int ossl_quic_shutdown(SSL *s); +__owur long ossl_quic_ctrl(SSL *s, int cmd, long larg, void *parg); +__owur long ossl_quic_ctx_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg); +__owur long ossl_quic_callback_ctrl(SSL *s, int cmd, void (*fp) (void)); +__owur long ossl_quic_ctx_callback_ctrl(SSL_CTX *ctx, int cmd, void (*fp) (void)); +__owur size_t ossl_quic_pending(const SSL *s); +__owur OSSL_TIME ossl_quic_default_timeout(void); +__owur int ossl_quic_num_ciphers(void); +__owur const SSL_CIPHER *ossl_quic_get_cipher(unsigned int u); +int ossl_quic_renegotiate_check(SSL *ssl, int initok); + +typedef struct quic_conn_st QUIC_CONNECTION; + +__owur QUIC_CONNECTION *ossl_quic_conn_from_ssl(SSL *ssl); +int ossl_quic_conn_set_qrx(QUIC_CONNECTION *qc, OSSL_QRX *qrx); +OSSL_QRX *ossl_quic_conn_get_qrx(QUIC_CONNECTION *qc); +int ossl_quic_conn_set_ackm(QUIC_CONNECTION *qc, OSSL_ACKM *ackm); +OSSL_ACKM *ossl_quic_conn_set_akcm(QUIC_CONNECTION *qc); + +#endif |