]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-auth: Add AUTH_REQUEST_FLAG_TLS
authorAki Tuomi <aki.tuomi@dovecot.fi>
Fri, 1 Dec 2017 11:16:07 +0000 (13:16 +0200)
committerAki Tuomi <aki.tuomi@dovecot.fi>
Thu, 28 Dec 2017 14:01:50 +0000 (16:01 +0200)
Indicates whether connection is over TLS encryption.

src/lib-auth/auth-client-request.c
src/lib-auth/auth-client.h

index abcd1709ead3fc7b2b8bb7fcf66cfac3743e65d6..576843e205f8c8d2bd56962a28b10e6ad524f3fd 100644 (file)
@@ -34,8 +34,13 @@ static void auth_server_send_new_request(struct auth_server_connection *conn,
 
        if ((info->flags & AUTH_REQUEST_FLAG_SUPPORT_FINAL_RESP) != 0)
                str_append(str, "\tfinal-resp-ok");
-       if ((info->flags & AUTH_REQUEST_FLAG_SECURED) != 0)
+       if ((info->flags & AUTH_REQUEST_FLAG_SECURED) != 0) {
                str_append(str, "\tsecured");
+               if ((info->flags & AUTH_REQUEST_FLAG_TRANSPORT_SECURITY_TLS) != 0)
+                       str_append(str, "=tls");
+       } else {
+               i_assert((info->flags & AUTH_REQUEST_FLAG_TRANSPORT_SECURITY_TLS) == 0);
+       }
        if ((info->flags & AUTH_REQUEST_FLAG_NO_PENALTY) != 0)
                str_append(str, "\tno-penalty");
        if ((info->flags & AUTH_REQUEST_FLAG_VALID_CLIENT_CERT) != 0)
index dba7a2cfe0ae2e5b33a2bae1f35c942e4556cc5e..99bc604210605c62f90e8b816f00e9ee1b5b14fc 100644 (file)
@@ -15,7 +15,9 @@ enum auth_request_flags {
        /* Support final SASL response */
        AUTH_REQUEST_FLAG_SUPPORT_FINAL_RESP    = 0x08,
        /* Enable auth_debug=yes logging for this request */
-       AUTH_REQUEST_FLAG_DEBUG                 = 0x10
+       AUTH_REQUEST_FLAG_DEBUG                 = 0x10,
+       /* If TLS was used */
+       AUTH_REQUEST_FLAG_TRANSPORT_SECURITY_TLS = 0x20,
 };
 
 enum auth_request_status {