diff options
author | Matt Caswell <matt@openssl.org> | 2023-05-01 16:40:28 +0200 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2023-05-24 13:18:27 +0200 |
commit | 63dfde87c46f8ad037ad5b5e635e609f4909578e (patch) | |
tree | 7f360b776e5aa174bc48bb2d1d9bd9f58ca2c7e7 /include | |
parent | Resolve a djgpp function name conflict (diff) | |
download | openssl-63dfde87c46f8ad037ad5b5e635e609f4909578e.tar.xz openssl-63dfde87c46f8ad037ad5b5e635e609f4909578e.zip |
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.h | 5 | ||||
-rw-r--r-- | include/internal/quic_record_rx.h | 8 | ||||
-rw-r--r-- | include/openssl/ssl3.h | 3 |
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 |