Skip to content

Commit

Permalink
lib-auth: Add AUTH_REQUEST_FLAG_TLS
Browse files Browse the repository at this point in the history
Indicates whether connection is over TLS encryption.
  • Loading branch information
cmouse committed Dec 28, 2017
1 parent 33631b9 commit ff2f20b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/lib-auth/auth-client-request.c
Expand Up @@ -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)
Expand Down
4 changes: 3 additions & 1 deletion src/lib-auth/auth-client.h
Expand Up @@ -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 {
Expand Down

0 comments on commit ff2f20b

Please sign in to comment.