Skip to content

Commit

Permalink
fix: bump package versions
Browse files Browse the repository at this point in the history
  • Loading branch information
0xAlcibiades committed Sep 11, 2024
1 parent 285082f commit 0f243ea
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ hyper-rustls = "0.27.3"
hyper-util = { version = "0.1.8", features = ["server", "tokio", "server-auto", "server-graceful", "service"] }
pin-project = "1.1.5"
rand = "0.9.0-alpha.2"
rustls = "0.23.13"
rustls = { version = "0.23.13", features = ["zlib"] }
rustls-pemfile = "2.1.3"
tokio = { version = "1.40.0", features = ["net", "macros", "rt-multi-thread"] }
tokio-rustls = "0.26.0"
Expand All @@ -36,7 +36,7 @@ jemallocator = { version = "0.5", optional = true }
[dev-dependencies]
criterion = { version = "0.5.1", features = ["html_reports", "async_tokio"] }
hyper = { version = "1.4.1", features = ["client"] }
tokio = { version = "1.0", features = ["rt", "net", "test-util"] }
tokio = { version = "1.40", features = ["rt", "net", "test-util"] }
tokio-util = { version = "0.7", features = ["compat"] }
tracing-subscriber = "0.3.18"

Expand Down
8 changes: 7 additions & 1 deletion benches/hello_world_tower_hyper_tls_tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ async fn setup_server() -> Result<
config.max_fragment_size = Some(16384); // Larger fragment size for powerful servers
config.send_half_rtt_data = true; // Enable 0.5-RTT data
config.session_storage = ServerSessionMemoryCache::new(10240); // Larger session cache
config.cert_compression_cache = Arc::new(rustls::compress::CompressionCache::default());
config.max_early_data_size = 16384; // Enable 0-RTT data

let tls_config = Arc::new(config);
Expand Down Expand Up @@ -154,9 +155,14 @@ fn bench_server(c: &mut Criterion) {
let mut root_cert_store = RootCertStore::empty();
root_cert_store.add_parsable_certificates(load_certs("examples/sample.pem").unwrap());

let client_config = ClientConfig::builder()
let mut client_config = ClientConfig::builder()
.with_root_certificates(root_cert_store)
.with_no_client_auth();
// Enable handshake resumption
client_config.resumption = rustls::client::Resumption::in_memory_sessions(10240);
client_config.cert_compression_cache = Arc::new(rustls::compress::CompressionCache::default());
client_config.max_fragment_size = Some(16384); // Larger fragment size for powerful servers
client_config.enable_early_data = true; // Enable 0-RTT data

let https = HttpsConnectorBuilder::new()
.with_tls_config(client_config)
Expand Down

0 comments on commit 0f243ea

Please sign in to comment.