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

index eaa46bdb8a3185319402f1da0ab833db7b48e25b..a757284d88d224688ada292383f8812d7a5722b9 100644 (file)
@@ -217,7 +217,7 @@ client_alloc(int fd, pool_t pool,
        client->trusted = client_is_trusted(client);
 
        if (conn->haproxied) {
-               client->proxied_ssl = conn->haproxy.ssl;
+               client->haproxy_terminated_tls = conn->haproxy.ssl;
                client->connection_secured = conn->haproxy.ssl || client->trusted;
                client->end_client_tls_secured = conn->haproxy.ssl;
                client->local_name = conn->haproxy.hostname;
@@ -890,7 +890,7 @@ get_var_expand_table(struct client *client)
        if (!client->connection_tls_secured) {
                tab[11].value = client->connection_secured ? "secured" : NULL;
                tab[12].value = "";
-       } else if (client->proxied_ssl) {
+       } else if (client->haproxy_terminated_tls) {
                tab[11].value = "TLS";
                tab[12].value = "(proxied)";
        } else if (client->ssl_iostream != NULL) {
index d70901110b512b04c934435454c86c91b9306617..5bc17e6ae5ea6da87c04dad28a0fea93f886fd86 100644 (file)
@@ -232,7 +232,8 @@ struct client {
        /* Client/proxy connection is using TLS. Dovecot has terminated the
           TLS connection (not haproxy). */
        bool connection_tls_secured:1;
-       bool proxied_ssl:1;
+       /* HAProxy terminated the TLS connection. */
+       bool haproxy_terminated_tls:1;
        /* Connection from the previous hop (client, proxy, haproxy) is
           considered secured. Either because TLS is used, or because the
           connection is otherwise considered not to need TLS. Note that this
index 86e844eca8c75a81694aede1857302ef87433362..4e98547620eac8ad4f52731d675d29c660e5903e 100644 (file)
@@ -106,7 +106,7 @@ client_get_auth_flags(struct client *client)
        if (client->ssl_iostream != NULL &&
            ssl_iostream_has_valid_client_cert(client->ssl_iostream))
                auth_flags |= AUTH_REQUEST_FLAG_VALID_CLIENT_CERT;
-       if (client->connection_tls_secured || client->proxied_ssl)
+       if (client->connection_tls_secured || client->haproxy_terminated_tls)
                auth_flags |= AUTH_REQUEST_FLAG_TRANSPORT_SECURITY_TLS;
        if (client->connection_secured)
                auth_flags |= AUTH_REQUEST_FLAG_SECURED;