Page 1 of 1

Options error: --cert fails

Posted: Fri Mar 17, 2023 8:52 pm
by xsneaky
Hello

When i try to connect to my vpn server i keep getting same error.
After connecting i get error in my certificates

Mar 17 20:38:56 instance-1 ovpn-client[]: Options error: --cert fails with 'client.crt': No such file or directory (errno=2)
Mar 17 20:38:56 instance-1 ovpn-client[]: WARNING: cannot stat file 'client.key': No such file or directory (errno=2)
Mar 17 20:38:56 instance-1 ovpn-client[]: Options error: --key fails with 'client.key': No such file or directory (errno=2)
Mar 17 20:38:56 instance-1 ovpn-client[]: Options error: Please correct these errors.

I have embed the data in my ovpn file
<ca>
</ca>
<cert>
</cert>
<key>
</key>

anyone know if im just making a stupid mistake or a solution to fix my problem?

Re: Options error: --cert fails

Posted: Fri May 26, 2023 5:28 am
by tharunganapathi
I am getting the same issue. Please send the solution here if you find any. In the mean time, i will also search for the solutions.

Re: Options error: --cert fails

Posted: Fri May 26, 2023 12:41 pm
by Fadim
The first thing I would do is to make sure that the file paths in the configuration match the actual locations of these certificate files.
And then double-check the file permissions to ensure they are readable by the OpenVPN client.

Also, if you have embedded the certificate data directly in the .ovpn file, make sure you have included the correct content between the <cert> and </cert> tags.

Re: Options error: --cert fails

Posted: Fri May 26, 2023 12:54 pm
by Pippin
Hi,

File paths to certs/keys and embedded (inline) certs/keys are mutually exclusive.
.