-
Notifications
You must be signed in to change notification settings - Fork 720
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Force Handshake packet epoch for CC frame if handshake hasn't been co…
…nfirmed The RFC states that an endpoint can immediately close a connection by sending a CONNECTION_CLOSE frame during the handshake: > However, prior to confirming the handshake, it is possible that more advanced packet protection keys are not available to the peer, so another CONNECTION_CLOSE frame MAY be sent in a packet that uses a lower packet protection level. Currently, when we decide the packet epoch when a CC frame is present, we always choose Application. This commit downgrades the epoch to Handshake if the handshake wasn't confirmed. The test added in this PR fails without this patch - since the packet is sent in the Application space without keys, the server can't decrypt it, so its `peer_error` is None.
- Loading branch information
1 parent
0ba4a74
commit decb16b
Showing
1 changed file
with
57 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters