]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: Include tls=true/false in policy server request
authorAki Tuomi <aki.tuomi@dovecot.fi>
Fri, 1 Dec 2017 11:46:10 +0000 (13:46 +0200)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Tue, 13 Mar 2018 12:09:40 +0000 (14:09 +0200)
src/auth/auth-policy.c

index 6b1c2ffc5600ce9d728ce62d2820a616aa2f6505..31a49c8e9e1db68c096dec90aa7357718c455162 100755 (executable)
@@ -496,6 +496,11 @@ void auth_policy_create_json(struct policy_lookup_ctx *context,
                str_append(context->json, ",\"policy_reject\":");
                str_append(context->json, context->request->policy_refusal ? "true" : "false");
        }
+       str_append(context->json, ",\"tls\":");
+       if (context->request->secured == AUTH_REQUEST_SECURED_TLS)
+               str_append(context->json, "true");
+       else
+               str_append(context->json, "false");
        str_append_c(context->json, '}');
        auth_request_log_debug(context->request, "policy",
                "Policy server request JSON: %s", str_c(context->json));