mirror of
https://github.com/chatmail/core.git
synced 2026-04-19 22:46:29 +03:00
feat: only try to configure non-strict TLS checks if explicitly set
Trying non-strict TLS checks is not necessary for most servers with proper TLS setup, but doubles the time needed to fail configuration when the server is not responding, e.g. when all connection attempts time out. There is also a risk of accidentally configuring non-strict TLS checks in a rare case that strict TLS check configuration spuriously failed, e.g. on a bad network. If the server has a known broken TLS setup, it can still be added to the provider database or configured with non-strict TLS check manually. User can also configure another email provider, such as chatmail servers, instead of using the server with invalid TLS hostname. This change does not affect exising setups.
This commit is contained in:
@@ -14,8 +14,22 @@ use crate::socks::Socks5Config;
|
||||
#[repr(u32)]
|
||||
#[strum(serialize_all = "snake_case")]
|
||||
pub enum CertificateChecks {
|
||||
/// Same as AcceptInvalidCertificates unless overridden by
|
||||
/// `strict_tls` setting in provider database.
|
||||
/// Same as AcceptInvalidCertificates if stored in the database
|
||||
/// as `configured_{imap,smtp}_certificate_checks`.
|
||||
///
|
||||
/// Previous Delta Chat versions stored this in `configured_*`
|
||||
/// if Automatic configuration
|
||||
/// was selected, configuration with strict TLS checks failed
|
||||
/// and configuration without strict TLS checks succeeded.
|
||||
///
|
||||
/// Currently Delta Chat stores only
|
||||
/// `Strict` or `AcceptInvalidCertificates` variants
|
||||
/// in `configured_*` settings.
|
||||
///
|
||||
/// `Automatic` in `{imap,smtp}_certificate_checks`
|
||||
/// means that provider database setting should be taken.
|
||||
/// If there is no provider database setting for certificate checks,
|
||||
/// `Automatic` is the same as `Strict`.
|
||||
Automatic = 0,
|
||||
|
||||
Strict = 1,
|
||||
|
||||
Reference in New Issue
Block a user