QUIC CHANNEL: Send correct alert code if no TPARAMs received

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21547)
This commit is contained in:
Hugo Landau 2023-07-25 11:32:24 +01:00 committed by Matt Caswell
parent c5cb85b665
commit 3ad5711e48
2 changed files with 8 additions and 2 deletions

View File

@ -35,7 +35,13 @@
/* Inclusive range for handshake-specific errors. */
# define QUIC_ERR_CRYPTO_ERR_BEGIN 0x0100
# define QUUC_ERR_CRYPTO_ERR_END 0x01FF
# define QUIC_ERR_CRYPTO_ERR_END 0x01FF
# define QUIC_ERR_CRYPTO_ERR(X) \
(QUIC_ERR_CRYPTO_ERR_BEGIN + (X))
# define QUIC_ERR_CRYPTO_MISSING_EXT \
QUIC_ERR_CRYPTO_ERR(TLS13_AD_MISSING_EXTENSION)
# endif

View File

@ -941,7 +941,7 @@ static int ch_on_handshake_complete(void *arg)
* 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_channel_raise_protocol_error(ch, QUIC_ERR_CRYPTO_MISSING_EXT,
OSSL_QUIC_FRAME_TYPE_CRYPTO,
"no transport parameters received");
return 0;