diff options
author | Matt Caswell <matt@openssl.org> | 2022-12-07 16:55:21 +0000 |
---|---|---|
committer | Hugo Landau <hlandau@openssl.org> | 2023-02-22 05:34:04 +0000 |
commit | 62d0da12e397811e26be5b5be8a1cfe54de5031e (patch) | |
tree | 3916ee7541152df4215b5bf5918346c15b651957 | |
parent | f10e5885f01582c449eff8df70b61c916d9224cf (diff) |
Raise a protocol error if we have not received transport params from peer
If we complete the TLS handshake but transport params were not received
then this is a protcol error and we should fail.
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20030)
-rw-r--r-- | ssl/quic/quic_channel.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ssl/quic/quic_channel.c b/ssl/quic/quic_channel.c index be438426ba..bbb88470be 100644 --- a/ssl/quic/quic_channel.c +++ b/ssl/quic/quic_channel.c @@ -613,12 +613,16 @@ static int ch_on_handshake_complete(void *arg) if (!ossl_assert(ch->tx_enc_level == QUIC_ENC_LEVEL_1RTT)) return 0; - if (!ch->got_remote_transport_params) + if (!ch->got_remote_transport_params) { /* * Was not a valid QUIC handshake if we did not get valid transport * params. */ + ossl_quic_channel_raise_protocol_error(ch, QUIC_ERR_PROTOCOL_VIOLATION, + OSSL_QUIC_FRAME_TYPE_CRYPTO, + "no transport parameters received"); return 0; + } /* Don't need transport parameters anymore. */ OPENSSL_free(ch->local_transport_params); |