]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
QUIC CHANNEL: Send correct alert code if no TPARAMs received
authorHugo Landau <hlandau@openssl.org>
Tue, 25 Jul 2023 10:32:24 +0000 (11:32 +0100)
committerMatt Caswell <matt@openssl.org>
Tue, 8 Aug 2023 13:33:42 +0000 (14:33 +0100)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21547)

include/internal/quic_error.h
ssl/quic/quic_channel.c

index eeda72a47245825dd16dcf54331b0085f479538b..0d5c6b4529076a235ee55f618519edc1370ebaef 100644 (file)
 
 /* 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
 
index 220523d587a7aae847fe313f52e8d5027bf5ff17..4aba4a3b267cd8de8085cbb45c0b2716b65d427f 100644 (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;