QUIC CHANNEL: Only reprocess after an RX secret has been provisioned

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19703)
This commit is contained in:
Hugo Landau 2022-11-22 13:46:05 +00:00
parent 24c1be5cff
commit 92282a17c9
2 changed files with 7 additions and 6 deletions

View 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

View 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