diff --git a/Cargo.lock b/Cargo.lock index b956473..f73e86d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -37,9 +37,9 @@ dependencies = [ [[package]] name = "actix-http" -version = "3.6.0" +version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d223b13fd481fc0d1f83bb12659ae774d9e3601814c68a0bc539731698cca743" +checksum = "4eb9843d84c775696c37d9a418bbb01b932629d01870722c0f13eb3f95e2536d" dependencies = [ "actix-codec", "actix-rt", @@ -47,7 +47,7 @@ dependencies = [ "actix-tls", "actix-utils", "ahash", - "base64 0.21.7", + "base64 0.22.1", "bitflags 2.5.0", "bytes", "bytestring", @@ -97,13 +97,14 @@ dependencies = [ [[package]] name = "actix-router" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d22475596539443685426b6bdadb926ad0ecaefdfc5fb05e5e3441f15463c511" +checksum = "13d324164c51f63867b57e73ba5936ea151b8a41a1d23d1031eeb9f70d0236f8" dependencies = [ "bytestring", + "cfg-if", "http 0.2.12", - "regex", + "regex-lite", "serde", "tracing", ] @@ -150,9 +151,9 @@ dependencies = [ [[package]] name = "actix-tls" -version = "3.3.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4cce60a2f2b477bc72e5cde0af1812a6e82d8fd85b5570a5dcf2a5bf2c5be5f" +checksum = "ac453898d866cdbecdbc2334fe1738c747b4eba14a677261f2b768ba05329389" dependencies = [ "actix-rt", "actix-service", @@ -162,7 +163,7 @@ dependencies = [ "pin-project-lite", "rustls-pki-types", "tokio", - "tokio-rustls 0.25.0", + "tokio-rustls 0.26.0", "tokio-util", "tracing", ] @@ -179,8 +180,9 @@ dependencies = [ [[package]] name = "actix-web" -version = "4.5.1" -source = "git+https://github.com/asonix/actix-web?branch=asonix/avoid-double-into-type-inference#0314cbee17c60e98890e59f1424d63ed9669782e" +version = "4.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1cf67dadb19d7c95e5a299e2dda24193b89d5d4f33a3b9800888ede9e19aa32" dependencies = [ "actix-codec", "actix-http", @@ -2019,7 +2021,6 @@ dependencies = [ "reqwest", "reqwest-middleware", "reqwest-tracing", - "rustls 0.22.4", "rustls 0.23.7", "rustls-channel-resolver", "rustls-pemfile", @@ -2570,12 +2571,12 @@ dependencies = [ [[package]] name = "rustls-channel-resolver" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffbd1941204442f051576a9a7ea8e8db074ad7fd43db1eb3378c3633f9f9e166" +checksum = "fede2a247359da6b4998f7723ec6468c2d6a577a5d8c17e54f21806426ad2290" dependencies = [ "nanorand", - "rustls 0.22.4", + "rustls 0.23.7", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 42bd276..ec7377b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,7 +20,7 @@ random-errors = ["dep:nanorand"] [dependencies] actix-form-data = "0.7.0-beta.7" -actix-web = { version = "4.0.0", default-features = false, features = ["rustls-0_22"] } +actix-web = { version = "4.6.0", default-features = false, features = ["rustls-0_23"] } async-trait = "0.1.51" barrel = { version = "0.7.0", features = ["pg"] } base64 = "0.22.0" @@ -50,11 +50,10 @@ reqwest = { version = "0.12.0", default-features = false, features = ["json", "r reqwest-middleware = "0.3.0" reqwest-tracing = "0.5.0" # pinned to tokio-postgres-generic-rustls -rustls023 = { package = "rustls", version = "0.23" } # pinned to actix-web -rustls = { package = "rustls", version = "0.22.0", default-features = false, features = ["ring"] } +rustls = "0.23" # pinned to rustls -rustls-channel-resolver = "0.2.0" +rustls-channel-resolver = "0.3.0" # pinned to rustls rustls-pemfile = "2.0.0" rusty-s3 = "0.5.0" @@ -98,6 +97,3 @@ webpki-roots = "0.26.0" version = "0.7.10" default-features = false features = ["emit_event_on_error", "opentelemetry_0_22"] - -[patch.crates-io] -actix-web = { git = "https://github.com/asonix/actix-web", branch = "asonix/avoid-double-into-type-inference" } diff --git a/src/lib.rs b/src/lib.rs index 39f3dc1..afb5bc0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1764,7 +1764,7 @@ async fn launch< tracing::info!("Starting pict-rs with TLS on {address}"); - server.bind_rustls_0_22(address, config)?.run().await?; + server.bind_rustls_0_23(address, config)?.run().await?; handle.abort(); let _ = handle.await; @@ -1942,7 +1942,7 @@ impl PictRsConfiguration { /// /// This would happen automatically anyway unless rustls crate features get mixed up pub fn install_crypto_provider(self) -> Self { - if rustls023::crypto::aws_lc_rs::default_provider() + if rustls::crypto::aws_lc_rs::default_provider() .install_default() .is_err() { diff --git a/src/repo/postgres.rs b/src/repo/postgres.rs index 5c9d913..a690d1c 100644 --- a/src/repo/postgres.rs +++ b/src/repo/postgres.rs @@ -142,7 +142,7 @@ pub(crate) enum TlsError { Invalid, #[error("Couldn't add certificate to root store")] - Add(#[source] rustls023::Error), + Add(#[source] rustls::Error), } impl PostgresError { @@ -174,7 +174,7 @@ impl PostgresError { async fn build_tls_connector( certificate_file: Option, ) -> Result, TlsError> { - let mut cert_store = rustls023::RootCertStore { + let mut cert_store = rustls::RootCertStore { roots: Vec::from(webpki_roots::TLS_SERVER_ROOTS), }; @@ -195,7 +195,7 @@ async fn build_tls_connector( cert_store.add(cert).map_err(TlsError::Add)?; } - let config = rustls023::ClientConfig::builder() + let config = rustls::ClientConfig::builder() .with_root_certificates(cert_store) .with_no_client_auth(); diff --git a/src/tls.rs b/src/tls.rs index b1842c9..a5de197 100644 --- a/src/tls.rs +++ b/src/tls.rs @@ -1,6 +1,6 @@ use std::path::PathBuf; -use rustls::{crypto::ring::sign::any_supported_type, sign::CertifiedKey, Error}; +use rustls::{crypto::aws_lc_rs::sign::any_supported_type, sign::CertifiedKey, Error}; pub(super) struct Tls { certificate: PathBuf,