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

Check record alignment when changing Rx key #387

Merged
merged 1 commit into from
Jul 22, 2019
Merged

Check record alignment when changing Rx key #387

merged 1 commit into from
Jul 22, 2019

Conversation

ocheron
Copy link
Contributor

@ocheron ocheron commented Jul 21, 2019

Each time the Rx key is modified with setRxState we can verify that there is no message deprotected with the previous key still unconsumed. This includes verifying the tail of a received [Handshake13] packet as well as incomplete handshake fragments stored in the context.

When changing key with setRxState the implementation now verifies that
the context is clean and all content decrypted with the previous key
has been consumed.  There must be no partial handshake fragment left
for decoding, and no decoded handshake message that is not consumed by
pending actions or RecvHandshake13M.
@kazu-yamamoto kazu-yamamoto self-requested a review July 22, 2019 00:15
Copy link
Collaborator

@kazu-yamamoto kazu-yamamoto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kazu-yamamoto kazu-yamamoto merged commit c16957e into haskell-tls:master Jul 22, 2019
kazu-yamamoto added a commit that referenced this pull request Jul 22, 2019
@kazu-yamamoto
Copy link
Collaborator

Merged.

@ocheron ocheron deleted the recv-alignment branch July 22, 2019 04:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants