summaryrefslogtreecommitdiffstats
path: root/manage.c
diff options
context:
space:
mode:
authorJames Yonan <james@openvpn.net>2011-03-26 21:16:40 +0000
committerJames Yonan <james@openvpn.net>2011-03-26 21:16:40 +0000
commite52e76ce96f984d1ac9aa91bdb55ac162fce0785 (patch)
tree7b1f1cf2c832bfffd01a8714a81c2648fa570fe8 /manage.c
parentd4e999389a8d4a2091309e96e47ba0ff7d627a07 (diff)
downloadopenvpn-e52e76ce96f984d1ac9aa91bdb55ac162fce0785.tar.gz
openvpn-e52e76ce96f984d1ac9aa91bdb55ac162fce0785.tar.xz
openvpn-e52e76ce96f984d1ac9aa91bdb55ac162fce0785.zip
Added "auth-token" client directive, which is intended to be
pushed by server, and that is used to offer a temporary session token to clients that can be used in place of a password on subsequent credential challenges. This accomplishes the security benefit of preventing caching of the real password while offering most of the advantages of password caching, i.e. not forcing the user to re-enter credentials for every TLS renegotiation or network hiccup. auth-token does two things: 1. if password caching is enabled, the token replaces the previous password, and 2. if the management interface is active, the token is output to it: >PASSWORD:Auth-Token:<token> Also made a minor change to HALT/RESTART processing when password caching is enabled. When client receives a HALT or RESTART message, and if the message text contains a flags block (i.e. [FFF]:message), if flag 'P' (preserve auth) is present in flags, don't purge the Auth password. Otherwise do purge the Auth password. Version 2.1.3o git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@7088 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'manage.c')
-rw-r--r--manage.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/manage.c b/manage.c
index 67f87d6..a79a8fd 100644
--- a/manage.c
+++ b/manage.c
@@ -698,7 +698,7 @@ static void
man_forget_passwords (struct management *man)
{
#if defined(USE_CRYPTO) && defined(USE_SSL)
- ssl_purge_auth ();
+ ssl_purge_auth (false);
msg (M_CLIENT, "SUCCESS: Passwords were forgotten");
#endif
}
@@ -1682,7 +1682,7 @@ man_reset_client_socket (struct management *man, const bool exiting)
{
#if defined(USE_CRYPTO) && defined(USE_SSL)
if (man->settings.flags & MF_FORGET_DISCONNECT)
- ssl_purge_auth ();
+ ssl_purge_auth (false);
#endif
if (man->settings.flags & MF_SIGNAL) {
int mysig = man_mod_signal (man, SIGUSR1);
@@ -2515,6 +2515,12 @@ management_auth_failure (struct management *man, const char *type, const char *r
msg (M_CLIENT, ">PASSWORD:Verification Failed: '%s'", type);
}
+void
+management_auth_token (struct management *man, const char *token)
+{
+ msg (M_CLIENT, ">PASSWORD:Auth-Token:%s", token);
+}
+
static inline bool
man_persist_state (unsigned int *persistent, const int n)
{