]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
login-common: Rename client.starttls to connection_used_starttls
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Thu, 3 Nov 2022 17:15:13 +0000 (19:15 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Wed, 16 Nov 2022 08:09:54 +0000 (08:09 +0000)
src/imap-login/imap-login-client.c
src/login-common/client-common.c
src/login-common/client-common.h
src/submission-login/client.c

index a6aba6b43183e8191ba61c1349b6db498659dbfe..62bf410ab79c6f5db89e1b8fc0831e58a26ec6e7 100644 (file)
@@ -129,7 +129,7 @@ static int cmd_capability(struct imap_client *imap_client,
        /* Client is required to send CAPABILITY after STARTTLS, so the
           capability resp-code workaround checks only pre-STARTTLS
           CAPABILITY commands. */
-       if (!client->starttls)
+       if (!client->connection_used_starttls)
                imap_client->client_ignores_capability_resp_code = TRUE;
        client_send_raw(client, t_strconcat(
                "* CAPABILITY ", get_capability(client), "\r\n", NULL));
index a757284d88d224688ada292383f8812d7a5722b9..92ce7ed4344a3ded9d6d9c225d2c1b117b0e1874 100644 (file)
@@ -593,7 +593,7 @@ int client_init_ssl(struct client *client)
        client->connection_secured = TRUE;
        client->end_client_tls_secured = TRUE;
 
-       if (client->starttls) {
+       if (client->connection_used_starttls) {
                io_remove(&client->io);
                if (!client_does_custom_io(client)) {
                        client->io = io_add_istream(client->input,
@@ -605,7 +605,7 @@ int client_init_ssl(struct client *client)
 
 static void client_start_tls(struct client *client)
 {
-       client->starttls = TRUE;
+       client->connection_used_starttls = TRUE;
        if (client_init_ssl(client) < 0) {
                client_notify_disconnect(client,
                        CLIENT_DISCONNECT_INTERNAL_ERROR,
index 5bc17e6ae5ea6da87c04dad28a0fea93f886fd86..f546671fcf33463fba3fdf2eada5ca072c49e999 100644 (file)
@@ -228,10 +228,11 @@ struct client {
        bool input_blocked:1;
        bool login_success:1;
        bool no_extra_disconnect_reason:1;
-       bool starttls:1;
        /* Client/proxy connection is using TLS. Dovecot has terminated the
           TLS connection (not haproxy). */
        bool connection_tls_secured:1;
+       /* connection_tls_secured=TRUE was started via STARTTLS command. */
+       bool connection_used_starttls:1;
        /* HAProxy terminated the TLS connection. */
        bool haproxy_terminated_tls:1;
        /* Connection from the previous hop (client, proxy, haproxy) is
index c5843e760845359f131bdacf27c7b21f0c1c460c..baf3226a023a7d031ef364bb576d319b139d2366 100644 (file)
@@ -66,7 +66,7 @@ static int submission_login_start_tls(void *conn_ctx,
        struct submission_client *subm_client = conn_ctx;
        struct client *client = &subm_client->common;
 
-       client->starttls = TRUE;
+       client->connection_used_starttls = TRUE;
        if (client_init_ssl(client) < 0) {
                client_notify_disconnect(client,
                        CLIENT_DISCONNECT_INTERNAL_ERROR,