]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Http-proxy: fix bug preventing proxy credentials caching
authorGianmarco De Gregori <gianmarco@mandelbit.com>
Sun, 23 Jun 2024 20:05:51 +0000 (22:05 +0200)
committerGert Doering <gert@greenie.muc.de>
Tue, 25 Jun 2024 20:22:48 +0000 (22:22 +0200)
commit3cfd6f961d5c92bec283ac3616e1633b4e16760c
tree57481bc6888a1bd8c57044fb10776e96fd030d13
parent56355924b4945ec808500b18c714c111387697f9
Http-proxy: fix bug preventing proxy credentials caching

Caching proxy credentials was not working due to the
lack of handling already defined creds in get_user_pass(),
which prevented the caching from working properly.

Fix this issue by getting the value of c->first_time,
that indicates if we're at the first iteration
of the main loop and use it as second argument of the
get_user_pass_http(). Otherwise, on SIGUSR1 or SIGHUP
upon instance context restart credentials would be erased
every time.

The nocache member has been added to the struct
http_proxy_options and also a getter method to retrieve
that option from ssl has been added, by doing this
we're able to erase previous queried user credentials
to ensure correct operation.

Fixes: Trac #1187
Signed-off-by: Gianmarco De Gregori <gianmarco@mandelbit.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Change-Id: Ia3e06c0832c4ca0ab868c845279fb71c01a1a78a
Acked-by: Frank Lichtenheld <frank@lichtenheld.com>
Message-Id: <20240623200551.20092-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg28835.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
doc/man-sections/generic-options.rst
src/openvpn/init.c
src/openvpn/options.c
src/openvpn/proxy.c
src/openvpn/proxy.h
src/openvpn/ssl.c
src/openvpn/ssl.h