From 1c6a348eb8e9f2bdbfc70692728271d44b77631a Mon Sep 17 00:00:00 2001 From: Max Breitenfeldt Date: Tue, 10 Sep 2024 09:58:48 +0200 Subject: [PATCH] Enable accept_invalid_hostnames for rustls (#988) With #977 dangerous_accept_invalid_hostnames is implemented for rustls. This add the config flag so that the feature can actually be used when rustls-tls is enabled. --- src/transport/smtp/client/tls.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/transport/smtp/client/tls.rs b/src/transport/smtp/client/tls.rs index 59037b1..cbf0b69 100644 --- a/src/transport/smtp/client/tls.rs +++ b/src/transport/smtp/client/tls.rs @@ -197,7 +197,7 @@ impl TlsParametersBuilder { /// including those from other sites, are trusted. /// /// This method introduces significant vulnerabilities to man-in-the-middle attacks. - #[cfg(any(feature = "native-tls", feature = "boring-tls"))] + #[cfg(any(feature = "native-tls", feature = "rustls-tls", feature = "boring-tls"))] #[cfg_attr( docsrs, doc(cfg(any(feature = "native-tls", feature = "rustls-tls", feature = "boring-tls")))