[geary/wip/20-cert-pinning: 25/32] Add Geary.ProblemType for TLS cert validation errors, clarify login errs
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/wip/20-cert-pinning: 25/32] Add Geary.ProblemType for TLS cert validation errors, clarify login errs
- Date: Tue, 8 Jan 2019 13:01:41 +0000 (UTC)
commit 205b511aecb6f162f554d7bed2d581474b8b5c73
Author: Michael Gratton <mike vee net>
Date: Thu Dec 27 21:33:14 2018 +1100
Add Geary.ProblemType for TLS cert validation errors, clarify login errs
src/client/components/main-window-info-bar.vala | 18 ++++++++++++++++--
src/engine/api/geary-problem-report.vala | 7 +++++--
2 files changed, 21 insertions(+), 4 deletions(-)
---
diff --git a/src/client/components/main-window-info-bar.vala b/src/client/components/main-window-info-bar.vala
index 183c0988..5553555d 100644
--- a/src/client/components/main-window-info-bar.vala
+++ b/src/client/components/main-window-info-bar.vala
@@ -90,20 +90,34 @@ public class MainWindowInfoBar : Gtk.InfoBar {
descr = _("Could not communicate with %s for %s, check the server name and try again in a
moment").printf(server, account);
retry = _("Try reconnecting");
- } else if (report.problem_type == Geary.ProblemType.LOGIN_FAILED &&
+ } else if (report.problem_type == Geary.ProblemType.AUTHENTICATION &&
service_report.service.protocol == Geary.Protocol.IMAP) {
// Translators: String substitution is the account name
title = _("Incoming mail server password required for %s").printf(account);
descr = _("Messages cannot be received without the correct password.");
retry = _("Retry receiving email, you will be prompted for a password");
- } else if (report.problem_type == Geary.ProblemType.LOGIN_FAILED &&
+ } else if (report.problem_type == Geary.ProblemType.AUTHENTICATION &&
service_report.service.protocol == Geary.Protocol.SMTP) {
// Translators: String substitution is the account name
title = _("Outgoing mail server password required for %s").printf(account);
descr = _("Messages cannot be sent without the correct password.");
retry = _("Retry sending queued messages, you will be prompted for a password");
+ } else if (report.problem_type == Geary.ProblemType.UNTRUSTED &&
+ service_report.service.protocol == Geary.Protocol.IMAP) {
+ // Translators: String substitution is the account name
+ title = _("Incoming mail server security is not trusted for %s").printf(account);
+ descr = _("Messages will not be received until checked.");
+ retry = _("Check security details");
+
+ } else if (report.problem_type == Geary.ProblemType.UNTRUSTED &&
+ service_report.service.protocol == Geary.Protocol.SMTP) {
+ // Translators: String substitution is the account name
+ title = _("Outgoing mail server security is not trusted for %s").printf(account);
+ descr = _("Messages cannot be sent until checked.");
+ retry = _("Check security details");
+
} else if (report.problem_type == Geary.ProblemType.GENERIC_ERROR &&
service_report.service.protocol == Geary.Protocol.IMAP) {
// Translators: String substitution is the account name
diff --git a/src/engine/api/geary-problem-report.vala b/src/engine/api/geary-problem-report.vala
index 41272929..35353562 100644
--- a/src/engine/api/geary-problem-report.vala
+++ b/src/engine/api/geary-problem-report.vala
@@ -1,6 +1,6 @@
/*
* Copyright 2016 Software Freedom Conservancy Inc.
- * Copyright 2017 Michael Gratton <mike vee net>
+ * Copyright 2017-2018 Michael Gratton <mike vee net>
*
* This software is licensed under the GNU Lesser General Public License
* (version 2.1 or later). See the COPYING file in this distribution.
@@ -26,7 +26,10 @@ public enum Geary.ProblemType {
SERVER_ERROR,
/** Indicates credentials supplied for authentication were rejected. */
- LOGIN_FAILED,
+ AUTHENTICATION,
+
+ /** Indicates a remote TLS certificate failed validation. */
+ UNTRUSTED,
/** Indicates an outgoing message was sent, but not saved. */
SEND_EMAIL_SAVE_FAILED;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]