Skip to content

webtransport: move certhash verification to the client#1757

Merged
marten-seemann merged 1 commit intomasterfrom
new-webtransport-noise-handshake
Sep 19, 2022
Merged

webtransport: move certhash verification to the client#1757
marten-seemann merged 1 commit intomasterfrom
new-webtransport-noise-handshake

Conversation

@marten-seemann
Copy link
Copy Markdown
Contributor

@marten-seemann marten-seemann commented Sep 16, 2022

As suggested in libp2p/specs#455.

This PR builds on top #1750. Please only review the last commit. I'll rebase this PR once #1750 is merged.

Comment thread p2p/transport/webtransport/transport.go Outdated

func decodeCertHashesFromProtobuf(b []byte) ([]multihash.DecodedMultihash, error) {
var msg pb.WebTransport
if err := msg.Unmarshal(b); err != nil {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

should we error if len(b) == 0? (The unmarshal will not fail this I think)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

might be okay. A server sending an empty early data can be interpreted to mean that there is no certhash. Just a bit surprising

@marten-seemann marten-seemann force-pushed the new-webtransport-noise-handshake branch from 5500965 to 5ebda4d Compare September 19, 2022 06:24
@marten-seemann marten-seemann force-pushed the new-webtransport-noise-handshake branch from 5ebda4d to 6795012 Compare September 19, 2022 18:29
@marten-seemann marten-seemann merged commit 131e5bd into master Sep 19, 2022
@marten-seemann marten-seemann deleted the new-webtransport-noise-handshake branch September 19, 2022 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants