-
Notifications
You must be signed in to change notification settings - Fork 612
Convert application close frame to transport close frame during handshake. #4169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
214c1b0
8a61161
d106a9e
bbc1c23
2a0d9f9
efe3bbd
35faf1a
ea6c383
1e40751
09f699f
2c61b3a
9df9584
254daf4
88bf71c
ee0ddc9
1853692
f615477
b437b06
cfe6a34
5274942
eafee03
aab8b94
72a7dcf
7db08bb
1ff4ddc
32ecbad
97b770f
e49f5cb
53e6200
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -485,15 +485,18 @@ QuicCryptoOnVersionChange( | |
| _IRQL_requires_max_(PASSIVE_LEVEL) | ||
| void | ||
| QuicCryptoHandshakeConfirmed( | ||
| _In_ QUIC_CRYPTO* Crypto | ||
| _In_ QUIC_CRYPTO* Crypto, | ||
| _In_ BOOLEAN SignalBinding | ||
| ) | ||
| { | ||
| QUIC_CONNECTION* Connection = QuicCryptoGetConnection(Crypto); | ||
| Connection->State.HandshakeConfirmed = TRUE; | ||
|
|
||
| QUIC_PATH* Path = &Connection->Paths[0]; | ||
| CXPLAT_DBG_ASSERT(Path->Binding != NULL); | ||
| QuicBindingOnConnectionHandshakeConfirmed(Path->Binding, Connection); | ||
| if (SignalBinding) { | ||
| QUIC_PATH* Path = &Connection->Paths[0]; | ||
| CXPLAT_DBG_ASSERT(Path->Binding != NULL); | ||
| QuicBindingOnConnectionHandshakeConfirmed(Path->Binding, Connection); | ||
| } | ||
|
|
||
| QuicCryptoDiscardKeys(Crypto, QUIC_PACKET_KEY_HANDSHAKE); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does it make sense to throw away the handshake key still? Or should this whole function just be delayed?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think it makes sense to keep them, when TLS handshake finishes at server side, client already must have 1-RTT keys. The issue this fixes is only about getting the coalesced datagram routed to the connection. |
||
| } | ||
|
|
@@ -1578,7 +1581,13 @@ QuicCryptoProcessTlsCompletion( | |
| Connection, | ||
| "Handshake confirmed (server)"); | ||
| QuicSendSetSendFlag(&Connection->Send, QUIC_CONN_SEND_FLAG_HANDSHAKE_DONE); | ||
| QuicCryptoHandshakeConfirmed(&Connection->Crypto); | ||
| // | ||
| // Don't signal handshake confirmed to binding yet, we need to keep | ||
| // the hash entry around to be able to associate potential Handshake | ||
| // packets to this connection. The binding will be signaled when the | ||
| // HANDSHAKE_DONE frame is confirmed received by the client. | ||
| // | ||
| QuicCryptoHandshakeConfirmed(&Connection->Crypto, FALSE); | ||
|
|
||
| // | ||
| // Take this opportinuty to clean up the client chosen initial CID. | ||
|
|
@@ -1720,6 +1729,13 @@ QuicCryptoCustomCertValidationComplete( | |
| QuicCryptoGetConnection(Crypto), | ||
| "Custom cert validation succeeded"); | ||
| QuicCryptoProcessDataComplete(Crypto, Crypto->PendingValidationBufferLength); | ||
|
|
||
| if (QuicRecvBufferHasUnreadData(&Crypto->RecvBuffer)) { | ||
| // | ||
| // More data was received while waiting for user to perform the validation. | ||
rzikm marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| // | ||
| QuicCryptoProcessData(Crypto, FALSE); | ||
| } | ||
| } else { | ||
| QuicTraceEvent( | ||
| ConnError, | ||
|
|
@@ -1757,6 +1773,13 @@ QuicCryptoCustomTicketValidationComplete( | |
| // | ||
| Crypto->TicketValidationPending = FALSE; | ||
| QuicCryptoProcessDataComplete(Crypto, Crypto->PendingValidationBufferLength); | ||
|
|
||
| if (QuicRecvBufferHasUnreadData(&Crypto->RecvBuffer)) { | ||
| // | ||
| // More data was received while waiting for user to perform the validation. | ||
| // | ||
| QuicCryptoProcessData(Crypto, FALSE); | ||
| } | ||
| } else { | ||
| // | ||
| // Need to rollback status before processing client's initial packet, because outgoing buffer and | ||
|
|
@@ -1800,6 +1823,14 @@ QuicCryptoProcessData( | |
| uint32_t BufferCount = 1; | ||
| QUIC_BUFFER Buffer; | ||
|
|
||
| if (Crypto->CertValidationPending || | ||
| (Crypto->TicketValidationPending && !Crypto->TicketValidationRejecting)) { | ||
| // | ||
| // An async validation is pending, don't process any more data until it is complete. | ||
| // | ||
| return Status; | ||
| } | ||
|
|
||
| if (IsClientInitial) { | ||
| Buffer.Length = 0; | ||
| Buffer.Buffer = NULL; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.