mirror of
https://github.com/ArcaneChat/core.git
synced 2026-07-03 14:05:33 +02:00
refactor: use rustls reexported from tokio_rustls
This commit is contained in:
Generated
-1
@@ -1346,7 +1346,6 @@ dependencies = [
|
||||
"ratelimit",
|
||||
"regex",
|
||||
"rusqlite",
|
||||
"rustls",
|
||||
"rustls-pki-types",
|
||||
"sanitize-filename",
|
||||
"sdp",
|
||||
|
||||
@@ -87,7 +87,6 @@ rand = { workspace = true }
|
||||
regex = { workspace = true }
|
||||
rusqlite = { workspace = true, features = ["sqlcipher"] }
|
||||
rustls-pki-types = "1.12.0"
|
||||
rustls = { version = "0.23.22", default-features = false }
|
||||
sanitize-filename = { workspace = true }
|
||||
sdp = "0.8.0"
|
||||
serde_json = { workspace = true }
|
||||
|
||||
+2
-2
@@ -35,10 +35,10 @@ pub async fn wrap_rustls<'a>(
|
||||
alpn: &[&str],
|
||||
stream: impl SessionStream + 'a,
|
||||
) -> Result<impl SessionStream + 'a> {
|
||||
let mut root_cert_store = rustls::RootCertStore::empty();
|
||||
let mut root_cert_store = tokio_rustls::rustls::RootCertStore::empty();
|
||||
root_cert_store.extend(webpki_roots::TLS_SERVER_ROOTS.iter().cloned());
|
||||
|
||||
let mut config = rustls::ClientConfig::builder()
|
||||
let mut config = tokio_rustls::rustls::ClientConfig::builder()
|
||||
.with_root_certificates(root_cert_store)
|
||||
.with_no_client_auth();
|
||||
config.alpn_protocols = alpn.iter().map(|s| s.as_bytes().to_vec()).collect();
|
||||
|
||||
Reference in New Issue
Block a user