summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2023-05-01 15:40:28 +0100
committerMatt Caswell <matt@openssl.org>2023-05-24 12:18:27 +0100
commit63dfde87c46f8ad037ad5b5e635e609f4909578e (patch)
tree7f360b776e5aa174bc48bb2d1d9bd9f58ca2c7e7 /include
parent6dea91f56dcbcb0979dd36790664808ad960faf9 (diff)
Add initial QUIC support for the msg_callback
At this stage we just support msg_callback on receipt of a datagram. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Hugo Landau <hlandau@openssl.org> (Merged from https://github.com/openssl/openssl/pull/20914)
Diffstat (limited to 'include')
-rw-r--r--include/internal/quic_channel.h5
-rw-r--r--include/internal/quic_record_rx.h8
-rw-r--r--include/openssl/ssl3.h3
3 files changed, 16 insertions, 0 deletions
diff --git a/include/internal/quic_channel.h b/include/internal/quic_channel.h
index 6dbf08665d..ac73097985 100644
--- a/include/internal/quic_channel.h
+++ b/include/internal/quic_channel.h
@@ -130,6 +130,11 @@ typedef struct quic_channel_args_st {
*/
OSSL_TIME (*now_cb)(void *arg);
void *now_cb_arg;
+
+ /* Message callback related arguments */
+ ossl_msg_cb msg_callback;
+ void *msg_callback_arg;
+ SSL *msg_callback_s;
} QUIC_CHANNEL_ARGS;
typedef struct quic_channel_st QUIC_CHANNEL;
diff --git a/include/internal/quic_record_rx.h b/include/internal/quic_record_rx.h
index 95c0fa5635..4817347993 100644
--- a/include/internal/quic_record_rx.h
+++ b/include/internal/quic_record_rx.h
@@ -18,6 +18,9 @@
# ifndef OPENSSL_NO_QUIC
+typedef void (*ossl_msg_cb)(int write_p, int version, int content_type,
+ const void *buf, size_t len, SSL *ssl, void *arg);
+
/*
* QUIC Record Layer - RX
* ======================
@@ -45,6 +48,11 @@ typedef struct ossl_qrx_args_st {
/* Initial key phase. For debugging use only; always 0 in real use. */
unsigned char init_key_phase_bit;
+
+ /* Message callback related arguments */
+ ossl_msg_cb msg_callback;
+ void *msg_callback_arg;
+ SSL *msg_callback_s;
} OSSL_QRX_ARGS;
/* Instantiates a new QRX. */
diff --git a/include/openssl/ssl3.h b/include/openssl/ssl3.h
index 6c172f45f9..f993d0baa0 100644
--- a/include/openssl/ssl3.h
+++ b/include/openssl/ssl3.h
@@ -239,6 +239,9 @@ extern "C" {
# define SSL3_RT_HEADER 0x100
# define SSL3_RT_INNER_CONTENT_TYPE 0x101
+/* Pseudo content types for QUIC */
+# define SSL3_RT_QUIC_DATAGRAM 0x200
+
# define SSL3_AL_WARNING 1
# define SSL3_AL_FATAL 2