Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion quic/s2n-quic-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Copy link
Contributor

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-channel and futures be part of the unstable-offload-tls feature in this crate. Since you don't really need those dependencies if you are only interested in using std and not the TLS offloading feature

testing = ["std", "generator", "s2n-codec/testing", "checked-counters", "insta", "futures-test"]
generator = ["bolero-generator"]
checked-counters = []
Expand Down Expand Up @@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The 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 future-test and once_cell?

Copy link
Contributor

Choose a reason for hiding this comment

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


[dev-dependencies]
bolero = "0.13"
Expand Down
9 changes: 6 additions & 3 deletions quic/s2n-quic-core/src/crypto/tls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ pub mod null;
#[cfg(feature = "alloc")]
pub mod slow_tls;

#[cfg(feature = "std")]
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
#[cfg(feature = "std")]
#[cfg(feature = "unstable-offload-tls")]

pub mod offload;

/// Holds all application parameters which are exchanged within the TLS handshake.
#[derive(Debug)]
pub struct ApplicationParameters<'a> {
Expand Down Expand Up @@ -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;
Copy link
Contributor

Choose a reason for hiding this comment

The 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;
Expand Down
Loading
Loading