mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 01:16:31 +03:00
refactor: use re-exported rustls::pki_types
This commit is contained in:
1
Cargo.lock
generated
1
Cargo.lock
generated
@@ -1358,7 +1358,6 @@ dependencies = [
|
|||||||
"ratelimit",
|
"ratelimit",
|
||||||
"regex",
|
"regex",
|
||||||
"rusqlite",
|
"rusqlite",
|
||||||
"rustls-pki-types",
|
|
||||||
"sanitize-filename",
|
"sanitize-filename",
|
||||||
"sdp",
|
"sdp",
|
||||||
"serde",
|
"serde",
|
||||||
|
|||||||
@@ -86,7 +86,6 @@ rand-old = { package = "rand", version = "0.8" }
|
|||||||
rand = { workspace = true }
|
rand = { workspace = true }
|
||||||
regex = { workspace = true }
|
regex = { workspace = true }
|
||||||
rusqlite = { workspace = true, features = ["sqlcipher"] }
|
rusqlite = { workspace = true, features = ["sqlcipher"] }
|
||||||
rustls-pki-types = "1.12.0"
|
|
||||||
sanitize-filename = { workspace = true }
|
sanitize-filename = { workspace = true }
|
||||||
sdp = "0.10.0"
|
sdp = "0.10.0"
|
||||||
serde_json = { workspace = true }
|
serde_json = { workspace = true }
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ pub async fn wrap_rustls<'a>(
|
|||||||
config.enable_sni = use_sni;
|
config.enable_sni = use_sni;
|
||||||
|
|
||||||
let tls = tokio_rustls::TlsConnector::from(Arc::new(config));
|
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?;
|
let tls_stream = tls.connect(name, stream).await?;
|
||||||
Ok(tls_stream)
|
Ok(tls_stream)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user