]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Fallback to password authentication when auth-token fails
authorArne Schwabe <arne@rfc2549.org>
Wed, 10 Oct 2018 14:30:51 +0000 (16:30 +0200)
committerGert Doering <gert@greenie.muc.de>
Mon, 10 Dec 2018 13:06:45 +0000 (14:06 +0100)
commit004f13b60d87fe7815f4feee9aded22ae4eacbaf
tree0bfd856e6fdcfeece659900ec4b59bfeb5fb443f
parentca962f3837ab05b0e8a4382960391f289497eaa2
Fallback to password authentication when auth-token fails

Under some circumstances, the auth-token stored by a client may not
be valid anymore.

For example, if the server is restarted, the client will try to
reconnect and resend the old token during authentication. Unfortunately
this attempt will fail, because the server does not keep track of tokens
used during previous runs.

With the current behaviour, depending on how auth-retry was configured,
the client will either just quit, prompt the user for username and password
as the original values are overwritten by the token, or endelessly fail
authentication by sending the old token over and over.

This patch changes the behaviour of the client so that, upon failed
authentication using a token, it will drop the token, perform a soft
restart (USR1) and attempt re-authenticating with the original password
provided by the user if auth-nocache was not specified.

Patch V2: properly formatted commit message, fix openvpn3 detection

Patch V3: remove all server changes, include only minimal non
intrusive client changes that only improve error recovery but don't
change overall behaviour.

Patch V4: forget add push.c to git index, now also included

Patch V5: is fixing overlong lines and one minor style problem.

Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Antonio Quartulli <antonio@openvpn.net>
Message-Id: <20181010143051.27163-1-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg17718.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit e61b401ac50d2a9cfabf0289811ad14cf3bd2751)
doc/openvpn.8
src/openvpn/misc.c
src/openvpn/misc.h
src/openvpn/push.c
src/openvpn/ssl.c
src/openvpn/ssl.h