[geary/wip/26-proton-mail-bridge: 2/3] Revert find/replace starttls > STARTTLS only change in imap-starttls-command.vala



commit 41e6030a6bafc8db2364428f0ed6ca5669657920
Author: Joel Duncan <joel slethen io>
Date:   Tue Jul 3 18:36:04 2018 +0100

    Revert find/replace starttls > STARTTLS only change in imap-starttls-command.vala

 src/client/accounts/add-edit-page.vala             | 20 ++++++++--------
 src/client/accounts/goa-service-information.vala   |  4 ++--
 src/client/accounts/local-service-information.vala |  6 ++---
 src/client/application/geary-controller.vala       |  4 ++--
 src/console/main.vala                              | 18 +++++++-------
 src/engine/api/geary-account-information.vala      |  4 ++--
 src/engine/api/geary-endpoint.vala                 | 28 +++++++++++-----------
 src/engine/api/geary-service-information.vala      |  4 ++--
 src/engine/imap/command/imap-starttls-command.vala |  4 ++--
 .../imap/transport/imap-client-connection.vala     |  4 ++--
 src/engine/imap/transport/imap-client-session.vala | 16 ++++++-------
 src/engine/smtp/smtp-capabilities.vala             |  2 +-
 src/engine/smtp/smtp-client-connection.vala        | 14 +++++------
 src/engine/smtp/smtp-command.vala                  |  4 ++--
 src/engine/smtp/smtp-response-code.vala            |  2 +-
 15 files changed, 67 insertions(+), 67 deletions(-)
---
diff --git a/src/client/accounts/add-edit-page.vala b/src/client/accounts/add-edit-page.vala
index 27624cd9..62e19566 100644
--- a/src/client/accounts/add-edit-page.vala
+++ b/src/client/accounts/add-edit-page.vala
@@ -99,7 +99,7 @@ public class AddEditPage : Gtk.Box {
         }
     }
     
