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 /forward.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 'forward.c')
-rw-r--r-- | forward.c | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -83,13 +83,19 @@ check_tls_dowork (struct context *c) if (interval_test (&c->c2.tmp_int)) { - if (tls_multi_process - (c->c2.tls_multi, &c->c2.to_link, &c->c2.to_link_addr, - get_link_socket_info (c), &wakeup)) + const int tmp_status = tls_multi_process + (c->c2.tls_multi, &c->c2.to_link, &c->c2.to_link_addr, + get_link_socket_info (c), &wakeup); + if (tmp_status == TLSMP_ACTIVE) { update_time (); interval_action (&c->c2.tmp_int); } + else if (tmp_status == TLSMP_KILL) + { + c->sig->signal_received = SIGTERM; + c->sig->signal_text = "auth-control-exit"; + } interval_future_trigger (&c->c2.tmp_int, wakeup); } |