Just to add, the best way is to actually embed the certificate and key into the ovpn file. You can convert your p12 like so:
openssl pkcs12 -in path.p12 -out newfile.crt.pem -clcerts -nokeys
openssl pkcs12 -in path.p12 -out newfile.key.pem -nocerts -nodes
or if you need to enter a password too:
openssl pkcs12 -in path.p12 -out newfile.crt.pem -clcerts -nokeys -passin ‘pass:P@s5w0rD’
Then you paste the contents of the cert and key like so into the ovpn file:
<ca>
-----BEGIN CERTIFICATE-----
***Paste CA Cert Text Here***
-----END CERTIFICATE-----
</ca>
<cert>
-----BEGIN CERTIFICATE-----
***Paste Your Cert Text Here***
-----END CERTIFICATE-----
</cert>
<key>
-----BEGIN PRIVATE KEY-----
***Paste Your Cert Private Key Here***
-----END PRIVATE KEY-----
</key>
You can see my full opvn file here: