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

Organize some of the duplicated TLS code into a separate crate #3835

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

alexpyattaev
Copy link

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.


[dependencies]
solana-sdk = { workspace = true }

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 }


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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
//! 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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

@KirillLykov
Copy link

Looks like a good change to me

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.

2 participants