From e82d76a1128e81a36a3a591ff15fcca3b9c7a707 Mon Sep 17 00:00:00 2001 From: holger krekel Date: Fri, 27 Sep 2019 18:37:08 +0200 Subject: [PATCH] fix #616 -- allow invalid certs for smtp and imap connections -- this is the behaviour of C-core. --- src/imap.rs | 2 ++ src/smtp.rs | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/imap.rs b/src/imap.rs index 7ce12d021..94d66edec 100644 --- a/src/imap.rs +++ b/src/imap.rs @@ -110,6 +110,8 @@ impl Client { ) -> imap::error::Result { let stream = net::TcpStream::connect(addr)?; let tls = native_tls::TlsConnector::builder() + // see also: https://github.com/deltachat/deltachat-core-rust/issues/203 + .danger_accept_invalid_certs(true) .danger_accept_invalid_hostnames(true) .build() .unwrap(); diff --git a/src/smtp.rs b/src/smtp.rs index 31dcf2970..a4d8ad34a 100644 --- a/src/smtp.rs +++ b/src/smtp.rs @@ -70,8 +70,9 @@ impl Smtp { let port = lp.send_port as u16; let tls = native_tls::TlsConnector::builder() - // FIXME: unfortunately this is needed to make things work on macos + testrun.org + // see also: https://github.com/deltachat/deltachat-core-rust/issues/203 .danger_accept_invalid_hostnames(true) + .danger_accept_invalid_certs(true) .min_protocol_version(Some(DEFAULT_TLS_PROTOCOLS[0])) .build() .unwrap();