-    public bool imap_STARTTLS {
+    public bool imap_starttls {
         get { return combo_imap_encryption.active == Encryption.STARTTLS; }
         set {
             if (value)
@@ -125,7 +125,7 @@ public class AddEditPage : Gtk.Box {
         }
     }
     
-    public bool smtp_STARTTLS {
+    public bool smtp_starttls {
         get { return combo_smtp_encryption.active == Encryption.STARTTLS; }
         set {
             if (value)
@@ -382,11 +382,11 @@ public class AddEditPage : Gtk.Box {
             info.imap.host,
             info.imap.port,
             info.imap.use_ssl,
-            info.imap.use_STARTTLS,
+            info.imap.use_starttls,
             info.smtp.host,
             info.smtp.port,
             info.smtp.use_ssl,
-            info.smtp.use_STARTTLS,
+            info.smtp.use_starttls,
             info.smtp.smtp_use_imap_credentials,
             info.smtp.smtp_noauth,
             info.prefetch_period_days,
@@ -413,11 +413,11 @@ public class AddEditPage : Gtk.Box {
         string? initial_default_imap_host = null,
         uint16 initial_default_imap_port = Geary.Imap.ClientConnection.DEFAULT_PORT_SSL,
         bool initial_default_imap_ssl = true,
-        bool initial_default_imap_STARTTLS = false,
+        bool initial_default_imap_starttls = false,
         string? initial_default_smtp_host = null,
         uint16 initial_default_smtp_port = Geary.Smtp.ClientConnection.DEFAULT_PORT_STARTTLS,
         bool initial_default_smtp_ssl = false,
-        bool initial_default_smtp_STARTTLS = true,
+        bool initial_default_smtp_starttls = true,
         bool initial_default_smtp_use_imap_credentials = false,
         bool initial_default_smtp_noauth = false,
         int prefetch_period_days = Geary.AccountInformation.DEFAULT_PREFETCH_PERIOD_DAYS,
@@ -448,7 +448,7 @@ public class AddEditPage : Gtk.Box {
         this.imap_username = initial_imap_username ?? "";
         this.imap_password = initial_imap_password ?? "";
         this.imap_ssl = initial_default_imap_ssl;
-        this.imap_STARTTLS = initial_default_imap_STARTTLS;
+        this.imap_starttls = initial_default_imap_starttls;
 
         // Set defaults for SMTP info
         this.smtp_host = initial_default_smtp_host ?? "";
@@ -456,7 +456,7 @@ public class AddEditPage : Gtk.Box {
         this.smtp_username = initial_smtp_username ?? "";
         this.smtp_password = initial_smtp_password ?? "";
         this.smtp_ssl = initial_default_smtp_ssl;
-        this.smtp_STARTTLS = initial_default_smtp_STARTTLS;
+        this.smtp_starttls = initial_default_smtp_starttls;
         this.smtp_use_imap_credentials = initial_default_smtp_use_imap_credentials;
         this.smtp_noauth = initial_default_smtp_noauth;
 
@@ -722,11 +722,11 @@ public class AddEditPage : Gtk.Box {
             info.imap.host = this.imap_host;
             info.imap.port = this.imap_port;
             info.imap.use_ssl = this.imap_ssl;
-            info.imap.use_STARTTLS = this.imap_STARTTLS;
+            info.imap.use_starttls = this.imap_starttls;
             info.smtp.host = this.smtp_host.strip();
             info.smtp.port = this.smtp_port;
             info.smtp.use_ssl = this.smtp_ssl;
-            info.smtp.use_STARTTLS = this.smtp_STARTTLS;
+            info.smtp.use_starttls = this.smtp_starttls;
             info.smtp.smtp_use_imap_credentials = this.smtp_use_imap_credentials;
             info.smtp.smtp_noauth = this.smtp_noauth;
             info.prefetch_period_days = get_storage_length();
diff --git a/src/client/accounts/goa-service-information.vala 
b/src/client/accounts/goa-service-information.vala
index 713ecf6d..925755a2 100644
--- a/src/client/accounts/goa-service-information.vala
+++ b/src/client/accounts/goa-service-information.vala
@@ -28,7 +28,7 @@ public class GoaServiceInformation : Geary.ServiceInformation {
                 this.host = mail.imap_host;
                 this.port = Geary.Imap.ClientConnection.DEFAULT_PORT_SSL;
                 this.use_ssl = mail.imap_use_ssl;
-                this.use_STARTTLS = mail.imap_use_tls;
+                this.use_starttls = mail.imap_use_tls;
                 this.credentials = new Geary.Credentials(
                     ((GoaMediator) this.mediator).method,
                     mail.imap_user_name
@@ -39,7 +39,7 @@ public class GoaServiceInformation : Geary.ServiceInformation {
                 this.host = mail.smtp_host;
                 this.port = Geary.Smtp.ClientConnection.DEFAULT_PORT_SSL;
                 this.use_ssl = mail.smtp_use_ssl;
-                this.use_STARTTLS = mail.smtp_use_tls;
+                this.use_starttls = mail.smtp_use_tls;
                 this.smtp_noauth = !(mail.smtp_use_auth);
                 this.smtp_use_imap_credentials = false;
                 if (!this.smtp_noauth) {
diff --git a/src/client/accounts/local-service-information.vala 
b/src/client/accounts/local-service-information.vala
index 88a0c88d..9ee5e23a 100644
--- a/src/client/accounts/local-service-information.vala
+++ b/src/client/accounts/local-service-information.vala
@@ -15,7 +15,7 @@ public class LocalServiceInformation : Geary.ServiceInformation {
     private const string SMTP_NOAUTH = "noauth";
     private const string SMTP_USE_IMAP_CREDENTIALS = "use_imap_credentials";
     private const string SSL = "ssl";
-    private const string STARTTLS = "STARTTLS";
+    private const string STARTTLS = "starttls";
     private const string USERNAME_KEY = "username";
 
 
@@ -47,7 +47,7 @@ public class LocalServiceInformation : Geary.ServiceInformation {
         this.host = config.get_string(HOST, this.host);
         this.port = config.get_uint16(PORT, this.port);
         this.use_ssl = config.get_bool(SSL, this.use_ssl);
-        this.use_STARTTLS = config.get_bool(STARTTLS, this.use_STARTTLS);
+        this.use_starttls = config.get_bool(STARTTLS, this.use_starttls);
 
         if (this.protocol == Geary.Protocol.SMTP) {
             this.smtp_noauth = config.get_bool(
@@ -68,7 +68,7 @@ public class LocalServiceInformation : Geary.ServiceInformation {
         config.set_string(HOST, this.host);
         config.set_int(PORT, this.port);
         config.set_bool(SSL, this.use_ssl);
-        config.set_bool(STARTTLS, this.use_STARTTLS);
+        config.set_bool(STARTTLS, this.use_starttls);
         config.set_bool(REMEMBER_PASSWORD_KEY, this.remember_password);
 
         if (this.credentials != null) {
diff --git a/src/client/application/geary-controller.vala b/src/client/application/geary-controller.vala
index a3dc9663..ef8a892a 100644
--- a/src/client/application/geary-controller.vala
+++ b/src/client/application/geary-controller.vala
@@ -962,8 +962,8 @@ public class GearyController : Geary.BaseObject {
             login_dialog.show_spinner(true);
             new_info = login_dialog.get_account_information();
             
-            if ((!new_info.imap.use_ssl && !new_info.imap.use_STARTTLS)
-                || (!new_info.smtp.use_ssl && !new_info.smtp.use_STARTTLS)) {
+            if ((!new_info.imap.use_ssl && !new_info.imap.use_starttls)
+                || (!new_info.smtp.use_ssl && !new_info.smtp.use_starttls)) {
                 ConfirmationDialog security_dialog = new ConfirmationDialog(main_window,
                     _("Your settings are insecure"),
                     _("Your IMAP and/or SMTP settings do not specify SSL or TLS.  This means your username 
and password could be read by another person on the network.  Are you sure you want to do this?"),
diff --git a/src/console/main.vala b/src/console/main.vala
index 3d6a4893..f7b7037a 100644
--- a/src/console/main.vala
+++ b/src/console/main.vala
@@ -152,8 +152,8 @@ class ImapConsole : Gtk.Window {
                         disconnect_cmd(cmd, args);
                     break;
                     
-                    case "STARTTLS":
-                        STARTTLS(cmd, args);
+                    case "starttls":
+                        starttls(cmd, args);
                     break;
                     
                     case "login":
@@ -360,29 +360,29 @@ class ImapConsole : Gtk.Window {
         }
     }
     
-    private void STARTTLS(string cmd, string[] args) throws Error {
+    private void starttls(string cmd, string[] args) throws Error {
         check_connected(cmd, args, 0, "");
         
         status("Starting TLS...");
-        do_STARTTLS_async.begin(on_do_STARTTLS_async_completed);
+        do_starttls_async.begin(on_do_starttls_async_completed);
     }
     
-    private async void do_STARTTLS_async() throws Error {
-        Geary.Imap.STARTTLSCommand cmd = new Geary.Imap.STARTTLSCommand();
+    private async void do_starttls_async() throws Error {
+        Geary.Imap.StarttlsCommand cmd = new Geary.Imap.StarttlsCommand();
         yield cx.send_async(cmd, null);
         
         Geary.Imap.StatusResponse response = yield wait_for_response_async(cmd.tag);
         if (response.status == Geary.Imap.Status.OK) {
-            yield cx.STARTTLS_async(null);
+            yield cx.starttls_async(null);
             status("STARTTLS completed");
         } else {
             status("STARTTLS denied: %s".printf(response.to_string()));
         }
     }
     
-    private void on_do_STARTTLS_async_completed(Object? source, AsyncResult result) {
+    private void on_do_starttls_async_completed(Object? source, AsyncResult result) {
         try {
-            do_STARTTLS_async.end(result);
+            do_starttls_async.end(result);
         } catch (Error err) {
             exception(err);
         }
diff --git a/src/engine/api/geary-account-information.vala b/src/engine/api/geary-account-information.vala
index bdb41af9..6629771b 100644
--- a/src/engine/api/geary-account-information.vala
+++ b/src/engine/api/geary-account-information.vala
@@ -536,7 +536,7 @@ public class Geary.AccountInformation : BaseObject {
                 Endpoint.Flags imap_flags = Endpoint.Flags.NONE;
                 if (this.imap.use_ssl)
                     imap_flags |= Endpoint.Flags.SSL;
-                if (this.imap.use_STARTTLS)
+                if (this.imap.use_starttls)
                     imap_flags |= Endpoint.Flags.STARTTLS;
 
                 imap_endpoint = new Endpoint(this.imap.host, this.imap.port,
@@ -577,7 +577,7 @@ public class Geary.AccountInformation : BaseObject {
                 Endpoint.Flags smtp_flags = Endpoint.Flags.NONE;
                 if (this.smtp.use_ssl)
                     smtp_flags |= Endpoint.Flags.SSL;
-                if (this.smtp.use_STARTTLS)
+                if (this.smtp.use_starttls)
                     smtp_flags |= Endpoint.Flags.STARTTLS;
 
                 smtp_endpoint = new Endpoint(this.smtp.host, this.smtp.port,
diff --git a/src/engine/api/geary-endpoint.vala b/src/engine/api/geary-endpoint.vala
index 56c8b3ab..14121dca 100644
--- a/src/engine/api/geary-endpoint.vala
+++ b/src/engine/api/geary-endpoint.vala
@@ -33,7 +33,7 @@ public class Geary.Endpoint : BaseObject {
         STARTTLS
     }
     
-    public enum AttemptSTARTTLS {
+    public enum AttemptStarttls {
         YES,
         NO,
         HALT
@@ -104,7 +104,7 @@ public class Geary.Endpoint : BaseObject {
         return flags.is_all_set(Flags.SSL);
     } }
     
-    public bool use_STARTTLS { get {
+    public bool use_starttls { get {
         return flags.is_all_set(Flags.STARTTLS);
     } }
     
@@ -151,7 +151,7 @@ public class Geary.Endpoint : BaseObject {
         return yield get_socket_client().connect_async(remote_address, cancellable);
     }
     
-    public async TlsClientConnection STARTTLS_handshake_async(IOStream base_stream,
+    public async TlsClientConnection starttls_handshake_async(IOStream base_stream,
         Cancellable? cancellable = null) throws Error {
         TlsClientConnection tls_cx = TlsClientConnection.new(base_stream, remote_address);
         prepare_tls_cx(tls_cx, true);
@@ -168,18 +168,18 @@ public class Geary.Endpoint : BaseObject {
             prepare_tls_cx((TlsClientConnection) ios, false);
     }
     
-    private void prepare_tls_cx(TlsClientConnection tls_cx, bool STARTTLS) {
+    private void prepare_tls_cx(TlsClientConnection tls_cx, bool starttls) {
         tls_cx.use_ssl3 = force_ssl3;
         tls_cx.set_validation_flags(tls_validation_flags);
         
         // Vala doesn't do delegates in a ternary operator very well
-        if (STARTTLS)
-            tls_cx.accept_certificate.connect(on_accept_STARTTLS_certificate);
+        if (starttls)
+            tls_cx.accept_certificate.connect(on_accept_starttls_certificate);
         else
             tls_cx.accept_certificate.connect(on_accept_ssl_certificate);
     }
     
-    private bool on_accept_STARTTLS_certificate(TlsConnection cx, TlsCertificate cert, TlsCertificateFlags 
flags) {
+    private bool on_accept_starttls_certificate(TlsConnection cx, TlsCertificate cert, TlsCertificateFlags 
flags) {
         return report_tls_warnings(SecurityType.STARTTLS, cx, cert, flags);
     }
     
@@ -259,18 +259,18 @@ public class Geary.Endpoint : BaseObject {
      * (b) not using SSL (so TLS is not required), and (c) STARTTLS is specified as a flag on
      * the Endpoint.
      *
-     * If AttemptSTARTTLS.HALT is returned, the caller should not proceed to pass any
+     * If AttemptStarttls.HALT is returned, the caller should not proceed to pass any
      * authentication information down the connection; this situation indicates the connection is
      * insecure and the Endpoint is configured otherwise.
      */
-    public AttemptSTARTTLS attempt_STARTTLS(bool STARTTLS_available) {
-        if (is_ssl || !use_STARTTLS)
-            return AttemptSTARTTLS.NO;
+    public AttemptStarttls attempt_starttls(bool starttls_available) {
+        if (is_ssl || !use_starttls)
+            return AttemptStarttls.NO;
         
-        if (!STARTTLS_available)
-            return AttemptSTARTTLS.HALT;
+        if (!starttls_available)
+            return AttemptStarttls.HALT;
         
-        return AttemptSTARTTLS.YES;
+        return AttemptStarttls.YES;
     }
     
     public string to_string() {
diff --git a/src/engine/api/geary-service-information.vala b/src/engine/api/geary-service-information.vala
index 6913059a..83ae5353 100644
--- a/src/engine/api/geary-service-information.vala
+++ b/src/engine/api/geary-service-information.vala
@@ -70,7 +70,7 @@ public abstract class Geary.ServiceInformation : GLib.Object {
     public uint16 port { get; set; }
 
     /** Whether STARTTLS is used when connecting to the server. */
-    public bool use_STARTTLS { get; set; default = false; }
+    public bool use_starttls { get; set; default = false; }
 
     /** Whether SSL is used when connecting to the server. */
     public bool use_ssl { get; set; default = true; }
@@ -128,7 +128,7 @@ public abstract class Geary.ServiceInformation : GLib.Object {
     public void copy_from(Geary.ServiceInformation from) {
         this.host = from.host;
         this.port = from.port;
-        this.use_STARTTLS = from.use_STARTTLS;
+        this.use_starttls = from.use_starttls;
         this.use_ssl = from.use_ssl;
         this.credentials = (
             from.credentials != null ? from.credentials.copy() : null
diff --git a/src/engine/imap/command/imap-starttls-command.vala 
b/src/engine/imap/command/imap-starttls-command.vala
index 1f96b7c1..528f9f24 100644
--- a/src/engine/imap/command/imap-starttls-command.vala
+++ b/src/engine/imap/command/imap-starttls-command.vala
@@ -8,10 +8,10 @@
  * See [[http://tools.ietf.org/html/rfc3501#section-6.2.1]]
  */
 
-public class Geary.Imap.STARTTLSCommand : Command {
+public class Geary.Imap.StarttlsCommand : Command {
     public const string NAME = "STARTTLS";
     
-    public STARTTLSCommand() {
+    public StarttlsCommand() {
         base (NAME);
     }
 }
diff --git a/src/engine/imap/transport/imap-client-connection.vala 
b/src/engine/imap/transport/imap-client-connection.vala
index fa622370..1b9eb635 100644
--- a/src/engine/imap/transport/imap-client-connection.vala
+++ b/src/engine/imap/transport/imap-client-connection.vala
@@ -497,7 +497,7 @@ public class Geary.Imap.ClientConnection : BaseObject {
         }
     }
 
-    public async void STARTTLS_async(Cancellable? cancellable = null) throws Error {
+    public async void starttls_async(Cancellable? cancellable = null) throws Error {
         if (cx == null)
             throw new ImapError.NOT_SUPPORTED("[%s] Unable to enable TLS: no connection", to_string());
         
@@ -513,7 +513,7 @@ public class Geary.Imap.ClientConnection : BaseObject {
         yield close_channels_async(cancellable);
 
         // wrap connection with TLS connection
-        TlsClientConnection tls_cx = yield endpoint.STARTTLS_handshake_async(cx, cancellable);
+        TlsClientConnection tls_cx = yield endpoint.starttls_handshake_async(cx, cancellable);
         
         ios = tls_cx;
         
diff --git a/src/engine/imap/transport/imap-client-session.vala 
b/src/engine/imap/transport/imap-client-session.vala
index eb289b98..1e44a750 100644
--- a/src/engine/imap/transport/imap-client-session.vala
+++ b/src/engine/imap/transport/imap-client-session.vala
@@ -9,7 +9,7 @@
  *
  * The client session is responsible for opening, maintaining and
  * closing a TCP connection to an IMAP server. When opening, the
- * session will obtain and maintain capabilities, establish a STARTTLS
+ * session will obtain and maintain capabilities, establish a StartTLS
  * session if appropriate, authenticate, and obtain
  * connection-specific information about the server such as the name
  * used for the INBOX and any mailbox namespaces. When connecting has
@@ -915,14 +915,14 @@ public class Geary.Imap.ClientSession : BaseObject {
         // store them for comparison later
         Imap.Capabilities caps = capabilities;
         
-        debug("[%s] use_STARTTLS=%s is_ssl=%s STARTTLS=%s", to_string(), 
imap_endpoint.use_STARTTLS.to_string(),
+        debug("[%s] use_starttls=%s is_ssl=%s starttls=%s", to_string(), 
imap_endpoint.use_starttls.to_string(),
             imap_endpoint.is_ssl.to_string(), caps.has_capability(Capabilities.STARTTLS).to_string());
-        switch (imap_endpoint.attempt_STARTTLS(caps.has_capability(Capabilities.STARTTLS))) {
-            case Endpoint.AttemptSTARTTLS.YES:
+        switch (imap_endpoint.attempt_starttls(caps.has_capability(Capabilities.STARTTLS))) {
+            case Endpoint.AttemptStarttls.YES:
                 debug("[%s] Attempting STARTTLS...", to_string());
                 StatusResponse resp;
                 try {
-                    resp = yield send_command_async(new STARTTLSCommand());
+                    resp = yield send_command_async(new StarttlsCommand());
                 } catch (Error err) {
                     debug("Error attempting STARTTLS command on %s: %s", to_string(), err.message);
                     
@@ -930,7 +930,7 @@ public class Geary.Imap.ClientSession : BaseObject {
                 }
                 
                 if (resp.status == Status.OK) {
-                    yield cx.STARTTLS_async(cancellable);
+                    yield cx.starttls_async(cancellable);
                     debug("[%s] STARTTLS completed", to_string());
                 } else {
                     debug("[%s} STARTTLS refused: %s", to_string(), resp.status.to_string());
@@ -942,11 +942,11 @@ public class Geary.Imap.ClientSession : BaseObject {
                 }
             break;
             
-            case Endpoint.AttemptSTARTTLS.NO:
+            case Endpoint.AttemptStarttls.NO:
                 debug("[%s] No STARTTLS attempted", to_string());
             break;
             
-            case Endpoint.AttemptSTARTTLS.HALT:
+            case Endpoint.AttemptStarttls.HALT:
                 throw new ImapError.NOT_SUPPORTED("STARTTLS unavailable for %s", to_string());
             
             default:
diff --git a/src/engine/smtp/smtp-capabilities.vala b/src/engine/smtp/smtp-capabilities.vala
index 1ba92522..c7be093b 100644
--- a/src/engine/smtp/smtp-capabilities.vala
+++ b/src/engine/smtp/smtp-capabilities.vala
@@ -6,7 +6,7 @@
 
 public class Geary.Smtp.Capabilities : Geary.GenericCapabilities {
 
-    public const string STARTTLS = "STARTTLS";
+    public const string STARTTLS = "starttls";
     public const string AUTH = "auth";
 
     public const string AUTH_PLAIN = "plain";
diff --git a/src/engine/smtp/smtp-client-connection.vala b/src/engine/smtp/smtp-client-connection.vala
index 36d9c0b9..26074ab1 100644
--- a/src/engine/smtp/smtp-client-connection.vala
+++ b/src/engine/smtp/smtp-client-connection.vala
@@ -249,13 +249,13 @@ public class Geary.Smtp.ClientConnection {
         Smtp.Response response = yield say_hello_async(cancellable);
         
         // STARTTLS, if required
-        switch (endpoint.attempt_STARTTLS(capabilities.has_capability(Capabilities.STARTTLS))) {
-            case Endpoint.AttemptSTARTTLS.YES:
-                Response STARTTLS_response = yield transaction_async(new Request(Command.STARTTLS));
-                if (!STARTTLS_response.code.is_STARTTLS_ready())
+        switch (endpoint.attempt_starttls(capabilities.has_capability(Capabilities.STARTTLS))) {
+            case Endpoint.AttemptStarttls.YES:
+                Response starttls_response = yield transaction_async(new Request(Command.STARTTLS));
+                if (!starttls_response.code.is_starttls_ready())
                     throw new SmtpError.STARTTLS_FAILED("STARTTLS failed: %s", response.to_string());
                 
-                TlsClientConnection tls_cx = yield endpoint.STARTTLS_handshake_async(cx, cancellable);
+                TlsClientConnection tls_cx = yield endpoint.starttls_handshake_async(cx, cancellable);
                 cx = tls_cx;
                 set_data_streams(tls_cx);
                 
@@ -264,11 +264,11 @@ public class Geary.Smtp.ClientConnection {
                 response = yield say_hello_async(cancellable);
             break;
             
-            case Endpoint.AttemptSTARTTLS.NO:
+            case Endpoint.AttemptStarttls.NO:
                 // do nothing
             break;
             
-            case Endpoint.AttemptSTARTTLS.HALT:
+            case Endpoint.AttemptStarttls.HALT:
             default:
                 throw new SmtpError.NOT_SUPPORTED("STARTTLS not available for %s", endpoint.to_string());
         }
diff --git a/src/engine/smtp/smtp-command.vala b/src/engine/smtp/smtp-command.vala
index 7dbf1400..47db7648 100644
--- a/src/engine/smtp/smtp-command.vala
+++ b/src/engine/smtp/smtp-command.vala
@@ -50,7 +50,7 @@ public enum Geary.Smtp.Command {
                 return "data";
 
             case STARTTLS:
-                return "STARTTLS";
+                return "starttls";
 
             default:
                 assert_not_reached();
@@ -89,7 +89,7 @@ public enum Geary.Smtp.Command {
             case "data":
                 return DATA;
 
-            case "STARTTLS":
+            case "starttls":
                 return STARTTLS;
 
             default:
diff --git a/src/engine/smtp/smtp-response-code.vala b/src/engine/smtp/smtp-response-code.vala
index 14039438..9a4fd6a0 100644
--- a/src/engine/smtp/smtp-response-code.vala
+++ b/src/engine/smtp/smtp-response-code.vala
@@ -102,7 +102,7 @@ public class Geary.Smtp.ResponseCode {
         return str == START_DATA_CODE;
     }
 
-    public bool is_STARTTLS_ready() {
+    public bool is_starttls_ready() {
         return str == STARTTLS_READY_CODE;
     }
     


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]