]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Fix session id and initial timestamp not being preserved
authorArne Schwabe <arne@rfc2549.org>
Tue, 12 May 2020 12:43:44 +0000 (14:43 +0200)
committerGert Doering <gert@greenie.muc.de>
Tue, 12 May 2020 17:52:57 +0000 (19:52 +0200)
commita88504010466dd5f5e0eabefd487036082444426
treef0e18990c79fc21ebe9c18b499880a6448745197
parentb0c94aff299fcec607d6a0194c4cdea8a33dd353
Fix session id and initial timestamp not being preserved

In the initial state of checking whether an auth-token has been
validated, the check check if multi->auth_token is already set and
only then sets the value. This defeats the purpose and lead to always
a new auth-token with new session id and lifetime being generated when
the server restarts or the client reconnect to another server.

Patch V2: Only set multi->auth_token when NULL to avoid leaking
          memory. Improve comments and documentation of auth-token.

Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20200512124344.15929-1-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg19878.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/auth_token.h
src/openvpn/ssl_verify.c