mirror of
https://github.com/facebookincubator/mvfst.git
synced 2025-08-06 22:22:38 +03:00
Key update support: Server response to key updates [1/x]
Summary: This stack adds key update support to Mvfst client and server. This diff adds the main logic for detecting key updates in the QuicReadCodec. When an update is successful, the server transport reacts to it by updating the write phase and cipher. The high level design is as follows: - The QuicReadCodec is responsible for detecting incoming key update attempts by the peer, as well as tracking any ongoing locally-initiated key updates. - Upon detecting a successful key update, the QuicReadCodec updates its state. The Server/Client transport reacts to this change by updating its write phase and cipher. - A locally initiated key update starts with updating the write phase and key, and signaling the read codec that a key update has been initiated. - The read codec keeps this in a pending state until a packet is successfully received in the new phase. - Functions for syncing the read/write phase on incoming key updates, as well as initiating and verifying outgoing key updates are abstracted in QuicTransportFunctions and are used by both the client and server transports. - Common handshake functions used for rotating the keys are now in HandshakeLayer that is shared by both client and server handshakes. Reviewed By: mjoras Differential Revision: D53016559 fbshipit-source-id: 134e965dabd62917193544a9655a4eb8868ab7f8
This commit is contained in:
committed by
Facebook GitHub Bot
parent
b771ddb380
commit
bff30c1f7a
@@ -48,7 +48,7 @@ uint64_t writeProbingDataToSocketForTest(
|
||||
conn,
|
||||
*conn.clientConnectionId,
|
||||
*conn.serverConnectionId,
|
||||
ShortHeaderBuilder(),
|
||||
ShortHeaderBuilder(conn.oneRttWritePhase),
|
||||
EncryptionLevel::AppData,
|
||||
PacketNumberSpace::AppData,
|
||||
scheduler,
|
||||
|
Reference in New Issue
Block a user