]> 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)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Tue, 13 Mar 2018 12:09:40 +0000 (14:09 +0200)
Indicates whether connection is over TLS encryption.

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

index 47458bf658cf495aec3558e51a86ef429efc42d6..40640d63f5f8ba7a421e718d36c74bbe0ea3023b 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 {