-
Notifications
You must be signed in to change notification settings - Fork 230
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
Organize some of the duplicated TLS code into a separate crate #3835
base: master
Are you sure you want to change the base?
Conversation
… to avoid duplication
|
||
[dependencies] | ||
solana-sdk = { workspace = true } | ||
|
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.
dependencies should be sorted
solana-signer = { workspace = true } | ||
solana-pubkey = { workspace = true } | ||
|
||
|
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.
extra space
@@ -0,0 +1,14 @@ | |||
//! Collection of TLS related code fragments that end up popping up everywhere where quic is used. | |||
//! Aggregated here to avoid bugs due to conflicting implementations of the same functionality |
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.
//! Aggregated here to avoid bugs due to conflicting implementations of the same functionality | |
//! Aggregated here to avoid bugs due to conflicting implementations of the same functionality. |
@@ -0,0 +1 @@ | |||
A collection of utility functions and structures needed to bridge the conceptual gap between conventional TLS security model in protocols like QUIC and what Solana does |
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.
A collection of utility functions and structures needed to bridge the conceptual gap between conventional TLS security model in protocols like QUIC and what Solana does | |
A collection of utility functions and structures needed to bridge the conceptual gap between conventional TLS security model in protocols like QUIC and what Solana does. |
Looks like a good change to me |
Problem
A whole bunch of places in the code have been defining the same structure SkipServerVerification for use in quic related code. There were at least 3 independent definitions for this struct with zero functional differences in different project locations.
This created unnecessary duplication as well as strange code dependencies where turbine would depend on quic-client for this one struct, even though logically it makes no sense for turbine to depend on quic-client.
Summary of Changes
The following moved to tls-utils crate:
SkipServerVerification
SkipClientVerification
new_dummy_x509_certificate
All references to them redirected. Multiple redundant definitions removed.