From 2a8060036cb5520586e04d8204df149b1368401b Mon Sep 17 00:00:00 2001 From: Vaibhav Date: Thu, 15 Feb 2024 18:53:36 +0530 Subject: [PATCH] chore(notifications): remove dependency on openssl --- Cargo.lock | 128 +++----- Cargo.toml | 2 +- .../src/email_executor/lettre/mod.rs | 7 +- flake.nix | 3 - third-party/rust/BUCK | 275 +++++------------- third-party/rust/Cargo.lock | 128 +++----- third-party/rust/Cargo.toml | 2 +- .../rust/fixups/openssl-sys/fixups.toml | 1 - third-party/rust/fixups/openssl/fixups.toml | 1 - 9 files changed, 164 insertions(+), 383 deletions(-) delete mode 100644 third-party/rust/fixups/openssl-sys/fixups.toml delete mode 100644 third-party/rust/fixups/openssl/fixups.toml diff --git a/Cargo.lock b/Cargo.lock index 68db1ce34e4..0b07c3ff510 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1018,21 +1018,6 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - [[package]] name = "form_urlencoded" version = "1.2.0" @@ -1446,7 +1431,7 @@ dependencies = [ "rustls 0.21.8", "rustls-native-certs", "tokio", - "tokio-rustls", + "tokio-rustls 0.24.1", ] [[package]] @@ -1682,18 +1667,19 @@ dependencies = [ "fastrand", "futures-io", "futures-util", - "hostname", "httpdate", "idna 0.5.0", "mime", - "native-tls", "nom", "percent-encoding 2.3.0", "quoted_printable", + "rustls 0.22.2", + "rustls-pemfile 2.0.0", "socket2 0.5.5", "tokio", - "tokio-native-tls", + "tokio-rustls 0.25.0", "url 2.4.1", + "webpki-roots 0.26.1", ] [[package]] @@ -1857,7 +1843,7 @@ dependencies = [ "rand", "rustc_version_runtime", "rustls 0.21.8", - "rustls-pemfile", + "rustls-pemfile 1.0.3", "serde", "serde_bytes", "serde_with 1.14.0", @@ -1869,7 +1855,7 @@ dependencies = [ "take_mut", "thiserror", "tokio", - "tokio-rustls", + "tokio-rustls 0.24.1", "tokio-util", "trust-dns-proto", "trust-dns-resolver", @@ -1902,24 +1888,6 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" -[[package]] -name = "native-tls" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" -dependencies = [ - "lazy_static", - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - [[package]] name = "nom" version = "7.1.3" @@ -2079,50 +2047,12 @@ version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" -[[package]] -name = "openssl" -version = "0.10.63" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15c9d69dd87a29568d4d017cfe8ec518706046a05184e5aea92d0af890b803c8" -dependencies = [ - "bitflags 2.4.1", - "cfg-if", - "foreign-types", - "libc", - "once_cell", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - [[package]] name = "openssl-probe" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" -[[package]] -name = "openssl-sys" -version = "0.9.99" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22e1bf214306098e4832460f797824c05d25aacdf896f64a985fb0fd992454ae" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - [[package]] name = "opentelemetry" version = "0.20.0" @@ -2652,14 +2582,14 @@ dependencies = [ "percent-encoding 2.3.0", "pin-project-lite", "rustls 0.21.8", - "rustls-pemfile", + "rustls-pemfile 1.0.3", "serde", "serde_json", "serde_urlencoded", "sync_wrapper", "system-configuration", "tokio", - "tokio-rustls", + "tokio-rustls 0.24.1", "tower-service", "url 2.4.1", "wasm-bindgen", @@ -2844,7 +2774,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" dependencies = [ "openssl-probe", - "rustls-pemfile", + "rustls-pemfile 1.0.3", "schannel", "security-framework", ] @@ -2858,6 +2788,16 @@ dependencies = [ "base64 0.21.5", ] +[[package]] +name = "rustls-pemfile" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35e4980fa29e4c4b212ffb3db068a564cbf560e51d3944b7c88bd8bf5bec64f4" +dependencies = [ + "base64 0.21.5", + "rustls-pki-types", +] + [[package]] name = "rustls-pki-types" version = "1.2.0" @@ -3345,7 +3285,7 @@ dependencies = [ "paste", "percent-encoding 2.3.0", "rustls 0.21.8", - "rustls-pemfile", + "rustls-pemfile 1.0.3", "serde", "serde_json", "sha2", @@ -3804,22 +3744,23 @@ dependencies = [ ] [[package]] -name = "tokio-native-tls" -version = "0.3.1" +name = "tokio-rustls" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "native-tls", + "rustls 0.21.8", "tokio", ] [[package]] name = "tokio-rustls" -version = "0.24.1" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" dependencies = [ - "rustls 0.21.8", + "rustls 0.22.2", + "rustls-pki-types", "tokio", ] @@ -4471,6 +4412,15 @@ version = "0.25.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" +[[package]] +name = "webpki-roots" +version = "0.26.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3de34ae270483955a94f4b21bdaaeb83d508bb84a01435f393818edb0012009" +dependencies = [ + "rustls-pki-types", +] + [[package]] name = "which" version = "4.4.2" @@ -4721,7 +4671,7 @@ dependencies = [ "log", "percent-encoding 2.3.0", "rustls 0.22.2", - "rustls-pemfile", + "rustls-pemfile 1.0.3", "seahash", "serde", "serde_json", diff --git a/Cargo.toml b/Cargo.toml index 0000d0a125a..5ef95d23e5f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -47,5 +47,5 @@ prost = "0.12" rust-i18n = "3" google-fcm1 = "5.0.3" sqlxmq = { version = "0.5", default-features = false, features = ["runtime-tokio-rustls"] } -lettre = { version = "0.11.4", features = ["tokio1", "tokio1-native-tls"] } +lettre = { version = "0.11.4", default-features = false, features = ["builder", "tokio1", "tokio1-rustls-tls", "smtp-transport"] } diff --git a/core/notifications/src/email_executor/lettre/mod.rs b/core/notifications/src/email_executor/lettre/mod.rs index 769d2f7b7c1..a91077e4d7c 100644 --- a/core/notifications/src/email_executor/lettre/mod.rs +++ b/core/notifications/src/email_executor/lettre/mod.rs @@ -2,8 +2,9 @@ mod config; pub mod error; use lettre::{ - message::Mailbox, transport::smtp::authentication::Credentials, AsyncSmtpTransport, - AsyncTransport, Tokio1Executor, + message::{Mailbox, Message}, + transport::smtp::authentication::Credentials, + AsyncSmtpTransport, AsyncTransport, Tokio1Executor, }; pub use config::*; @@ -25,7 +26,7 @@ impl LettreClient { } pub async fn send_email(&self, title: String, body: String) -> Result<(), LettreError> { - let email = lettre::Message::builder() + let email = Message::builder() .from(Mailbox::new(None, "some-email".parse()?)) .to(Mailbox::new(None, "some-email".parse()?)) .subject(title) diff --git a/flake.nix b/flake.nix index ac3aa995a47..5a339e0df7e 100644 --- a/flake.nix +++ b/flake.nix @@ -47,8 +47,6 @@ clang lld rust-toolchain - openssl - openssl.dev ]; nativeBuildInputs = with pkgs; @@ -77,7 +75,6 @@ grpcurl buf transifex-cli - pkg-config ] ++ buck2NativeBuildInputs ++ lib.optionals pkgs.stdenv.isLinux [ diff --git a/third-party/rust/BUCK b/third-party/rust/BUCK index 9a937bef78f..9bc96ba179c 100644 --- a/third-party/rust/BUCK +++ b/third-party/rust/BUCK @@ -2372,41 +2372,6 @@ cargo.rust_library( visibility = [], ) -http_archive( - name = "foreign-types-0.3.2.crate", - sha256 = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1", - strip_prefix = "foreign-types-0.3.2", - urls = ["https://crates.io/api/v1/crates/foreign-types/0.3.2/download"], - visibility = [], -) - -cargo.rust_library( - name = "foreign-types-0.3.2", - srcs = [":foreign-types-0.3.2.crate"], - crate = "foreign_types", - crate_root = "foreign-types-0.3.2.crate/src/lib.rs", - edition = "2015", - visibility = [], - deps = [":foreign-types-shared-0.1.1"], -) - -http_archive( - name = "foreign-types-shared-0.1.1.crate", - sha256 = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b", - strip_prefix = "foreign-types-shared-0.1.1", - urls = ["https://crates.io/api/v1/crates/foreign-types-shared/0.1.1/download"], - visibility = [], -) - -cargo.rust_library( - name = "foreign-types-shared-0.1.1", - srcs = [":foreign-types-shared-0.1.1.crate"], - crate = "foreign_types_shared", - crate_root = "foreign-types-shared-0.1.1.crate/src/lib.rs", - edition = "2015", - visibility = [], -) - http_archive( name = "form_urlencoded-1.2.0.crate", sha256 = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652", @@ -3928,17 +3893,14 @@ cargo.rust_library( edition = "2021", features = [ "builder", - "default", - "hostname", - "native-tls", - "pool", + "rustls-tls", "smtp-transport", "tokio1", - "tokio1-native-tls", + "tokio1-rustls-tls", ], named_deps = { "tokio1_crate": ":tokio-1.36.0", - "tokio1_native_tls_crate": ":tokio-native-tls-0.3.1", + "tokio1_rustls": ":tokio-rustls-0.25.0", }, visibility = [], deps = [ @@ -3950,16 +3912,17 @@ cargo.rust_library( ":fastrand-2.0.1", ":futures-io-0.3.30", ":futures-util-0.3.30", - ":hostname-0.3.1", ":httpdate-1.0.3", ":idna-0.5.0", ":mime-0.3.17", - ":native-tls-0.2.11", ":nom-7.1.3", ":percent-encoding-2.3.0", ":quoted_printable-0.5.0", + ":rustls-0.22.2", + ":rustls-pemfile-2.0.0", ":socket2-0.5.5", ":url-2.4.1", + ":webpki-roots-0.26.1", ], ) @@ -4508,65 +4471,6 @@ cargo.rust_library( visibility = [], ) -http_archive( - name = "native-tls-0.2.11.crate", - sha256 = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e", - strip_prefix = "native-tls-0.2.11", - urls = ["https://crates.io/api/v1/crates/native-tls/0.2.11/download"], - visibility = [], -) - -cargo.rust_library( - name = "native-tls-0.2.11", - srcs = [":native-tls-0.2.11.crate"], - crate = "native_tls", - crate_root = "native-tls-0.2.11.crate/src/lib.rs", - edition = "2015", - platform = { - "linux-arm64": dict( - deps = [ - ":log-0.4.20", - ":openssl-0.10.63", - ":openssl-probe-0.1.5", - ":openssl-sys-0.9.99", - ], - ), - "linux-x86_64": dict( - deps = [ - ":log-0.4.20", - ":openssl-0.10.63", - ":openssl-probe-0.1.5", - ":openssl-sys-0.9.99", - ], - ), - "macos-arm64": dict( - deps = [ - ":lazy_static-1.4.0", - ":libc-0.2.149", - ":security-framework-2.9.2", - ":security-framework-sys-2.9.1", - ":tempfile-3.8.1", - ], - ), - "macos-x86_64": dict( - deps = [ - ":lazy_static-1.4.0", - ":libc-0.2.149", - ":security-framework-2.9.2", - ":security-framework-sys-2.9.1", - ":tempfile-3.8.1", - ], - ), - "windows-gnu": dict( - deps = [":schannel-0.1.23"], - ), - "windows-msvc": dict( - deps = [":schannel-0.1.23"], - ), - }, - visibility = [], -) - http_archive( name = "nom-7.1.3.crate", sha256 = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a", @@ -4967,58 +4871,6 @@ cargo.rust_library( visibility = [], ) -http_archive( - name = "openssl-0.10.63.crate", - sha256 = "15c9d69dd87a29568d4d017cfe8ec518706046a05184e5aea92d0af890b803c8", - strip_prefix = "openssl-0.10.63", - urls = ["https://crates.io/api/v1/crates/openssl/0.10.63/download"], - visibility = [], -) - -cargo.rust_library( - name = "openssl-0.10.63", - srcs = [":openssl-0.10.63.crate"], - crate = "openssl", - crate_root = "openssl-0.10.63.crate/src/lib.rs", - edition = "2018", - features = ["default"], - named_deps = { - "ffi": ":openssl-sys-0.9.99", - }, - visibility = [], - deps = [ - ":bitflags-2.4.1", - ":cfg-if-1.0.0", - ":foreign-types-0.3.2", - ":libc-0.2.149", - ":once_cell-1.18.0", - ":openssl-macros-0.1.1", - ], -) - -http_archive( - name = "openssl-macros-0.1.1.crate", - sha256 = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c", - strip_prefix = "openssl-macros-0.1.1", - urls = ["https://crates.io/api/v1/crates/openssl-macros/0.1.1/download"], - visibility = [], -) - -cargo.rust_library( - name = "openssl-macros-0.1.1", - srcs = [":openssl-macros-0.1.1.crate"], - crate = "openssl_macros", - crate_root = "openssl-macros-0.1.1.crate/src/lib.rs", - edition = "2018", - proc_macro = True, - visibility = [], - deps = [ - ":proc-macro2-1.0.76", - ":quote-1.0.35", - ":syn-2.0.48", - ], -) - http_archive( name = "openssl-probe-0.1.5.crate", sha256 = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf", @@ -5036,24 +4888,6 @@ cargo.rust_library( visibility = [], ) -http_archive( - name = "openssl-sys-0.9.99.crate", - sha256 = "22e1bf214306098e4832460f797824c05d25aacdf896f64a985fb0fd992454ae", - strip_prefix = "openssl-sys-0.9.99", - urls = ["https://crates.io/api/v1/crates/openssl-sys/0.9.99/download"], - visibility = [], -) - -cargo.rust_library( - name = "openssl-sys-0.9.99", - srcs = [":openssl-sys-0.9.99.crate"], - crate = "openssl_sys", - crate_root = "openssl-sys-0.9.99.crate/src/lib.rs", - edition = "2018", - visibility = [], - deps = [":libc-0.2.149"], -) - alias( name = "opentelemetry", actual = ":opentelemetry-0.20.0", @@ -7626,6 +7460,31 @@ cargo.rust_library( deps = [":base64-0.21.5"], ) +http_archive( + name = "rustls-pemfile-2.0.0.crate", + sha256 = "35e4980fa29e4c4b212ffb3db068a564cbf560e51d3944b7c88bd8bf5bec64f4", + strip_prefix = "rustls-pemfile-2.0.0", + urls = ["https://crates.io/api/v1/crates/rustls-pemfile/2.0.0/download"], + visibility = [], +) + +cargo.rust_library( + name = "rustls-pemfile-2.0.0", + srcs = [":rustls-pemfile-2.0.0.crate"], + crate = "rustls_pemfile", + crate_root = "rustls-pemfile-2.0.0.crate/src/lib.rs", + edition = "2018", + features = [ + "default", + "std", + ], + named_deps = { + "pki_types": ":rustls-pki-types-1.2.0", + }, + visibility = [], + deps = [":base64-0.21.5"], +) + http_archive( name = "rustls-pki-types-1.2.0.crate", sha256 = "0a716eb65e3158e90e17cd93d855216e27bde02745ab842f2cab4a39dba1bacf", @@ -7898,10 +7757,7 @@ cargo.rust_library( crate = "security_framework_sys", crate_root = "security-framework-sys-2.9.1.crate/src/lib.rs", edition = "2021", - features = [ - "OSX_10_9", - "default", - ], + features = ["OSX_10_9"], visibility = [], deps = [ ":core-foundation-sys-0.8.6", @@ -10016,49 +9872,58 @@ cargo.rust_library( ) http_archive( - name = "tokio-native-tls-0.3.1.crate", - sha256 = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2", - strip_prefix = "tokio-native-tls-0.3.1", - urls = ["https://crates.io/api/v1/crates/tokio-native-tls/0.3.1/download"], + name = "tokio-rustls-0.24.1.crate", + sha256 = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081", + strip_prefix = "tokio-rustls-0.24.1", + urls = ["https://crates.io/api/v1/crates/tokio-rustls/0.24.1/download"], visibility = [], ) cargo.rust_library( - name = "tokio-native-tls-0.3.1", - srcs = [":tokio-native-tls-0.3.1.crate"], - crate = "tokio_native_tls", - crate_root = "tokio-native-tls-0.3.1.crate/src/lib.rs", + name = "tokio-rustls-0.24.1", + srcs = [":tokio-rustls-0.24.1.crate"], + crate = "tokio_rustls", + crate_root = "tokio-rustls-0.24.1.crate/src/lib.rs", edition = "2018", + features = [ + "dangerous_configuration", + "default", + "logging", + "tls12", + ], visibility = [], deps = [ - ":native-tls-0.2.11", + ":rustls-0.21.8", ":tokio-1.36.0", ], ) http_archive( - name = "tokio-rustls-0.24.1.crate", - sha256 = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081", - strip_prefix = "tokio-rustls-0.24.1", - urls = ["https://crates.io/api/v1/crates/tokio-rustls/0.24.1/download"], + name = "tokio-rustls-0.25.0.crate", + sha256 = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f", + strip_prefix = "tokio-rustls-0.25.0", + urls = ["https://crates.io/api/v1/crates/tokio-rustls/0.25.0/download"], visibility = [], ) cargo.rust_library( - name = "tokio-rustls-0.24.1", - srcs = [":tokio-rustls-0.24.1.crate"], + name = "tokio-rustls-0.25.0", + srcs = [":tokio-rustls-0.25.0.crate"], crate = "tokio_rustls", - crate_root = "tokio-rustls-0.24.1.crate/src/lib.rs", - edition = "2018", + crate_root = "tokio-rustls-0.25.0.crate/src/lib.rs", + edition = "2021", features = [ - "dangerous_configuration", "default", "logging", + "ring", "tls12", ], + named_deps = { + "pki_types": ":rustls-pki-types-1.2.0", + }, visibility = [], deps = [ - ":rustls-0.21.8", + ":rustls-0.22.2", ":tokio-1.36.0", ], ) @@ -11437,6 +11302,26 @@ cargo.rust_library( visibility = [], ) +http_archive( + name = "webpki-roots-0.26.1.crate", + sha256 = "b3de34ae270483955a94f4b21bdaaeb83d508bb84a01435f393818edb0012009", + strip_prefix = "webpki-roots-0.26.1", + urls = ["https://crates.io/api/v1/crates/webpki-roots/0.26.1/download"], + visibility = [], +) + +cargo.rust_library( + name = "webpki-roots-0.26.1", + srcs = [":webpki-roots-0.26.1.crate"], + crate = "webpki_roots", + crate_root = "webpki-roots-0.26.1.crate/src/lib.rs", + edition = "2018", + named_deps = { + "pki_types": ":rustls-pki-types-1.2.0", + }, + visibility = [], +) + http_archive( name = "which-4.4.2.crate", sha256 = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7", diff --git a/third-party/rust/Cargo.lock b/third-party/rust/Cargo.lock index 7ce6f00109d..bb2b247ea2c 100644 --- a/third-party/rust/Cargo.lock +++ b/third-party/rust/Cargo.lock @@ -981,21 +981,6 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - [[package]] name = "form_urlencoded" version = "1.2.0" @@ -1409,7 +1394,7 @@ dependencies = [ "rustls 0.21.8", "rustls-native-certs", "tokio", - "tokio-rustls", + "tokio-rustls 0.24.1", ] [[package]] @@ -1631,18 +1616,19 @@ dependencies = [ "fastrand", "futures-io", "futures-util", - "hostname", "httpdate", "idna 0.5.0", "mime", - "native-tls", "nom", "percent-encoding 2.3.0", "quoted_printable", + "rustls 0.22.2", + "rustls-pemfile 2.0.0", "socket2 0.5.5", "tokio", - "tokio-native-tls", + "tokio-rustls 0.25.0", "url 2.4.1", + "webpki-roots 0.26.1", ] [[package]] @@ -1806,7 +1792,7 @@ dependencies = [ "rand", "rustc_version_runtime", "rustls 0.21.8", - "rustls-pemfile", + "rustls-pemfile 1.0.3", "serde", "serde_bytes", "serde_with 1.14.0", @@ -1818,7 +1804,7 @@ dependencies = [ "take_mut", "thiserror", "tokio", - "tokio-rustls", + "tokio-rustls 0.24.1", "tokio-util", "trust-dns-proto", "trust-dns-resolver", @@ -1851,24 +1837,6 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" -[[package]] -name = "native-tls" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" -dependencies = [ - "lazy_static", - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - [[package]] name = "nom" version = "7.1.3" @@ -1991,50 +1959,12 @@ version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" -[[package]] -name = "openssl" -version = "0.10.63" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15c9d69dd87a29568d4d017cfe8ec518706046a05184e5aea92d0af890b803c8" -dependencies = [ - "bitflags 2.4.1", - "cfg-if", - "foreign-types", - "libc", - "once_cell", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - [[package]] name = "openssl-probe" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" -[[package]] -name = "openssl-sys" -version = "0.9.99" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22e1bf214306098e4832460f797824c05d25aacdf896f64a985fb0fd992454ae" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - [[package]] name = "opentelemetry" version = "0.20.0" @@ -2564,14 +2494,14 @@ dependencies = [ "percent-encoding 2.3.0", "pin-project-lite", "rustls 0.21.8", - "rustls-pemfile", + "rustls-pemfile 1.0.3", "serde", "serde_json", "serde_urlencoded", "sync_wrapper", "system-configuration", "tokio", - "tokio-rustls", + "tokio-rustls 0.24.1", "tower-service", "url 2.4.1", "wasm-bindgen", @@ -2756,7 +2686,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" dependencies = [ "openssl-probe", - "rustls-pemfile", + "rustls-pemfile 1.0.3", "schannel", "security-framework", ] @@ -2770,6 +2700,16 @@ dependencies = [ "base64 0.21.5", ] +[[package]] +name = "rustls-pemfile" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35e4980fa29e4c4b212ffb3db068a564cbf560e51d3944b7c88bd8bf5bec64f4" +dependencies = [ + "base64 0.21.5", + "rustls-pki-types", +] + [[package]] name = "rustls-pki-types" version = "1.2.0" @@ -3257,7 +3197,7 @@ dependencies = [ "paste", "percent-encoding 2.3.0", "rustls 0.21.8", - "rustls-pemfile", + "rustls-pemfile 1.0.3", "serde", "serde_json", "sha2", @@ -3759,22 +3699,23 @@ dependencies = [ ] [[package]] -name = "tokio-native-tls" -version = "0.3.1" +name = "tokio-rustls" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "native-tls", + "rustls 0.21.8", "tokio", ] [[package]] name = "tokio-rustls" -version = "0.24.1" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" dependencies = [ - "rustls 0.21.8", + "rustls 0.22.2", + "rustls-pki-types", "tokio", ] @@ -4408,6 +4349,15 @@ version = "0.25.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" +[[package]] +name = "webpki-roots" +version = "0.26.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3de34ae270483955a94f4b21bdaaeb83d508bb84a01435f393818edb0012009" +dependencies = [ + "rustls-pki-types", +] + [[package]] name = "which" version = "4.4.2" @@ -4658,7 +4608,7 @@ dependencies = [ "log", "percent-encoding 2.3.0", "rustls 0.22.2", - "rustls-pemfile", + "rustls-pemfile 1.0.3", "seahash", "serde", "serde_json", diff --git a/third-party/rust/Cargo.toml b/third-party/rust/Cargo.toml index bc0ff1a4d92..99ace3764fd 100644 --- a/third-party/rust/Cargo.toml +++ b/third-party/rust/Cargo.toml @@ -50,7 +50,7 @@ opentelemetry-http = "0.9.0" http = "0.2.11" rust-i18n = "3" google-fcm1 = "5.0.3" -lettre = { version = "0.11.4", features = ["tokio1", "tokio1-native-tls"] } +lettre = { version = "0.11.4", default-features = false, features = ["builder", "tokio1", "tokio1-rustls-tls", "smtp-transport"] } prost = "0.12" tonic = "0.10.2" diff --git a/third-party/rust/fixups/openssl-sys/fixups.toml b/third-party/rust/fixups/openssl-sys/fixups.toml deleted file mode 100644 index db40d72cb2e..00000000000 --- a/third-party/rust/fixups/openssl-sys/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/third-party/rust/fixups/openssl/fixups.toml b/third-party/rust/fixups/openssl/fixups.toml deleted file mode 100644 index db40d72cb2e..00000000000 --- a/third-party/rust/fixups/openssl/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = []