diff options
author | james <james@e7ae566f-a301-0410-adde-c780ea21d3b5> | 2008-05-24 23:26:11 +0000 |
---|---|---|
committer | james <james@e7ae566f-a301-0410-adde-c780ea21d3b5> | 2008-05-24 23:26:11 +0000 |
commit | 344ee9181734dcd5a922b8b2a7ebea4ce818a0b0 (patch) | |
tree | 8a4c3724971a0c81debc97d3bba62138aab3a247 /push.c | |
parent | Did: (diff) | |
download | openvpn-344ee9181734dcd5a922b8b2a7ebea4ce818a0b0.tar.xz |
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 '')
-rw-r--r-- | push.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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) |