-
-
Notifications
You must be signed in to change notification settings - Fork 400
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
Create generic API for crypto protocol data #644
Conversation
e5c42c7
to
a80e57e
Compare
Codecov Report
@@ Coverage Diff @@
## master #644 +/- ##
==========================================
+ Coverage 70.87% 70.97% +0.09%
==========================================
Files 69 69
Lines 12072 12072
==========================================
+ Hits 8556 8568 +12
+ Misses 3516 3504 -12
Continue to review full report at Codecov.
|
Looks great! I think |
I figured I'd actually try to make quinn generic, and it turned out to be fairly straightforward, mostly adding lots of generic parameters and adding some extra bounds. |
Would it help if I wrote tests for this feature? |
Yes, I would love if you could add some tests! |
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.
Only minor issues. Should rustls
become an optional feature at the quinn
level?
This is the second time we flip-flop on this. Previously in 4fd4868 (#351) we moved these types from quinn into quinn-proto so that they could be used as part of the low-level configuration API. Then in 9522b44 (#511) we moved them back into quinn after some discussion, making the point that the configuration API at the quinn-proto was not in a great place. Here, we keep the existing quinn-proto configuration API and merely offer an abstracted API relying on the wrapper types for use in quinn internals.
Thanks for the review, hope it wasn't too onerous. I did an initial attempt at introducing a rustls feature flag to quinn, but I have not yet figured out how to handle the examples (which all require rustls). I tried to replicate tokio's setup for this without any luck. |
Enumerating the examples explicitly on Cargo.toml with a suitable |
The default client config setup contains low-level rustls code that is better off in quinn-proto. This also makes the OS store roots and certificate transparency easily available to quinn-proto users, and makes it easy to use them by using Cargo-level features.
Alright, I've added a commit that makes rustls/webpki optional for quinn. |
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.
Nice work!
Great work! |
As discussed in #638. @kim, what do you think? @demimarie-parity, you might also be interested.
Is
AuthenticationData
still the best name? It might as well be calledData
incrypto::Session
, could also beCryptoData
to be even more generic.