Skip to content
This repository was archived by the owner on Aug 19, 2022. It is now read-only.

Support critical libp2p extension #87

Closed
kpp opened this issue Jul 30, 2021 · 0 comments · Fixed by #88
Closed

Support critical libp2p extension #87

kpp opened this issue Jul 30, 2021 · 0 comments · Fixed by #88
Assignees
Labels
exp/expert Having worked on the specific codebase is important need/analysis Needs further analysis before proceeding

Comments

@kpp
Copy link

kpp commented Jul 30, 2021

According to https://github.com/libp2p/specs/blob/master/tls/tls.md:

This extension MAY be marked critical.

However when the code checks the cert at:

if _, err := cert.Verify(x509.VerifyOptions{Roots: pool}); err != nil {

It ignores that the extension can be critical. So in case there is a server with a cert with the libp2p ext.critical=true, I get an error:

go-libp2p-quic-transport/cmd$ go run client/main.go /ip4/127.0.0.1/udp/8383/quic 12D3KooWKnmstT37WmaiMRviHevoHZvWBrL7KsAXddcgrzqpp79i
2021/07/30 15:02:04 Dialing /ip4/127.0.0.1/udp/8383/quic
2021/07/30 15:02:04 failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 2048 kiB, got: 416 kiB). See https://github.com/lucas-clemente/quic-go/wiki/UDP-Receive-Buffer-Size for details.
2021/07/30 15:02:04 CRYPTO_ERROR (0x12a): certificate verification failed: x509: unhandled critical extension
exit status 1
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
exp/expert Having worked on the specific codebase is important need/analysis Needs further analysis before proceeding
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants