-
Notifications
You must be signed in to change notification settings - Fork 1k
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(tls): fix rustls panic due to critical libp2p extension #5498
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, and thanks a lot for digging into this! ❤️
This change acceptable to me, can you add the CHANGELOG.md
entry?
What I don't understand is, why are we havingwebpki
trying to parse the libp2p extension?
As per my understanding, this upstream change added a new check to verify the consistency of the certificate. It does so by parsing the |
Hi @arpankapoor sorry to be back to this, but wdyt of implementing the suggestion mentioned on rustls/rustls#1918 (comment) and therefore being able to continue setting it to critical? |
…he libp2p critical extension
yeah, that's a better solution. I've implemented it for both the client and server certs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks Arpan!
Approvals have been dismissed because the PR was updated after the send-it
label was applied.
released |
Thank you! This was driving me nuts debugging |
Resolves libp2p#5487. Pull-Request: libp2p#5498.
Description
Resolves #5487.
Notes & open questions
While parsing a certificate,
rustls-webpki
throws up aUnsupportedCriticalExtension
if the certificate has any non-standard TLS extensions that are marked critical.Since the libp2p TLS extension spec says
This extension MAY be marked critical
, not marking the extension as critical should be okay.Ideally, the certificate consistency check added upstream should probably ignore non-critical errors like this.
If this seems like an acceptable solution, I'll add in a changelog entry.
Change checklist