summaryrefslogtreecommitdiffstats
path: root/include/internal/quic_tls.h
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2023-02-23 16:31:49 +0000
committerPauli <pauli@openssl.org>2023-04-12 11:02:01 +1000
commit7257188b7054cf8acfc4837e38486459e0930718 (patch)
treec0abc99f056e96dcc2b7123805033fbe00eda9b4 /include/internal/quic_tls.h
parentdfb8e185134df90fd3f21fb6ec625e7c295fdcea (diff)
Add support for rstream get/release record in the QUIC TLS layer
The QUIC TLS layer was taking an internal copy of rstream data while reading. The QUIC rstream code has recently been extended to enable a get/release model which avoids the need for this internal copy, so we use that instead. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/20404)
Diffstat (limited to 'include/internal/quic_tls.h')
-rw-r--r--include/internal/quic_tls.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/include/internal/quic_tls.h b/include/internal/quic_tls.h
index 2d6007e79f..133e247c26 100644
--- a/include/internal/quic_tls.h
+++ b/include/internal/quic_tls.h
@@ -32,9 +32,18 @@ typedef struct quic_tls_args_st {
int (*crypto_send_cb)(const unsigned char *buf, size_t buf_len,
size_t *consumed, void *arg);
void *crypto_send_cb_arg;
- int (*crypto_recv_cb)(unsigned char *buf, size_t buf_len,
- size_t *bytes_read, void *arg);
- void *crypto_recv_cb_arg;
+
+ /*
+ * Call to receive crypto stream data. A pointer to the underlying buffer
+ * is provided, and subsequently released to avoid unnecessary copying of
+ * data.
+ */
+ int (*crypto_recv_rcd_cb)(const unsigned char **buf, size_t *bytes_read,
+ void *arg);
+ void *crypto_recv_rcd_cb_arg;
+ int (*crypto_release_rcd_cb)(size_t bytes_read, void *arg);
+ void *crypto_release_rcd_cb_arg;
+
/* Called when a traffic secret is available for a given encryption level. */
int (*yield_secret_cb)(uint32_t enc_level, int direction /* 0=RX, 1=TX */,