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

Fix clearing new session ticket message #62

Merged
merged 1 commit into from
Jul 30, 2020

Conversation

Ryanfsdf
Copy link
Collaborator

@Ryanfsdf Ryanfsdf commented Jul 29, 2020

Fixed the issue of not clearing the body of the message when receiving a new session ticket. This caused issues when communication with a Go/C++ greeter server.

Also, I changed the code to clear the entire p.pendingApplicationData. Before, we didn't clear the entire buffer in case there were trailing bytes that we were still interested in. However, for handshake messages and alerts, I don't think there will ever be trailing bytes at the end.


This change is Reviewable

Copy link
Owner

@matthewstevenson88 matthewstevenson88 left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @matthewstevenson88 and @Ryanfsdf)


security/s2a/internal/record/record_test.go, line 1079 at r2 (raw file):

				t.Fatalf("c.Read(plaintext) failed: %v", err)
			}
			if got, want := len(c.(*conn).pendingApplicationData), 0; got != want {

Should we also check that plaintext consists of all zeros? I.e. no application data was written?

Copy link
Collaborator Author

@Ryanfsdf Ryanfsdf left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @matthewstevenson88)


security/s2a/internal/record/record_test.go, line 1079 at r2 (raw file):

Previously, matthewstevenson88 wrote…

Should we also check that plaintext consists of all zeros? I.e. no application data was written?

Done.

Copy link
Owner

@matthewstevenson88 matthewstevenson88 left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 2 files reviewed, all discussions resolved

@Ryanfsdf Ryanfsdf merged commit bd4870d into matthewstevenson88:master Jul 30, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants