]> git.ipfire.org Git - thirdparty/openvpn.git/commit
auth-user-pass: add support for inline credentials
authorAntonio Quartulli <a@unstable.cc>
Sat, 17 Sep 2022 13:48:32 +0000 (15:48 +0200)
committerGert Doering <gert@greenie.muc.de>
Fri, 7 Oct 2022 20:48:47 +0000 (22:48 +0200)
commit7d48d31b8226d5e3a5638e2369876381038bf5e2
treee0fc631a70356fce1c8834de468c868438cdbc6b
parentf96290ff901f62717fdb4c1adef72142f359e992
auth-user-pass: add support for inline credentials

--auth-user-pass is probably the only option expecting a filename as
argument that cannot be inline'd as of today.

This patch allows specifying username and password inline in the config
file within the <auth-user-pass></auth-user-pass> tag.

This logic was already implemented for --http-proxy-user-pass, therefore
it was just about applying it to this specific option as well.
Note that the current logic expects username and password to always be
specified when inline. Therefore omitting the password will result in
storing an empty password.

A later patch will change this behaviour to make it consistent with the
classic case (username writte in file), where the password is requested
via stdin when missing.

While a it, add an empty line between prototypes in init.c to make
uncrustify happy.

Signed-off-by: Antonio Quartulli <a@unstable.cc>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20220917134832.16359-1-a@unstable.cc>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg25236.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
Changes.rst
src/openvpn/init.c
src/openvpn/options.c
src/openvpn/options.h
src/openvpn/ssl.c
src/openvpn/ssl.h
src/openvpn/ssl_common.h