From: Hugo Landau Date: Tue, 25 Jul 2023 10:32:24 +0000 (+0100) Subject: QUIC CHANNEL: Send correct alert code if no TPARAMs received X-Git-Tag: openssl-3.2.0-alpha1~287 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3ad5711e484736c7383b43d03f83e5700e589dfa;p=thirdparty%2Fopenssl.git QUIC CHANNEL: Send correct alert code if no TPARAMs received Reviewed-by: Tomas Mraz Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/21547) --- diff --git a/include/internal/quic_error.h b/include/internal/quic_error.h index eeda72a4724..0d5c6b45290 100644 --- a/include/internal/quic_error.h +++ b/include/internal/quic_error.h @@ -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 diff --git a/ssl/quic/quic_channel.c b/ssl/quic/quic_channel.c index 220523d587a..4aba4a3b267 100644 --- a/ssl/quic/quic_channel.c +++ b/ssl/quic/quic_channel.c @@ -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;