Skip to content
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

Force Handshake packet epoch if handshake hasn't been confirmed #1836

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Aug 28, 2024

  1. 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.
    evanrittenhouse committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    53185d0 View commit details
    Browse the repository at this point in the history