aboutsummaryrefslogtreecommitdiff
path: root/multi.c
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2009-09-29 23:10:14 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2009-09-29 23:10:14 +0000
commit5733ef668ff51d7a553fb5bc76a1c4ff00352e27 (patch)
tree25a355111e3442d04c35136456eaf741ac96f6e1 /multi.c
parentFixed a bug introduced in r4436 (2.1_rc17) where using the (diff)
downloadopenvpn-5733ef668ff51d7a553fb5bc76a1c4ff00352e27.tar.xz
Added the ability for the server to provide a custom reason string
when an AUTH_FAILED message is returned to the client. This string can be set by the server-side managment interface and read by the client-side management interface. For more info, see management/management-notes.txt, and look for references to "client-reason-text". git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5012 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to '')
-rw-r--r--multi.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/multi.c b/multi.c
index f62563c..ecd1bb3 100644
--- a/multi.c
+++ b/multi.c
@@ -2552,6 +2552,7 @@ management_client_auth (void *arg,
const unsigned int mda_key_id,
const bool auth,
const char *reason,
+ const char *client_reason,
struct buffer_list *cc_config) /* ownership transferred */
{
struct multi_context *m = (struct multi_context *) arg;
@@ -2561,7 +2562,7 @@ management_client_auth (void *arg,
if (mi)
{
- ret = tls_authenticate_key (mi->context.c2.tls_multi, mda_key_id, auth);
+ ret = tls_authenticate_key (mi->context.c2.tls_multi, mda_key_id, auth, client_reason);
if (ret)
{
if (auth && !mi->connection_established_flag)
@@ -2570,7 +2571,7 @@ management_client_auth (void *arg,
cc_config_owned = false;
}
if (!auth && reason)
- msg (D_MULTI_LOW, "MULTI: connection rejected: %s", reason);
+ msg (D_MULTI_LOW, "MULTI: connection rejected: %s, CLI:%s", reason, np(client_reason));
}
}
if (cc_config_owned && cc_config)