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

noise: implement an API to send and receive early data #1728

Merged
merged 2 commits into from
Sep 3, 2022

Conversation

marten-seemann
Copy link
Contributor

This is a new version of #1645, extending the API introduced in #1663. Closes #1645.
Part of #1717.

This PR is a prerequisite for moving go-libp2p-webtransport into this repo.

Copy link
Collaborator

@MarcoPolo MarcoPolo left a comment

Choose a reason for hiding this comment

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

Looks good. One question and one nit around a comment.

p2p/security/noise/handshake.go Outdated Show resolved Hide resolved
return err
}
} else if len(initialPayload) > 0 {
return fmt.Errorf("received unexpected early data (%d bytes)", len(initialPayload))
Copy link
Collaborator

Choose a reason for hiding this comment

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

This changes the old behavior which would ignore any initialPayload. I see were adding a test case around this. Is there any worry about backwards incompatibility with this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think anybody has been sending initial data until now, so this is probably fine.

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.

2 participants