Skip to content

Commit

Permalink
Merge pull request #1091 from sozu-proxy/update-dependencies-includin…
Browse files Browse the repository at this point in the history
…g-rustls

Update dependencies, notably rustls
  • Loading branch information
FlorentinDUBOIS authored Mar 11, 2024
2 parents 9b98f04 + 96f5329 commit 80a5c1d
Show file tree
Hide file tree
Showing 8 changed files with 342 additions and 186 deletions.
494 changes: 323 additions & 171 deletions Cargo.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[workspace]
members = ["lib", "command", "bin", "e2e"]
resolver = "2" # consistent with rust edition 2021, see https://doc.rust-lang.org/cargo/reference/resolver.html#features

[profile.release]
lto = true
Expand Down
4 changes: 2 additions & 2 deletions bin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ authors = [
]
categories = ["network-programming"]
edition = "2021"
rust-version = "1.70.0"
rust-version = "1.74.0"
include = ["README.md", "Cargo.toml", "src/**/*"]

[dependencies]
Expand All @@ -24,7 +24,7 @@ jemallocator = { version = "^0.5.4", optional = true }
libc = "^0.2.152"
log = "^0.4.20"
mio = { version = "^0.8.10", features = ["os-poll", "net"] }
nix = { version = "^0.27.1", features = ["signal", "fs"] }
nix = { version = "^0.28.0", features = ["signal", "fs"] }
nom = "^7.1.3"
paw = "^1.0.0"
serde = { version = "^1.0.195", features = ["derive"] }
Expand Down
6 changes: 3 additions & 3 deletions command/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ authors = [
]
categories = ["network-programming"]
edition = "2021"
rust-version = "1.70.0"
rust-version = "1.74.0"
include = [
"./README.md",
"Cargo.toml",
Expand All @@ -34,7 +34,7 @@ time = "^0.3.31"
toml = "^0.8.8"
memchr = "^2.7.1"
mio = { version = "^0.8.11", features = ["os-poll", "net"] }
nix = { version = "^0.27.1", features = ["socket", "uio"] }
nix = { version = "^0.28.0", features = ["socket", "uio"] }
nom = "^7.1.3"
prost = "^0.12.3"
rand = "^0.8.5"
Expand All @@ -46,7 +46,7 @@ prettytable-rs = { version = "^0.10.0", default-features = false }
pool = "^0.1.4"
poule = "^0.3.2"
thiserror = "^1.0.56"
x509-parser = "^0.15.1"
x509-parser = "^0.16.0"

[features]
unstable = []
Expand Down
2 changes: 1 addition & 1 deletion e2e/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "sozu-e2e"
version = "0.15.19"
rust-version = "1.70.0"
rust-version = "1.74.0"
edition = "2021"

[dependencies]
Expand Down
4 changes: 2 additions & 2 deletions lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ authors = [
]
categories = ["network-programming"]
edition = "2021"
rust-version = "1.70.0"
rust-version = "1.74.0"
include = [
"./README.md",
"Cargo.toml",
Expand All @@ -42,7 +42,7 @@ nom = { version = "^7.1.3", default-features = true, features = ["std"] }
poule = "^0.3.2"
rand = "^0.8.5"
regex = "^1.10.3"
rustls = "^0.22.2"
rustls = { version = "^0.23.1", features = ["ring"] }
rustls-pemfile = "^2.0.0"
rusty_ulid = "^2.0.0"
sha2 = "^0.10.8"
Expand Down
15 changes: 9 additions & 6 deletions lib/src/https.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1579,19 +1579,22 @@ mod tests {
let address = SocketAddress::new_v4(127, 0, 0, 1, 1032);
let resolver = Arc::new(MutexCertificateResolver::default());

let server_config = RustlsServerConfig::builder_with_protocol_versions(&[
&rustls::version::TLS12,
&rustls::version::TLS13,
])
.with_no_client_auth()
.with_cert_resolver(resolver.clone());
let crypto_provider = Arc::new(ring::default_provider());

let server_config = RustlsServerConfig::builder_with_provider(crypto_provider)
.with_protocol_versions(&[&rustls::version::TLS12, &rustls::version::TLS13])
.expect("could not create rustls config server")
.with_no_client_auth()
.with_cert_resolver(resolver.clone());

let rustls_details = Arc::new(server_config);

let default_config = ListenerBuilder::new_https(address.clone())
.to_tls(None)
.expect("Could not create default HTTPS listener config");

println!("it doesn't even matter");

let listener = HttpsListener {
listener: None,
address: address.into(),
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.70.0
1.74.0

0 comments on commit 80a5c1d

Please sign in to comment.