From 344ee9181734dcd5a922b8b2a7ebea4ce818a0b0 Mon Sep 17 00:00:00 2001 From: james Date: Sat, 24 May 2008 23:26:11 +0000 Subject: 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 --- push.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'push.c') 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) -- cgit v1.2.3