in this post I just linked, he has the same issue as me with the same error message. In the comments, he suggested removing the following three lines: Ca.crt Client.crt Client.key
OK, now I know what you are talking about: it is really that thing that I mentioned (but didn’t really suggest) about embedding the certificates and then using one single file, the .ovpn file, for everything.
And then, he says that those three things are just placeholders, and what your actually supposed to add is supposed to go on the bottom but I don’t know how to add that information
I found this particular comment, it is the last one there right now, right? That person is wrong: ca ca.crt
, cert client.crt
and key client.key
are not “placeholders for the new stuff you are supposed to add at the bottom”, on the contrary: those lines serve to declare the names and roles of the certificate files that are supposed to be in the same folder of the .ovpn file if you are following the usual approach, and if you are going to try the embedding approach (so you don’t have to use the extra files anymore) you need to delete those three lines. And there is something that you need to keep in mind: it is possible that those certificate files don’t have those exact names, and this can happen often with the client certificates and keys: we can create certificates for several users, with different file names, and then we need to edit the template .ovpn file to match them. Did you check if the names match (if you are not trying the embedding approach)?
Now let’s talk about the example they gave there, that follows the embedding approach:
<ca>
-----BEGIN CERT etc
</ca>
<cert>
-----BEGIN CERT etc
</cert>
<key>
-----BEGIN PRIVATE KEY etc
</key>
You understand that you need to write:
<ca>
</ca>
<cert>
</cert>
<key>
</key>
And then fill the blank lines with the contents of each matching certificate or key file, right? Open each .crt and .key file, copy the entire contents, and paste in the proper space.
An additional info: instead of deleting lines, I think it’s better to comment the lines (making them not being used by OpenVPN), so in the future you can have a clue of what you did in the past, and to comment you add a “#” or a semi-colon at the beginning, something like this:
# I commented the three lines below because I will embed the certificates inside this file here, like that awesome dude on Reddit suggested.
;ca ca.crt
;cert client.crt
;key client.key