Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/core/crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -1774,7 +1774,9 @@ QuicCryptoCustomCertValidationComplete(
"Custom cert validation succeeded");
QuicCryptoProcessDataComplete(Crypto, Crypto->PendingValidationBufferLength);

if (QuicRecvBufferHasUnreadData(&Crypto->RecvBuffer)) {
// The handshake completion above can uninitialize the crypto state.
if (Crypto->Initialized &&
QuicRecvBufferHasUnreadData(&Crypto->RecvBuffer)) {
//
// More data was received while waiting for user to perform the validation.
//
Expand Down Expand Up @@ -1830,6 +1832,11 @@ QuicCryptoCustomTicketValidationComplete(
Crypto->TicketValidationPending = FALSE;
QuicCryptoProcessDataComplete(Crypto, Crypto->PendingValidationBufferLength);

// Ticket validation pauses ClientHello processing. The client cannot send its Finished
// until after receiving the server flight, so the QuicCryptoProcessDataComplete call above
// cannot finish the handshake and uninitialize the crypto state.
CXPLAT_DBG_ASSERT(Crypto->Initialized);

if (QuicRecvBufferHasUnreadData(&Crypto->RecvBuffer)) {
//
// More data was received while waiting for user to perform the validation.
Expand Down
Loading