str_append(context->json, context->request->policy_refusal ? "true" : "false");
}
str_append(context->json, ",\"tls\":");
- if (context->request->fields.secured == AUTH_REQUEST_SECURED_TLS)
+ if (context->request->fields.conn_secured == AUTH_REQUEST_CONN_SECURED_TLS)
str_append(context->json, "true");
else
str_append(context->json, "false");
}
if (event_want_debug(request->event))
str_append(dest, "\tdebug");
- switch (fields->secured) {
- case AUTH_REQUEST_SECURED_NONE: break;
- case AUTH_REQUEST_SECURED: str_append(dest, "\tsecured"); break;
- case AUTH_REQUEST_SECURED_TLS: str_append(dest, "\tsecured=tls"); break;
+ switch (fields->conn_secured) {
+ case AUTH_REQUEST_CONN_SECURED_NONE: break;
+ case AUTH_REQUEST_CONN_SECURED: str_append(dest, "\tsecured"); break;
+ case AUTH_REQUEST_CONN_SECURED_TLS: str_append(dest, "\tsecured=tls"); break;
default: break;
}
if (fields->skip_password_check)
/* auth client may set these */
if (strcmp(key, "secured") == 0) {
if (strcmp(value, "tls") == 0) {
- fields->secured = AUTH_REQUEST_SECURED_TLS;
+ fields->conn_secured = AUTH_REQUEST_CONN_SECURED_TLS;
event_add_str(request->event, "transport", "TLS");
} else {
- fields->secured = AUTH_REQUEST_SECURED;
+ fields->conn_secured = AUTH_REQUEST_CONN_SECURED;
event_add_str(request->event, "transport", "trusted");
}
}
}
tab[10].value = tab[43].value = fields->mech_name == NULL ? "" :
escape_func(fields->mech_name, auth_request);
- switch (fields->secured) {
- case AUTH_REQUEST_SECURED_NONE: tab[11].value = ""; break;
- case AUTH_REQUEST_SECURED: tab[11].value = "secured"; break;
- case AUTH_REQUEST_SECURED_TLS: tab[11].value = "TLS"; break;
+ switch (fields->conn_secured) {
+ case AUTH_REQUEST_CONN_SECURED_NONE: tab[11].value = ""; break;
+ case AUTH_REQUEST_CONN_SECURED: tab[11].value = "secured"; break;
+ case AUTH_REQUEST_CONN_SECURED_TLS: tab[11].value = "TLS"; break;
default: tab[11].value = ""; break;
};
tab[12].value = tab[37].value = dec2str(fields->local_port);
AUTH_REQUEST_STATE_MAX
};
-enum auth_request_secured {
- AUTH_REQUEST_SECURED_NONE,
- AUTH_REQUEST_SECURED,
- AUTH_REQUEST_SECURED_TLS,
+enum auth_request_conn_secured {
+ AUTH_REQUEST_CONN_SECURED_NONE,
+ AUTH_REQUEST_CONN_SECURED,
+ AUTH_REQUEST_CONN_SECURED_TLS,
};
enum auth_request_cache_result {
const unsigned char *delayed_credentials;
size_t delayed_credentials_size;
- enum auth_request_secured secured;
+ enum auth_request_conn_secured conn_secured;
/* Authentication was successfully finished, including policy checks
and such. There may still be some final delay or final SASL
.local_ip = { .family = AF_INET },
.remote_ip = { .family = AF_INET },
.mech_name = "-mech",
- .secured = AUTH_REQUEST_SECURED,
+ .conn_secured = AUTH_REQUEST_CONN_SECURED,
.local_port = 21,
.remote_port = 210,
.valid_client_cert = TRUE,
test_begin("auth request var expand flags");
test_request.userdb_lookup = FALSE;
- test_request.fields.secured = AUTH_REQUEST_SECURED_NONE;
+ test_request.fields.conn_secured = AUTH_REQUEST_CONN_SECURED_NONE;
test_request.fields.valid_client_cert = FALSE;
test_assert(var_expand(str, test_input,
auth_request_get_var_expand_table(&test_request, test_escape),
test_assert(strcmp(str_c(str), "40\n\n\n") == 0);
test_request.userdb_lookup = TRUE;
- test_request.fields.secured = AUTH_REQUEST_SECURED;
+ test_request.fields.conn_secured = AUTH_REQUEST_CONN_SECURED;
test_request.fields.valid_client_cert = TRUE;
str_truncate(str, 0);