OpenVPN / openvpn

OpenVPN is an open source VPN daemon
http://openvpn.net
Other
10.26k stars 2.92k forks source link

Need to specify complete path to pkcs12 when using "config-auto" #459

Open larsen0815 opened 7 months ago

larsen0815 commented 7 months ago

I have a working VPN connection that I now want to use with PLAP. It is configured with pkcs12 mycert.p12 and all files of that connection are in a sub-directory of C:\Users\myuser\OpenVPN\config\.

I have then moved that sub-directory into c:\Program Files\OpenVPN\config-auto. The GUI now shows

Waiting for the management interface to come up

while the log tells me

WARNING: cannot stat file 'mycert.p12': Das System kann die angegebene Datei nicht finden.   (errno=2)
Options error: --pkcs12 fails with 'mycert.p12': Das System kann die angegebene Datei nicht finden.   (errno=2)

Translates to "system cannot find the specified file"

To fix this problem, I have to specify the pkcs12 with the sub-directory like this:

pkcs12 "c:/Program Files/OpenVPN/config-auto/myconnection/mycert.p12"

There seems to be a difference in handling between the "normal" config and config-auto.

Version information:

selvanair commented 7 months ago

Looks like a bug in openvpnserv2 -- working directory set to the root of the autostart_config_dir instead of that of the ovpn file. https://github.com/OpenVPN/openvpnserv2/issues/16