mirror of
https://github.com/chatmail/core.git
synced 2026-05-01 20:36:31 +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>>(
|
pub async fn secure<S: AsRef<str>>(
|
||||||
self,
|
self,
|
||||||
domain: S,
|
domain: S,
|
||||||
_certificate_checks: CertificateChecks,
|
certificate_checks: CertificateChecks,
|
||||||
) -> ImapResult<Client> {
|
) -> ImapResult<Client> {
|
||||||
match self {
|
match self {
|
||||||
Client::Insecure(client) => {
|
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?;
|
let client_sec = client.secure(domain, &tls).await?;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user