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

expose crypto/tls errors on the TransportError #4015

Merged
merged 1 commit into from Aug 18, 2023

Conversation

marten-seemann
Copy link
Member

Fixes #3730. This was a lot less painful than I expected.

@aschmahmann Could you try this out and see if it resolves the problem you encountered in libp2p/go-libp2p#2451. A quick review of this PR would be appreciated :)

@codecov
Copy link

codecov bot commented Aug 4, 2023

Codecov Report

Merging #4015 (f45847b) into master (f7f4872) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #4015      +/-   ##
==========================================
+ Coverage   83.23%   83.24%   +0.01%     
==========================================
  Files         147      147              
  Lines       14800    14806       +6     
==========================================
+ Hits        12318    12324       +6     
  Misses       1983     1983              
  Partials      499      499              
Files Changed Coverage Δ
internal/handshake/crypto_setup.go 57.17% <100.00%> (+0.09%) ⬆️
internal/qerr/errors.go 94.55% <100.00%> (+0.55%) ⬆️

@aschmahmann
Copy link

@marten-seemann thanks for the quick 😜 PR and review. From what I can tell this looks reasonable, although I'm not familiar with this code base.

However, I'm having trouble testing it because this change comes after dropping quic draft 29 and go-libp2p doesn't have a PR that deletes that dependency yet so I get compile errors. (Note: I accidentally pointed you at the what seems to be the right place to make a change since the code got shuffled a bit in between the version of quic-go I was using and master).

WDYT, should we wait until after there's a go-libp2p PR that drops draft-29 support and revisit this afterwards?

@marten-seemann
Copy link
Member Author

Yes, that makes sense. We're planning to update to quic-go v0.37 in our next release, so it should only be a week or two until we can test this. I'll ping you again then :)

@marten-seemann marten-seemann changed the title make it possible to use type assertions for crypto/tls errors expose crypto/tls errors on the TransportError Aug 18, 2023
@marten-seemann marten-seemann merged commit 501cc21 into master Aug 18, 2023
33 checks passed
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.

return a tls.CertificateVerificationError when verifying the certificate fails
3 participants