mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 17:36:29 +03:00
fix #616 -- allow invalid certs for smtp and imap connections -- this is the behaviour of C-core.
This commit is contained in:
@@ -110,6 +110,8 @@ impl Client {
|
|||||||
) -> imap::error::Result<Self> {
|
) -> imap::error::Result<Self> {
|
||||||
let stream = net::TcpStream::connect(addr)?;
|
let stream = net::TcpStream::connect(addr)?;
|
||||||
let tls = native_tls::TlsConnector::builder()
|
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)
|
.danger_accept_invalid_hostnames(true)
|
||||||
.build()
|
.build()
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|||||||
@@ -70,8 +70,9 @@ impl Smtp {
|
|||||||
let port = lp.send_port as u16;
|
let port = lp.send_port as u16;
|
||||||
|
|
||||||
let tls = native_tls::TlsConnector::builder()
|
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_hostnames(true)
|
||||||
|
.danger_accept_invalid_certs(true)
|
||||||
.min_protocol_version(Some(DEFAULT_TLS_PROTOCOLS[0]))
|
.min_protocol_version(Some(DEFAULT_TLS_PROTOCOLS[0]))
|
||||||
.build()
|
.build()
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|||||||
Reference in New Issue
Block a user