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

basichost: append certhash for webrtc addresses provided via address factory #2774

Merged
merged 3 commits into from
Apr 23, 2024

Conversation

sukunrt
Copy link
Member

@sukunrt sukunrt commented Apr 18, 2024

This change is similar to how we append certhashes for webtransport.

@sukunrt sukunrt requested a review from MarcoPolo April 18, 2024 19:02
Copy link
Contributor

@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.

One small fix, but looks good.

Happy to see that this change was relatively straightforward :)

if ok, n := libp2pwebtransport.IsWebtransportMultiaddr(addr); ok && n == 0 {
wtOK, wtN := libp2pwebtransport.IsWebtransportMultiaddr(addr)
webrtcOK, webrtcN := libp2pwebrtc.IsWebRTCDirectMultiaddr(addr)
if (wtOK && wtN == 0) || (webrtcOK && webrtcN == 0) {
t := s.TransportForListening(addr)
tpt, ok := t.(addCertHasher)
if !ok {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please fix the debug log below since it says "WebTransport"

@sukunrt sukunrt merged commit 0385ec9 into master Apr 23, 2024
11 checks passed
@lidel lidel mentioned this pull request Apr 23, 2024
2 tasks
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