From 6f17a86903c3b00d67caf21db87ca41f7ce7e253 Mon Sep 17 00:00:00 2001 From: link2xt Date: Mon, 2 Mar 2026 06:37:23 +0000 Subject: [PATCH] refactor: use re-exported rustls::pki_types --- Cargo.lock | 1 - Cargo.toml | 1 - src/net/tls.rs | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 536a1c875..0d73adc05 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1358,7 +1358,6 @@ dependencies = [ "ratelimit", "regex", "rusqlite", - "rustls-pki-types", "sanitize-filename", "sdp", "serde", diff --git a/Cargo.toml b/Cargo.toml index ed623fc51..2b1f8b159 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -86,7 +86,6 @@ rand-old = { package = "rand", version = "0.8" } rand = { workspace = true } regex = { workspace = true } rusqlite = { workspace = true, features = ["sqlcipher"] } -rustls-pki-types = "1.12.0" sanitize-filename = { workspace = true } sdp = "0.10.0" serde_json = { workspace = true } diff --git a/src/net/tls.rs b/src/net/tls.rs index d339f3b2b..452cd9336 100644 --- a/src/net/tls.rs +++ b/src/net/tls.rs @@ -124,7 +124,7 @@ pub async fn wrap_rustls<'a>( config.enable_sni = use_sni; let tls = tokio_rustls::TlsConnector::from(Arc::new(config)); - let name = rustls_pki_types::ServerName::try_from(hostname)?.to_owned(); + let name = tokio_rustls::rustls::pki_types::ServerName::try_from(hostname)?.to_owned(); let tls_stream = tls.connect(name, stream).await?; Ok(tls_stream) }