diff --git a/Cargo.lock b/Cargo.lock index 7094587..a35d55b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -323,16 +323,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" -[[package]] -name = "core-foundation" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" -dependencies = [ - "core-foundation-sys", - "libc", -] - [[package]] name = "core-foundation-sys" version = "0.8.7" @@ -1029,12 +1019,6 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" -[[package]] -name = "openssl-probe" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" - [[package]] name = "parking_lot" version = "0.12.3" @@ -1286,24 +1270,10 @@ version = "0.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc9c089855dc1b0f982d0d56ec62e19cf935fe6720aa6705dc61190e99b36f32" dependencies = [ - "log", "rustls 0.23.12", - "rustls-native-certs", "rustls-pki-types", "rustls-webpki 0.102.7", -] - -[[package]] -name = "rustls-native-certs" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcaf18a4f2be7326cd874a5fa579fae794320a0f388d365dca7e480e55f83f8a" -dependencies = [ - "openssl-probe", - "rustls-pemfile 2.1.3", - "rustls-pki-types", - "schannel", - "security-framework", + "webpki-roots", ] [[package]] @@ -1358,15 +1328,6 @@ version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" -[[package]] -name = "schannel" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" -dependencies = [ - "windows-sys 0.52.0", -] - [[package]] name = "scopeguard" version = "1.2.0" @@ -1383,29 +1344,6 @@ dependencies = [ "untrusted 0.9.0", ] -[[package]] -name = "security-framework" -version = "2.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" -dependencies = [ - "bitflags 2.6.0", - "core-foundation", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "2.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" -dependencies = [ - "core-foundation-sys", - "libc", -] - [[package]] name = "serde" version = "1.0.209" diff --git a/Cargo.toml b/Cargo.toml index 810c2b8..b85dbb9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ rustls = { version = "0.23", default-features = false, features = [ "ring", ] } rustls-connector = { version = "0.21.4", default-features = false, features = [ - "native-certs", + "webpki-roots-certs", "rustls--ring", ] } tokio = { version = "1.40.0", features = ["net", "io-util", "time", "macros"] } diff --git a/src/main.rs b/src/main.rs index 9b5b0fb..9ea5c3b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -50,7 +50,7 @@ fn open_session( > { // Setup Rustls TcpStream let stream = TcpStream::connect((config.imap_domain.as_ref(), 993))?; - let tls = RustlsConnector::default(); + let tls = RustlsConnector::new_with_webpki_roots_certs(); let tlsstream = tls.connect(&config.imap_domain, stream)?; // we pass in the domain twice to check that the server's TLS