-
Notifications
You must be signed in to change notification settings - Fork 150
feat(s2n-quic-core) TLS offloading #2688
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,7 +13,7 @@ exclude = ["corpus.tar.gz"] | |
| [features] | ||
| default = ["alloc", "std"] | ||
| alloc = ["atomic-waker", "bytes", "crossbeam-utils", "s2n-codec/alloc"] | ||
| std = ["alloc", "once_cell"] | ||
| std = ["alloc", "once_cell", "futures-channel", "futures"] | ||
| testing = ["std", "generator", "s2n-codec/testing", "checked-counters", "insta", "futures-test"] | ||
| generator = ["bolero-generator"] | ||
| checked-counters = [] | ||
|
|
@@ -47,6 +47,8 @@ tracing = { version = "0.1", default-features = false, optional = true } | |
| zerocopy = { version = "0.8", features = ["derive"] } | ||
| futures-test = { version = "0.3", optional = true } # For testing Waker interactions | ||
| once_cell = { version = "1", optional = true } | ||
| futures-channel = { version = "0.3", default-features = false, optional=true, features = ["std", "alloc"]} | ||
| futures = { version = "0.3", default-features = false, optional=true, features = ["std", "alloc"]} | ||
|
Comment on lines
+50
to
+51
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. looks like there was an intention to have the dependencies be alphabetically ordered (through the last two in the list broke that). Could you move these and
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We also already have a channel in https://github.com/aws/s2n-quic/blob/main/quic/s2n-quic-core/src/sync/spsc.rs. |
||
|
|
||
| [dev-dependencies] | ||
| bolero = "0.13" | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -20,6 +20,9 @@ pub mod null; | |||||
| #[cfg(feature = "alloc")] | ||||||
| pub mod slow_tls; | ||||||
|
|
||||||
| #[cfg(feature = "std")] | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| pub mod offload; | ||||||
|
|
||||||
| /// Holds all application parameters which are exchanged within the TLS handshake. | ||||||
| #[derive(Debug)] | ||||||
| pub struct ApplicationParameters<'a> { | ||||||
|
|
@@ -177,13 +180,13 @@ pub trait Context<Crypto: crate::crypto::CryptoSuite> { | |||||
| /// is willing to buffer. | ||||||
| fn receive_application(&mut self, max_len: Option<usize>) -> Option<Bytes>; | ||||||
|
|
||||||
| fn can_send_initial(&self) -> bool; | ||||||
| fn can_send_initial(&mut self) -> bool; | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is technically a breaking change if applications are implementing their own TLS providers. |
||||||
| fn send_initial(&mut self, transmission: Bytes); | ||||||
|
|
||||||
| fn can_send_handshake(&self) -> bool; | ||||||
| fn can_send_handshake(&mut self) -> bool; | ||||||
| fn send_handshake(&mut self, transmission: Bytes); | ||||||
|
|
||||||
| fn can_send_application(&self) -> bool; | ||||||
| fn can_send_application(&mut self) -> bool; | ||||||
| fn send_application(&mut self, transmission: Bytes); | ||||||
|
|
||||||
| fn waker(&self) -> &core::task::Waker; | ||||||
|
|
||||||
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.
I wondering if it would make more sense to have
futures-channelandfuturesbe part of theunstable-offload-tlsfeature in this crate. Since you don't really need those dependencies if you are only interested in usingstdand not the TLS offloading feature