mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
Respect CertificateChecks in IMAP Client::secure
This commit is contained in:
@@ -72,11 +72,12 @@ impl Client {
|
||||
pub async fn secure<S: AsRef<str>>(
|
||||
self,
|
||||
domain: S,
|
||||
_certificate_checks: CertificateChecks,
|
||||
certificate_checks: CertificateChecks,
|
||||
) -> ImapResult<Client> {
|
||||
match self {
|
||||
Client::Insecure(client) => {
|
||||
let tls = async_tls::TlsConnector::new();
|
||||
let tls_config = dc_build_tls_config(certificate_checks);
|
||||
let tls: async_tls::TlsConnector = Arc::new(tls_config).into();
|
||||
|
||||
let client_sec = client.secure(domain, &tls).await?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user