]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
QUIC CHANNEL: Only reprocess after an RX secret has been provisioned
authorHugo Landau <hlandau@openssl.org>
Tue, 22 Nov 2022 13:46:05 +0000 (13:46 +0000)
committerHugo Landau <hlandau@openssl.org>
Fri, 13 Jan 2023 13:20:17 +0000 (13:20 +0000)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19703)

ssl/quic/quic_channel.c
ssl/quic/quic_channel_local.h

index 431344bcf16f7ad45d76020bcdc9549ae2ad4d69..e02773a430b28fd36e240a09d79655ea356ad123 100644 (file)
@@ -527,9 +527,10 @@ static int ch_on_handshake_yield_secret(uint32_t enc_level, int direction,
                                      suite_id, md,
                                      secret, secret_len))
             return 0;
+
+        ch->have_new_rx_secret = 1;
     }
 
-    ch->have_new_secret = 1;
     return 1;
 }
 
@@ -1014,7 +1015,7 @@ static void ch_tick(QUIC_TICK_RESULT *res, void *arg)
          * Allow the handshake layer to check for any new incoming data and generate
          * new outgoing data.
          */
-        ch->have_new_secret = 0;
+        ch->have_new_rx_secret = 0;
         ossl_quic_dhs_tick(ch->dhs);
 
         /*
@@ -1022,7 +1023,7 @@ static void ch_tick(QUIC_TICK_RESULT *res, void *arg)
          * because packets that were not previously processable and were
          * deferred might now be processable.
          */
-    } while (ch->have_new_secret);
+    } while (ch->have_new_rx_secret);
 
     /*
      * Handle any timer events which are due to fire; namely, the loss detection
index 88e49d588c1a4dcc74310061d3baf2251c053fef..c5edf2a8b01ab0cce1b31232c5ce01178491aca7 100644 (file)
@@ -265,10 +265,10 @@ struct quic_channel_st {
     unsigned int                    is_server               : 1;
 
     /*
-     * Set temporarily when the handshake layer has given us a new secret. Used
-     * to determine if we need to check our RX queues again.
+     * Set temporarily when the handshake layer has given us a new RX secret.
+     * Used to determine if we need to check our RX queues again.
      */
-    unsigned int                    have_new_secret         : 1;
+    unsigned int                    have_new_rx_secret      : 1;
 };
 
 # endif