]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
QUIC: Do not discard the INITIAL el too early
authorTomas Mraz <tomas@openssl.org>
Thu, 10 Aug 2023 16:07:49 +0000 (18:07 +0200)
committerTomas Mraz <tomas@openssl.org>
Tue, 22 Aug 2023 10:31:46 +0000 (12:31 +0200)
RFC says that successful decryption of HANDSHAKE el packet
triggers the discard on server side only.

On client we discard INITIAL el when we successfully send
a HANDSHAKE packet.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21713)

ssl/quic/quic_channel.c

index f174814a8b3b9139e080527f18e609a42ced3ce3..a3bc2591fb1f953c228785f4478a9c229274fb9d 100644 (file)
@@ -2220,7 +2220,7 @@ static void ch_rx_handle_packet(QUIC_CHANNEL *ch)
     case QUIC_PKT_TYPE_INITIAL:
     case QUIC_PKT_TYPE_HANDSHAKE:
     case QUIC_PKT_TYPE_1RTT:
-        if (ch->qrx_pkt->hdr->type == QUIC_PKT_TYPE_HANDSHAKE)
+        if (ch->is_server && ch->qrx_pkt->hdr->type == QUIC_PKT_TYPE_HANDSHAKE)
             /*
              * We automatically drop INITIAL EL keys when first successfully
              * decrypting a HANDSHAKE packet, as per the RFC.