summaryrefslogtreecommitdiffstats
path: root/push.c
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2008-05-24 23:26:11 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2008-05-24 23:26:11 +0000
commit344ee9181734dcd5a922b8b2a7ebea4ce818a0b0 (patch)
tree8a4c3724971a0c81debc97d3bba62138aab3a247 /push.c
parent4da783f3a502174ea31918171d2e530295f85f52 (diff)
downloadopenvpn-344ee9181734dcd5a922b8b2a7ebea4ce818a0b0.tar.gz
openvpn-344ee9181734dcd5a922b8b2a7ebea4ce818a0b0.tar.xz
openvpn-344ee9181734dcd5a922b8b2a7ebea4ce818a0b0.zip
Support asynchronous/deferred authentication in
OPENVPN_PLUGIN_AUTH_USER_PASS_VERIFY plugin handler. See documentation in openvpn-plugin.h and example usage in plugin/defer/simple.c. git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2969 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'push.c')
-rw-r--r--push.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/push.c b/push.c
index d5a757a..db7ce89 100644
--- a/push.c
+++ b/push.c
@@ -70,10 +70,11 @@ receive_auth_failed (struct context *c, const struct buffer *buffer)
/*
* Send auth failed message from server to client.
*/
-bool
+void
send_auth_failed (struct context *c)
{
- return send_control_channel_string (c, "AUTH_FAILED", D_PUSH);
+ schedule_exit (c, c->options.scheduled_exit_interval);
+ send_control_channel_string (c, "AUTH_FAILED", D_PUSH);
}
#endif
@@ -200,10 +201,9 @@ process_incoming_push_msg (struct context *c,
#if P2MP_SERVER
if (buf_string_compare_advance (&buf, "PUSH_REQUEST"))
{
- if (!tls_authenticated (c->c2.tls_multi) || c->c2.context_auth == CAS_FAILED)
+ if (tls_authentication_status (c->c2.tls_multi, 0) == TLS_AUTHENTICATION_FAILED || c->c2.context_auth == CAS_FAILED)
{
send_auth_failed (c);
- schedule_exit (c, c->options.scheduled_exit_interval);
ret = PUSH_MSG_AUTH_FAILURE;
}
else if (!c->c2.push_reply_deferred && c->c2.context_auth == CAS_SUCCEEDED)