1
0
Fork 1
Spiegel von https://github.com/dani-garcia/vaultwarden.git synchronisiert 2024-11-04 02:18:00 +01:00

Revert "Use opportunistic TLS in SMTP connections"

Dieser Commit ist enthalten in:
Daniel García 2020-03-19 13:56:53 +01:00 committet von GitHub
Ursprung b85d548879
Commit d2d9fb08cc
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -18,21 +18,21 @@ use chrono::NaiveDateTime;
fn mailer() -> SmtpTransport { fn mailer() -> SmtpTransport {
let host = CONFIG.smtp_host().unwrap(); let host = CONFIG.smtp_host().unwrap();
let client_security = if CONFIG.smtp_ssl() {
let tls = TlsConnector::builder() let tls = TlsConnector::builder()
.min_protocol_version(Some(Protocol::Tlsv11)) .min_protocol_version(Some(Protocol::Tlsv11))
.build() .build()
.unwrap(); .unwrap();
let tls_params = ClientTlsParameters::new(host.clone(), tls); let params = ClientTlsParameters::new(host.clone(), tls);
let client_security = if CONFIG.smtp_ssl() {
if CONFIG.smtp_explicit_tls() { if CONFIG.smtp_explicit_tls() {
ClientSecurity::Wrapper(tls_params) ClientSecurity::Wrapper(params)
} else { } else {
ClientSecurity::Required(tls_params) ClientSecurity::Required(params)
} }
} else { } else {
ClientSecurity::Opportunistic(tls_params) ClientSecurity::None
}; };
use std::time::Duration; use std::time::Duration;