Skip to content

Commit 18d8783

Browse files
committed
api!: Remove unused config smtp_certificate_checks
1 parent 3c25e4b commit 18d8783

8 files changed

Lines changed: 5 additions & 23 deletions

File tree

deltachat-ffi/deltachat.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -409,8 +409,7 @@ char* dc_get_blobdir (const dc_context_t* context);
409409
* - `server_flags` = IMAP-/SMTP-flags as a combination of @ref DC_LP flags, guessed if left out
410410
* - `proxy_enabled` = Proxy enabled. Disabled by default.
411411
* - `proxy_url` = Proxy URL. May contain multiple URLs separated by newline, but only the first one is used.
412-
* - `imap_certificate_checks` = how to check IMAP certificates, one of the @ref DC_CERTCK flags, defaults to #DC_CERTCK_AUTO (0)
413-
* - `smtp_certificate_checks` = deprecated option, should be set to the same value as `imap_certificate_checks` but ignored by the new core
412+
* - `imap_certificate_checks` = how to check IMAP and SMTP certificates, one of the @ref DC_CERTCK flags, defaults to #DC_CERTCK_AUTO (0)
414413
* - `displayname` = Own name to use when sending messages. MUAs are allowed to spread this way e.g. using CC, defaults to empty
415414
* - `selfstatus` = Own status to display, e.g. in e-mail footers, defaults to empty
416415
* - `selfavatar` = File containing avatar. Will immediately be copied to the
@@ -5804,7 +5803,7 @@ int64_t dc_lot_get_timestamp (const dc_lot_t* lot);
58045803
* These constants configure TLS certificate checks for IMAP and SMTP connections.
58055804
*
58065805
* These constants are set via dc_set_config()
5807-
* using keys "imap_certificate_checks" and "smtp_certificate_checks".
5806+
* using key "imap_certificate_checks".
58085807
*
58095808
* @addtogroup DC_CERTCK
58105809
* @{

deltachat-jsonrpc/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ mod tests {
8585
assert_eq!(result, response.to_owned());
8686
}
8787
{
88-
let request = r#"{"jsonrpc":"2.0","method":"batch_set_config","id":2,"params":[1,{"addr":"","mail_user":"","mail_pw":"","mail_server":"","mail_port":"","mail_security":"","imap_certificate_checks":"","send_user":"","send_pw":"","send_server":"","send_port":"","send_security":"","smtp_certificate_checks":""}]}"#;
88+
let request = r#"{"jsonrpc":"2.0","method":"batch_set_config","id":2,"params":[1,{"addr":"","mail_user":"","mail_pw":"","mail_server":"","mail_port":"","mail_security":"","imap_certificate_checks":"","send_user":"","send_pw":"","send_server":"","send_port":"","send_security":""}]}"#;
8989
let response = r#"{"jsonrpc":"2.0","id":2,"result":null}"#;
9090
session.handle_incoming(request).await;
9191
let result = receiver.recv().await?;

python/src/deltachat/testplugin.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,6 @@ def get_next_liveconfig(self):
433433
if self.pytestconfig.getoption("--strict-tls"):
434434
# Enable strict certificate checks for online accounts
435435
configdict["imap_certificate_checks"] = str(const.DC_CERTCK_STRICT)
436-
configdict["smtp_certificate_checks"] = str(const.DC_CERTCK_STRICT)
437436

438437
assert "addr" in configdict and "mail_pw" in configdict
439438
return configdict
@@ -505,7 +504,6 @@ def new_online_configuring_account(self, cloned_from=None, cache=False, **kwargs
505504
"addr": cloned_from.get_config("addr"),
506505
"mail_pw": cloned_from.get_config("mail_pw"),
507506
"imap_certificate_checks": cloned_from.get_config("imap_certificate_checks"),
508-
"smtp_certificate_checks": cloned_from.get_config("smtp_certificate_checks"),
509507
}
510508
configdict.update(kwargs)
511509
ac = self._get_cached_account(addr=configdict["addr"]) if cache else None

src/config.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,6 @@ pub enum Config {
8181
/// SMTP server security (e.g. TLS, STARTTLS).
8282
SendSecurity,
8383

84-
/// Deprecated option for backwards compatibility.
85-
///
86-
/// Certificate checks for SMTP are actually controlled by `imap_certificate_checks` config.
87-
SmtpCertificateChecks,
88-
8984
/// Whether to use OAuth 2.
9085
///
9186
/// Historically contained other bitflags, which are now deprecated.
@@ -245,11 +240,6 @@ pub enum Config {
245240
/// Configured SMTP server password.
246241
ConfiguredSendPw,
247242

248-
/// Deprecated, stored for backwards compatibility.
249-
///
250-
/// ConfiguredImapCertificateChecks is actually used.
251-
ConfiguredSmtpCertificateChecks,
252-
253243
/// Whether OAuth 2 is used with configured provider.
254244
ConfiguredServerFlags,
255245

src/context/context_tests.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,6 @@ async fn test_get_info_completeness() {
284284
"send_security",
285285
"server_flags",
286286
"skip_start_messages",
287-
"smtp_certificate_checks",
288287
"proxy_url", // May contain passwords, don't leak it to the logs.
289288
"socks5_enabled", // SOCKS5 options are deprecated.
290289
"socks5_host",

src/login_param.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ impl EnteredLoginParam {
178178
// The setting is named `imap_certificate_checks`
179179
// for backwards compatibility,
180180
// but now it is a global setting applied to all protocols,
181-
// while `smtp_certificate_checks` is ignored.
181+
// while `smtp_certificate_checks` has been removed.
182182
let certificate_checks = if let Some(certificate_checks) = context
183183
.get_config_parsed::<i32>(Config::ImapCertificateChecks)
184184
.await?

src/qr/qr_tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,7 @@ async fn test_decode_dclogin_advanced_options() -> Result<()> {
709709
assert_eq!(param.smtp.security, Socket::Plain);
710710

711711
// `sc` option is actually ignored and `ic` is used instead
712-
// because `smtp_certificate_checks` is deprecated.
712+
// because `smtp_certificate_checks` has been removed.
713713
assert_eq!(param.certificate_checks, EnteredCertificateChecks::Strict);
714714

715715
Ok(())

src/transport/transport_tests.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,6 @@ async fn test_posteo_alias() -> Result<()> {
118118
t.set_config(Config::ConfiguredSendUser, Some(user)).await?;
119119
t.set_config(Config::ConfiguredSendPw, Some("foobarbaz"))
120120
.await?;
121-
t.set_config(Config::ConfiguredSmtpCertificateChecks, Some("1"))
122-
.await?; // Strict
123121
t.set_config(Config::ConfiguredServerFlags, Some("0"))
124122
.await?;
125123

@@ -207,8 +205,6 @@ async fn test_empty_server_list_legacy() -> Result<()> {
207205
.await?; // Strict
208206
t.set_config(Config::ConfiguredSendPw, Some("foobarbaz"))
209207
.await?;
210-
t.set_config(Config::ConfiguredSmtpCertificateChecks, Some("1"))
211-
.await?; // Strict
212208
t.set_config(Config::ConfiguredServerFlags, Some("0"))
213209
.await?;
214210

0 commit comments

Comments
 (0)